cf 1.0.0-beta.21 → 1.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +5080 -4931
- package/dist/_meta/schemas.json +3051 -3055
- package/dist/{abuse-reports-CbUAnJxd.mjs → abuse-reports-GF9V-_qH.mjs} +1 -1
- package/dist/{access-C-78DlxL.mjs → access-dWdATy_5.mjs} +1 -1
- package/dist/{accounts-DEqQPxCz.mjs → accounts-CNpiDgQ-.mjs} +50 -52
- package/dist/{acm-jmhCq3Yh.mjs → acm-BXOuZNqO.mjs} +1 -1
- package/dist/{addressing-BeYFpQvC.mjs → addressing-BE4KpVHp.mjs} +1 -1
- package/dist/agent-context-Dtyy4aKL.mjs +2 -0
- package/dist/{agent-memory-Chlovb7j.mjs → agent-memory-WOFBlqfc.mjs} +1 -1
- package/dist/{ai-BndH3HYN.mjs → ai-2syYes5a.mjs} +1 -1
- package/dist/{ai-audit-BUJ-70O_.mjs → ai-audit-DBZnZtSH.mjs} +1 -1
- package/dist/{ai-gateway-CCk7VKhL.mjs → ai-gateway-BL8uRjav.mjs} +1 -1
- package/dist/{ai-search-BexET_wp.mjs → ai-search-xKyrECHJ.mjs} +1 -1
- package/dist/{ai-security-D4MxRlxX.mjs → ai-security-D-o76TBI.mjs} +1 -1
- package/dist/{alerting-rw8Oi3x7.mjs → alerting-D0Hh3IxQ.mjs} +1 -1
- package/dist/{analytics-q-guNEOK.mjs → analytics-BS_HDYYE.mjs} +1 -1
- package/dist/{analytics-engine-Bk7dQLcm.mjs → analytics-engine-B8J0AASh.mjs} +1 -1
- package/dist/api-X3wKppsT.mjs +3 -0
- package/dist/{api-security-BDc6gkf1.mjs → api-security-Dm-_J64v.mjs} +1 -1
- package/dist/{argo-CnLIqm0i.mjs → argo-DLLQUUEp.mjs} +1 -1
- package/dist/{artifacts-Cil33dzV.mjs → artifacts-B-ILiKwb.mjs} +1 -1
- package/dist/{audit-logs--E2Eclb7.mjs → audit-logs-B6f7Yyqb.mjs} +1 -1
- package/dist/{auth-BcNLQji1.mjs → auth-BlWCu-YH.mjs} +1 -1
- package/dist/auth-C0-WtqBw.mjs +2 -0
- package/dist/{auth-BtZmY6sE.mjs → auth-CENmPoCB.mjs} +1 -1
- package/dist/{auth-token-aF5AVLlH.mjs → auth-token-7Gn0n5N_.mjs} +1 -1
- package/dist/{autoconfig-Dbp6J25P.mjs → autoconfig-Bjb97Onj.mjs} +1 -1
- package/dist/{basin-catalog-dnVyzopm.mjs → basin-catalog-C61jbxPf.mjs} +1 -1
- package/dist/{billing-Fqp3jB2V.mjs → billing-CpbtioM3.mjs} +1 -1
- package/dist/blocks-DDNRRYxu.mjs +5 -0
- package/dist/{bot-management-SEDgo1Xg.mjs → bot-management-iYrqBG7K.mjs} +1 -1
- package/dist/{botnet-feed-DPqR4M0Y.mjs → botnet-feed-CiCwJ6Oe.mjs} +1 -1
- package/dist/{brand-protection-B8vwKfM9.mjs → brand-protection-D25yQ6cQ.mjs} +1 -1
- package/dist/{browser-run-BybYDq3I.mjs → browser-run-CC3fAKEB.mjs} +1 -1
- package/dist/build-CovoviZW.mjs +2 -0
- package/dist/{build-CWlpWVBf.mjs → build-DKFvtSB_.mjs} +1 -1
- package/dist/{builds-CvtOG-Gk.mjs → builds-AFdd5qia.mjs} +1 -1
- package/dist/{cache-Bme_d2Wx.mjs → cache-BI3Oyz-Z.mjs} +1 -1
- package/dist/{cli-CIKDqm-u.mjs → cli-Dji5-s1V.mjs} +1 -1
- package/dist/{client-side-security-ZQeRoo1t.mjs → client-side-security-rknn53xw.mjs} +1 -1
- package/dist/{cloud-connector-BeunZlNV.mjs → cloud-connector-BTc3qgHz.mjs} +1 -1
- package/dist/cloudforce-one-BoFYTYsT.mjs +316 -0
- package/dist/{command-CkZkTjIj.mjs → command-6vX_Ie2o.mjs} +1 -1
- package/dist/{command-DWWuXQV8.mjs → command-BDFf54JB.mjs} +1 -1
- package/dist/{command-C9CNvZi_.mjs → command-B_C1I0aq.mjs} +1 -1
- package/dist/{command-CzWWQv8j.mjs → command-BpmbvQqK.mjs} +1 -1
- package/dist/{command-BGRucANI.mjs → command-CKEmPXtc.mjs} +1 -1
- package/dist/{command-CQ5qHE7n.mjs → command-CiBygnsK.mjs} +1 -1
- package/dist/{command-B3uWlw57.mjs → command-KuJJ2WEe.mjs} +1 -1
- package/dist/{command-prWMAJbg.mjs → command-WlIhTGN6.mjs} +1 -1
- package/dist/{command-DkwmylF2.mjs → command-leDr72L4.mjs} +1 -1
- package/dist/{command-CtlD6MEi.mjs → command-ukMoR-tT.mjs} +1 -1
- package/dist/{completions-2Otv0HMd.mjs → completions-DGe2alry.mjs} +1 -1
- package/dist/{connector-interrupts-Dfhxupmg.mjs → connector-interrupts-DZyCZta-.mjs} +1 -1
- package/dist/{connector-telemetry-events-CLVpDTIa.mjs → connector-telemetry-events-BP5GTJuQ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-E_1tmNmQ.mjs → connector-telemetry-snapshots-Q9y68rU7.mjs} +1 -1
- package/dist/{connectors-ChJpQFSl.mjs → connectors-C6wEHhyM.mjs} +1 -1
- package/dist/{containers-Cj5-9nUg.mjs → containers-DcR44W-a.mjs} +2 -2
- package/dist/{containers-CzAZfmnj.mjs → containers-f3DbMCIO.mjs} +1 -1
- package/dist/{content-scan-CIA_9PV8.mjs → content-scan-cQbQH1Ko.mjs} +1 -1
- package/dist/{context-DVh8Wyfs.mjs → context-CSjTAJ8s.mjs} +1 -1
- package/dist/{cps-hJkqdsHx.mjs → cps-aDZte41c.mjs} +1 -1
- package/dist/create-BtmuVqVL.mjs +2 -0
- package/dist/{csam-scanner-cCVO3lNF.mjs → csam-scanner-cRaGDmR_.mjs} +1 -1
- package/dist/{custom-csrs-BrTWUZ0c.mjs → custom-csrs-DoAFlLRn.mjs} +1 -1
- package/dist/{custom-hostnames-C4ft77oC.mjs → custom-hostnames-5vHNAJo7.mjs} +1 -1
- package/dist/{custom-nameservers-BWfrZhD1.mjs → custom-nameservers-B7dTZfCW.mjs} +1 -1
- package/dist/{custom-pages-DqTMKtRc.mjs → custom-pages-DsXlaGqQ.mjs} +1 -1
- package/dist/{d1-B58AA9PA.mjs → d1-DZ2JyfdZ.mjs} +3 -3
- package/dist/{delegate-D7yYckA4.mjs → delegate-DzeuzE99.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CEROLAdh.mjs → deploy-CPFnQQOk.mjs} +1 -1
- package/dist/{deploy-context-Do89WayB.mjs → deploy-context-C_YUdUN-.mjs} +1 -1
- package/dist/{deploy-input-DyMuMsi5.mjs → deploy-input-CKQOolPd.mjs} +1 -1
- package/dist/{dev-BaFS7kOM.mjs → dev-rRWAGDV_.mjs} +1 -1
- package/dist/{diagnostics-4gfYj7Pf.mjs → diagnostics-BIuJQRjU.mjs} +1 -1
- package/dist/{dls-ClWVxTBg.mjs → dls-BurMhzEE.mjs} +1 -1
- package/dist/{dns-CML-wxIt.mjs → dns-Dl1VSmFf.mjs} +1 -1
- package/dist/{dns-firewall-CL0b3dJ1.mjs → dns-firewall-BykvgGT1.mjs} +1 -1
- package/dist/{docs-BeYBHwUN.mjs → docs-FllOac9a.mjs} +1 -1
- package/dist/{durable-objects-uZECeq_f.mjs → durable-objects-BNCJA3NE.mjs} +1 -1
- package/dist/{email-auth-CCNW798I.mjs → email-auth-BYvR29qP.mjs} +1 -1
- package/dist/{email-domains-1rD1d84O.mjs → email-domains-C3jG7o39.mjs} +1 -1
- package/dist/{email-routing-CYv-LrbV.mjs → email-routing-BQ7b2KAy.mjs} +1 -1
- package/dist/{email-security-CWEUYPYo.mjs → email-security-CsoNcUfp.mjs} +1 -1
- package/dist/{email-sending-DHSzCfJx.mjs → email-sending-d_b9vyge.mjs} +3 -3
- package/dist/{error-sanitization-DWJ5ka7h.mjs → error-sanitization-ahuAGEjT.mjs} +1 -1
- package/dist/error-sanitization-rodO1WCL.mjs +2 -0
- package/dist/{errors-ol9sMqSe.mjs → errors-DFSWbpd6.mjs} +5 -5
- package/dist/{field-extractors-CuBM_uO4.mjs → field-extractors-Be4UTSz-.mjs} +1 -1
- package/dist/{firewall-SMIUSypF.mjs → firewall-DYGPUErP.mjs} +1 -1
- package/dist/{flagship-D3v6iDdw.mjs → flagship-HIikhoYo.mjs} +1 -1
- package/dist/{fraud-B2f7O15X.mjs → fraud-DNAOkNU5.mjs} +1 -1
- package/dist/get-Be821dio.mjs +2 -0
- package/dist/{google-tag-gateway-BwOc62Gy.mjs → google-tag-gateway-DHvhuTYu.mjs} +1 -1
- package/dist/{healthchecks-BQXHnihB.mjs → healthchecks-BKtoWgF2.mjs} +1 -1
- package/dist/{hyperdrive-Bd6Yfje3.mjs → hyperdrive-DQrmkuSh.mjs} +1 -1
- package/dist/{iam-qJPI1_aZ.mjs → iam-BEs1Geob.mjs} +1 -1
- package/dist/{images-goHZJOxy.mjs → images-D55kUS0m.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-CVx0Ya1E.mjs → init-BTXSeUaj.mjs} +1 -1
- package/dist/{intel-CwiqwJI9.mjs → intel-BDbanlya.mjs} +1 -1
- package/dist/{internal-5cnlw9mH.mjs → internal-Cj_Wo6sr.mjs} +1 -1
- package/dist/{ips-KBxmXhvO.mjs → ips-CHrG3mwW.mjs} +1 -1
- package/dist/{k2-KhIP5NFT.mjs → k2-CJzI3dVt.mjs} +1 -1
- package/dist/{kv-CCem2sEY.mjs → kv-BjfDMxOg.mjs} +1 -1
- package/dist/{lazy-command-BMhD5ffF.mjs → lazy-command-DkI_21Dt.mjs} +1 -1
- package/dist/{leaked-credential-checks-BkPZiwE2.mjs → leaked-credential-checks-BHe-erAg.mjs} +1 -1
- package/dist/{live-BhHzxFna.mjs → live-DSwOLngp.mjs} +1 -1
- package/dist/{load-balancers-17GBXdju.mjs → load-balancers-CWNEVfum.mjs} +1 -1
- package/dist/{login-Buhvx6Fi.mjs → login-CJYJE6Ae.mjs} +1 -1
- package/dist/login-D2Bf_HMY.mjs +2 -0
- package/dist/{logpush-BCCUxa4J.mjs → logpush-BQhzhkBY.mjs} +1 -1
- package/dist/{logs-4CwupKRG.mjs → logs-DndNcbrR.mjs} +1 -1
- package/dist/{magic-cloud-networking-Xy6SC-V-.mjs → magic-cloud-networking-XmIKU6F1.mjs} +1 -1
- package/dist/{magic-network-monitoring-B8pRZp2g.mjs → magic-network-monitoring-BgPLcQzT.mjs} +1 -1
- package/dist/{magic-transit-CwfO3OOX.mjs → magic-transit-C2kLj1Hd.mjs} +1 -1
- package/dist/{managed-defense-CtFLuvuB.mjs → managed-defense-Bq63Exyv.mjs} +1 -1
- package/dist/{managed-transforms-Hto8OCBS.mjs → managed-transforms-Bz3Q6vSk.mjs} +1 -1
- package/dist/{mcp-SQ0MAVUJ.mjs → mcp-IiegTI5c.mjs} +1 -1
- package/dist/{mesh-C8A6tVqA.mjs → mesh-C7sj3FL4.mjs} +1 -1
- package/dist/{migrate-Dufxsb_F.mjs → migrate-D7pH9_Y8.mjs} +1 -1
- package/dist/{monetization-CYVaCAe9.mjs → monetization-DvfqZhGk.mjs} +1 -1
- package/dist/{network-CJBTdEM3.mjs → network-CnqNYoOf.mjs} +1 -1
- package/dist/{network-interconnects-CKlNFj3i.mjs → network-interconnects-BXftLikd.mjs} +1 -1
- package/dist/{o11y-5x2Q8CWm.mjs → o11y-1Qku543b.mjs} +1 -1
- package/dist/{oauth-BN6_FpYp.mjs → oauth-B-SYl8nR.mjs} +1 -1
- package/dist/{oauth-D_A8AcIS.mjs → oauth-C6uYSFM5.mjs} +1 -1
- package/dist/{oauth-clients-qKXg8ZH3.mjs → oauth-clients-DXNO-K_e.mjs} +1 -1
- package/dist/{oauth-scopes-Ct1jDyC5.mjs → oauth-scopes-WxoyDblU.mjs} +1 -1
- package/dist/{organization-lBQSeqS1.mjs → organization-HBQnzh8z.mjs} +1 -1
- package/dist/{organizations-DEX8Er3g.mjs → organizations-DvS-ENN2.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DUsxVGCs.mjs → origin-post-quantum-encryption-BnjX0dCp.mjs} +1 -1
- package/dist/package-DAB8HAGn.mjs +2 -0
- package/dist/{page-rules-BMt6nt03.mjs → page-rules-CypVq1Wb.mjs} +1 -1
- package/dist/{pages-Jxa92ECz.mjs → pages-BxLbPYIf.mjs} +1 -1
- package/dist/{pay-per-crawl-Cv0044CZ.mjs → pay-per-crawl-KidGhWnn.mjs} +1 -1
- package/dist/{pay-per-use-DGEeG-dC.mjs → pay-per-use-DcsdwXr7.mjs} +1 -1
- package/dist/{pipelines-CEC78A3w.mjs → pipelines-CX7esgh3.mjs} +1 -1
- package/dist/{precursor-Ba0Ejhzt.mjs → precursor-BzDcAmUT.mjs} +1 -1
- package/dist/{previews-DnZbUTym.mjs → previews-B7MZKZK6.mjs} +1 -1
- package/dist/{progress-CtGsPOpV.mjs → progress-BcjUdm_B.mjs} +1 -1
- package/dist/{prompt-YrI7ltMa.mjs → prompt-BFRinxR0.mjs} +1 -1
- package/dist/{queues-Chq997uj.mjs → queues-mSjNdJNl.mjs} +1 -1
- package/dist/{r2-BFgZDs-F.mjs → r2-ClBc0jT0.mjs} +1 -1
- package/dist/{radar-DJdDzLJw.mjs → radar-C9GwykGn.mjs} +1 -1
- package/dist/{raw-fetch-BE3QgdTE.mjs → raw-fetch-BO0VqOVx.mjs} +1 -1
- package/dist/{ready-Cok0aqke.mjs → ready-DhdeN4ga.mjs} +1 -1
- package/dist/{realtime-BHWWCiKp.mjs → realtime-9V5zWcij.mjs} +73 -71
- package/dist/{registrar-9Y-1IQ0n.mjs → registrar-DsI2A62h.mjs} +1 -1
- package/dist/{registrar-sandbox-DTS1kRnb.mjs → registrar-sandbox-DcjFW26g.mjs} +1 -1
- package/dist/{reporting-D5RbKQJf.mjs → reporting-pAQ3jvEO.mjs} +1 -1
- package/dist/{request-headers-KhW_hy36.mjs → request-headers-DFPlTFRf.mjs} +1 -1
- package/dist/{request-tracers-wxWCjmHo.mjs → request-tracers-CQqdbHj8.mjs} +1 -1
- package/dist/{resource-sharing-BGoaVvJa.mjs → resource-sharing-BJraifhD.mjs} +1 -1
- package/dist/{rules-Cd3EjhdF.mjs → rules-B_Mopjel.mjs} +1 -1
- package/dist/{rulesets-Bnz3rSBT.mjs → rulesets-DRV0HtYz.mjs} +1 -1
- package/dist/{rum-CK9HEe3O.mjs → rum-D5dYq2Uy.mjs} +1 -1
- package/dist/{run-DnZGQbq_.mjs → run--9dxcon4.mjs} +1 -1
- package/dist/run-BUebYPOn.mjs +2 -0
- package/dist/{schema-flags-BrDlFwLv.mjs → schema-flags-blYVIAUK.mjs} +1 -1
- package/dist/{scim-UdqaWnOu.mjs → scim-C91WGj_g.mjs} +1 -1
- package/dist/{secrets-store-Bf5v96LC.mjs → secrets-store-D4Zr-fuz.mjs} +3 -3
- package/dist/{security-insights-BAGySlGu.mjs → security-insights-DJWdVax5.mjs} +1 -1
- package/dist/{security-txt-D0fMmjHs.mjs → security-txt-B0NLFJNk.mjs} +1 -1
- package/dist/{session-6xqrJWXy.mjs → session-Bafy81hj.mjs} +1 -1
- package/dist/{shared-DYRRG9A-.mjs → shared-rCcn7D66.mjs} +1 -1
- package/dist/{signed-url-Ce0muRem.mjs → signed-url-DBf_p7Wf.mjs} +1 -1
- package/dist/{smart-shield-CCy7_M3j.mjs → smart-shield-BufLvdU3.mjs} +1 -1
- package/dist/{snippets-Bc8m3HSV.mjs → snippets-DA2Gk50m.mjs} +1 -1
- package/dist/{spawn-BAEdy9kS.mjs → spawn-hrdbxnm1.mjs} +1 -1
- package/dist/{spectrum-DtNX8WBX.mjs → spectrum-DlI8qtVo.mjs} +1 -1
- package/dist/{speed-TbkeWV_x.mjs → speed-DNwm5gYl.mjs} +1 -1
- package/dist/{sql-DI319y25.mjs → sql-aBDdRWdd.mjs} +1 -1
- package/dist/{src-Dc6ojwUW.mjs → src-4-uZcDN_.mjs} +5 -5
- package/dist/{ssl-D0MIzFl2.mjs → ssl-DEDucWlo.mjs} +1 -1
- package/dist/{stream-4Mrb8HEo.mjs → stream-DGv9Bssl.mjs} +1 -1
- package/dist/{tags-BP25qydR.mjs → tags-CNBA4Pf1.mjs} +1 -1
- package/dist/telemetry-THz8wtoW.mjs +2 -0
- package/dist/{telemetry-DKSJSLtq.mjs → telemetry-klBrZrC7.mjs} +1 -1
- package/dist/{tenant-jmfZqEZ4.mjs → tenant-DVtqafWB.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BzVP85Tq.mjs → tenant-custom-nameservers-CtrqQc_i.mjs} +1 -1
- package/dist/{tunnels-BNswR1Dj.mjs → tunnels-Bc_r--ln.mjs} +2 -2
- package/dist/{turnstile-BgsTP2fz.mjs → turnstile-Cr2cTE0C.mjs} +1 -1
- package/dist/ui-DvC7Qa0H.mjs +2 -0
- package/dist/{update-check-BOF1hn_I.mjs → update-check-B5V9BBM7.mjs} +1 -1
- package/dist/{update-check-C7mfEeQ7.mjs → update-check-C5bJ4-Ef.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-Bqrs4-2F.mjs → url-normalization-D6r0sLRj.mjs} +1 -1
- package/dist/{url-scanner-Dm4Fps5T.mjs → url-scanner-D4u7jbzf.mjs} +1 -1
- package/dist/{user-u_LxzLM4.mjs → user-DhWPKWo0.mjs} +1 -1
- package/dist/{vectorize-DLGiOyd4.mjs → vectorize-CB9IjpC3.mjs} +1 -1
- package/dist/version-Dp7G_dM6.mjs +2 -0
- package/dist/{waiting-rooms-DmgJgJXb.mjs → waiting-rooms-BYlwhzgD.mjs} +1 -1
- package/dist/{web-assets-rNhZWP-6.mjs → web-assets-Nn2HArqh.mjs} +1 -1
- package/dist/{web3-BVBdFt8E.mjs → web3-DpJNkFNQ.mjs} +1 -1
- package/dist/{workers-CjUKJvH8.mjs → workers-BkNt1wSN.mjs} +2 -2
- package/dist/{workers-builds-D3Q97l7X.mjs → workers-builds-BL3dK2R3.mjs} +1 -1
- package/dist/{workers-for-platforms-C_fcw30y.mjs → workers-for-platforms-CAQLG6dE.mjs} +1 -1
- package/dist/{workers-vpc-CnRO3Stc.mjs → workers-vpc-WnRec8oo.mjs} +1 -1
- package/dist/{workflows-cpHFe5v6.mjs → workflows-DpXBMizW.mjs} +1 -1
- package/dist/{wrangler-migration-DQehjmoh.mjs → wrangler-migration-__jrVjrp.mjs} +1 -1
- package/dist/{zaraz-BRj0J7vK.mjs → zaraz-hWisKRaN.mjs} +1 -1
- package/dist/{zero-trust-CVZKDLCB.mjs → zero-trust-DiZhiSa4.mjs} +37 -37
- package/dist/{zone-N6ccK70C.mjs → zone-D7b949er.mjs} +1 -1
- package/dist/{zones-C4S_kpGz.mjs → zones-giCZ0LO8.mjs} +1 -1
- package/package.json +1 -1
- package/dist/agent-context-DFEgYjEQ.mjs +0 -2
- package/dist/api-eMuS5GI1.mjs +0 -3
- package/dist/auth-B0lEsD_1.mjs +0 -2
- package/dist/blocks-BOQH-Won.mjs +0 -5
- package/dist/build-BqGmiORA.mjs +0 -2
- package/dist/cloudforce-one-D20t9ojD.mjs +0 -370
- package/dist/create-OXylMu6m.mjs +0 -2
- package/dist/error-sanitization-Byb-_IS9.mjs +0 -2
- package/dist/get-iPUHxD1r.mjs +0 -2
- package/dist/login-BTiflOun.mjs +0 -2
- package/dist/package-BqSbnt6u.mjs +0 -2
- package/dist/run-Be6Js7D6.mjs +0 -2
- package/dist/telemetry-CvZean4s.mjs +0 -2
- package/dist/ui-Bo6DCvbS.mjs +0 -2
- package/dist/version-DmTuWNZ5.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-BFRinxR0.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store`,body:`json`};function p(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 m={command:`create`,describe:`Upload Custom Origin Trust Store`,builder:p,handler:async e=>o({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({certificate:l(e.certificate,`certificate`,`text`)}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(f,{body:t,zone_id:d}));r(n,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await u(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let p=c({certificate:l(e.certificate,`certificate`,`text`)}),m=await a(`Creating`,async()=>o.send(f,{body:p,zone_id:d}));r(m,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store/${t.custom_origin_trust_store_id}`};function g(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"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-BFRinxR0.mjs";import{n as ee,t as te}from"./raw-fetch-BO0VqOVx.mjs";var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function y(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 ne={command:`delete <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:y,handler:async e=>u({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/accounts/${e[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(e[`member-account-id`]))}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``),"member-account-id":String(e[`member-account-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(v,{account_id:a,address_map_id:e[`address-map-id`],member_account_id:e[`member-account-id`]}));s(u,{successLabel:`Deleted`})})};var re={method:`PUT`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function ie(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const e=/* @__PURE__ */ new Set([``,`0`,`false`,`no`,`off`]);function t(t,n){let r=t[n];if(typeof r!=`string`)return;let i=r.trim();return e.has(i.toLowerCase())?void 0:i}function n(e,t,n){return e[t]===n}function r(e,t,n){return t&&e.push(n),t}function i(e,t,n={}){return{harness:e,...n,signals:t}}const a=[e=>n(e,`OPENCODE`,`1`)?i({id:`opencode`,name:`OpenCode`},[`OPENCODE`]):null,e=>{let n=t(e,`QWEN_CODE_SESSION_ID`);if(!n)return null;let r=[`QWEN_CODE_SESSION_ID`],a=t(e,`QWEN_CODE_MODEL`),o=t(e,`QWEN_CODE_AGENT_ID`),s=t(e,`QWEN_CODE_PROMPT_ID`);return a&&r.push(`QWEN_CODE_MODEL`),o&&r.push(`QWEN_CODE_AGENT_ID`),s&&r.push(`QWEN_CODE_PROMPT_ID`),i({id:`qwen-code`,name:`Qwen Code`},r,{model:a?{id:a}:void 0,sessionId:n,invocationId:o??s})},e=>{let a=[],o=r(a,n(e,`PI_CODING_AGENT`,`true`),`PI_CODING_AGENT`),s=r(a,n(e,`AI_AGENT`,`pi`),`AI_AGENT`);if(!o&&!s)return null;let c=t(e,`PI_SESSION_ID`),l=t(e,`PI_PROVIDER`),u=t(e,`PI_MODEL`);return c&&a.push(`PI_SESSION_ID`),l&&a.push(`PI_PROVIDER`),u&&a.push(`PI_MODEL`),i({id:`pi`,name:`Pi`},a,{model:u?{id:u,provider:l}:void 0,sessionId:c})},e=>{if(!n(e,`DSH_SHELL`,`1`))return null;let r=[`DSH_SHELL`],a=t(e,`DSH_SESSION_ID`);return a&&r.push(`DSH_SESSION_ID`),i({id:`deepseek-harness`,name:`DeepSeek Harness`},r,{sessionId:a})},e=>{if(!n(e,`CURSOR_AGENT`,`1`))return null;let r=[`CURSOR_AGENT`],a=t(e,`CURSOR_CONVERSATION_ID`),o=t(e,`CURSOR_TRACE_ID`);return a&&r.push(`CURSOR_CONVERSATION_ID`),o&&r.push(`CURSOR_TRACE_ID`),i({id:`cursor-agent`,name:`Cursor Agent`},r,{sessionId:a,invocationId:o})},e=>{if(!n(e,`CLAUDECODE`,`1`))return null;let r=[`CLAUDECODE`],a=t(e,`CLAUDE_CODE_SESSION_ID`);return a&&r.push(`CLAUDE_CODE_SESSION_ID`),i({id:`claude-code`,name:`Claude Code`},r,{sessionId:a})},e=>{let n=t(e,`CODEX_THREAD_ID`);return n?i({id:`codex`,name:`OpenAI Codex`},[`CODEX_THREAD_ID`],{sessionId:n}):null},e=>{let n=t(e,`AMP_CURRENT_THREAD_ID`);return n?i({id:`amp`,name:`Amp`},[`AMP_CURRENT_THREAD_ID`],{sessionId:n}):null},e=>n(e,`GEMINI_CLI`,`1`)?i({id:`gemini-agent`,name:`Gemini CLI`},[`GEMINI_CLI`]):null,e=>n(e,`AUGMENT_AGENT`,`1`)?i({id:`auggie`,name:`Auggie`},[`AUGMENT_AGENT`]):null,e=>{let t=[],a=r(t,n(e,`CRUSH`,`1`),`CRUSH`),o=r(t,n(e,`AI_AGENT`,`crush`),`AI_AGENT`);return a||o?i({id:`crush`,name:`Crush`},t):null},e=>{let t=[],a=r(t,n(e,`AI_AGENT`,`github_copilot_vscode_agent`),`AI_AGENT`),o=r(t,n(e,`COPILOT_AGENT`,`1`),`COPILOT_AGENT`);return a||o?i({id:`vscode-copilot-agent`,name:`GitHub Copilot in VS Code`,surface:`vscode`},t):null},e=>{let n=t(e,`OZ_RUN_ID`);return n?i({id:`warp`,name:`Warp`},[`OZ_RUN_ID`],{sessionId:n}):null}];function o(e=process.env,t=a){let n=[];for(let r of t)try{let t=r(e);t&&n.push(t)}catch{}return{isAgentic:n.length>0,harness:n[0]?.harness??null,model:n.find(e=>e.model)?.model??null,sessionId:n.find(e=>e.sessionId)?.sessionId??null,invocationId:n.find(e=>e.invocationId)?.invocationId??null,matches:n}}export{o as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-BFRinxR0.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces`,body:`json`};function g(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 _={command:`create-namespace`,describe:`Create a namespace`,builder:g,handler:async e=>c({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Namespace name.`));let m=d({name:f(e.name,`name`,`text`)}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:l}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces/${t.namespace_name}/profiles/${t.profile_name}/memories/${t.memory_id}`};function y(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-BGHWSKCw.mjs";import"./api-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./api-X3wKppsT.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{n,t as r}from"./local-CSH3UMpD.mjs";import{a as i,i as a,n as o}from"./auth-BlWCu-YH.mjs";import{a as s,t as c}from"./context-CSjTAJ8s.mjs";import{t as l}from"./output-BJEgbI0G.mjs";import{t as u}from"./dry-run-gy0Hl9xo.mjs";import{t as d}from"./progress-BcjUdm_B.mjs";import{n as f,t as p}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as m,t as h}from"./body-parser-ChnyBsfm.mjs";import{n as g,t as _}from"./input-validation-D7z60HJH.mjs";import{a as v,i as ee,n as te}from"./prompt-BFRinxR0.mjs";import{n as ne}from"./raw-fetch-BO0VqOVx.mjs";import{_ as re,c as y,d as b,f as x,g as ie,h as ae,i as oe,l as S,m as se,n as ce,o as C,p as w,r as T,s as E,t as D}from"./schema-flags-blYVIAUK.mjs";var O={method:`GET`,path:e=>t`/accounts/${e.account_id}/ai/authors/search`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 ai authors list
|
|
3
3
|
|
|
4
4
|
Searches Workers AI models by author or organization name.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Author Search`,builder:k,handler:async e=>p({command:`ai authors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();u({command:`cf ai authors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/ai/authors/search`,pathParams:{},bodyKind:`none`});return}let t=await o(e),n=e.local?r:await c();e.accountId=n;let i=await d(`Loading`,async()=>t.send(O,{account_id:n}));l(i,{successLabel:`Loaded`})})},j={command:`authors`,describe:`Operations for authors`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 ai finetunes assets create <finetune-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-BlWCu-YH.mjs";import{i as r}from"./context-CSjTAJ8s.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-BcjUdm_B.mjs";import{t as s}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as c}from"./body-parser-ChnyBsfm.mjs";function l(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 u={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:l,handler:async e=>s({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>25){let r=Math.ceil(n.length/25),a=null;for(let i=0;i<n.length;i+=25){let c=n.slice(i,i+25),l=Math.floor(i/25)+1;a=await o(`Loading: batch ${l}/${r}`,async()=>t(s,`POST`,`/zones/${e.zoneId}/ai-audit/robots/bulk`,{body:c}))}i(a,{successLabel:`Loaded`});return}let r=await o(`Loading`,async()=>t(s,`POST`,`/zones/${e.zoneId}/ai-audit/robots/bulk`,{body:n}));i(r,{successLabel:`Loaded`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-audit/robots`,query:[`subdomain`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage(`$0 ai-audit robots get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-BFRinxR0.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/custom-domains`,body:`json`,errors:{400:`BadRequestError`}};function y(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`]}).coerce(`min-tls`,e=>h(e,`min-tls`,`text`)).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 b={command:`create <gateway-id>`,describe:`Create a custom domain for a gateway`,builder:y,handler:async e=>l({command:`ai-gateway custom-domains create`,classification:{safeFlags:[`min-tls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf ai-gateway custom-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(e[`gateway-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({domain:h(e.domain,`domain`,`text`),minTLS:e[`min-tls`],zone_id:h(e[`zone-id`],`zone-id`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(v,{body:t,account_id:l,gateway_id:e[`gateway-id`]}));o(r,{successLabel:`Created`});return}e.domain===void 0&&(e.domain=await g(`domain`,"Custom hostname that you own, such as `ai.example.com`.")),e[`zone-id`]===void 0&&(e[`zone-id`]=await g(`zone-id`,`ID of the Cloudflare zone that contains the custom hostname.`));let u=m({domain:h(e.domain,`domain`,`text`),minTLS:e[`min-tls`],zone_id:h(e[`zone-id`],`zone-id`,`text`)}),f=await c(`Creating`,async()=>n.send(v,{body:u,account_id:l,gateway_id:e[`gateway-id`]}));o(f,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/custom-domains/${t.hostname}`,errors:{404:`NotFoundError`}};function S(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"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-ChnyBsfm.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-BFRinxR0.mjs";import{n as ee,t as te}from"./raw-fetch-BO0VqOVx.mjs";function ne(e){return e.usage(`$0 ai-search chat-completions <instance-id>
|
|
3
3
|
|
|
4
4
|
Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`instance-id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`namespace`,{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`]}).coerce(`ai-search-options-cache-cache-threshold`,e=>h(e,`ai-search-options-cache-cache-threshold`,`text`)).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-custom-metadata`,{type:`string`,description:`Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'. Provide as a JSON object or @path/to/file.json.`}).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-boost-by`,{type:`string`,description:`Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-filters`,{type:`string`,description:`The ai_search_options.retrieval.filters field. Provide as a JSON object or @path/to/file.json.`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).coerce(`ai-search-options-retrieval-fusion-method`,e=>h(e,`ai-search-options-retrieval-fusion-method`,`text`)).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).coerce(`ai-search-options-retrieval-keyword-match-mode`,e=>h(e,`ai-search-options-retrieval-keyword-match-mode`,`text`)).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`Minimum similarity score a chunk must reach to be returned. When omitted, falls back to the instance-level score_threshold, then to 0.4.`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`Maximum number of results to return. When omitted, falls back to the instance-level max_num_results, then to 10.`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).coerce(`ai-search-options-retrieval-retrieval-type`,e=>h(e,`ai-search-options-retrieval-retrieval-type`,`text`)).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 re={command:`chat-completions <instance-id>`,describe:`Chat Completions`,builder:ne,handler:async e=>l({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`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-search/namespaces/${e.namespace==null?`<namespace>`:encodeURIComponent(String(e.namespace))}/instances/${e[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(e[`instance-id`]))}/chat/completions`,pathParams:{namespace:String(e.namespace??``),"instance-id":String(e[`instance-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({ai_search_options:{cache:{cache_threshold:e[`ai-search-options-cache-cache-threshold`],enabled:e[`ai-search-options-cache-enabled`]},custom_metadata:f(e[`ai-search-options-custom-metadata`],`ai-search-options-custom-metadata`),query_rewrite:{enabled:e[`ai-search-options-query-rewrite-enabled`],model:h(e[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:h(e[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:e[`ai-search-options-reranking-enabled`],match_threshold:e[`ai-search-options-reranking-match-threshold`],model:h(e[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{boost_by:u(e[`ai-search-options-retrieval-boost-by`],`ai-search-options-retrieval-boost-by`),context_expansion:e[`ai-search-options-retrieval-context-expansion`],filters:f(e[`ai-search-options-retrieval-filters`],`ai-search-options-retrieval-filters`),fusion_method:e[`ai-search-options-retrieval-fusion-method`],keyword_match_mode:e[`ai-search-options-retrieval-keyword-match-mode`],match_threshold:e[`ai-search-options-retrieval-match-threshold`],max_num_results:e[`ai-search-options-retrieval-max-num-results`],retrieval_type:e[`ai-search-options-retrieval-retrieval-type`],return_on_failure:e[`ai-search-options-retrieval-return-on-failure`]}},messages:u(e.messages,`messages`),model:h(e.model,`model`,`text`),stream:e.stream},[[`ai_search_options`,`custom_metadata`],[`ai_search_options`,`retrieval`,`filters`]]):d(e.body)});return}let l=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${g}/ai-search/namespaces/${encodeURIComponent(String(e.namespace))}/instances/${encodeURIComponent(String(e[`instance-id`]))}/chat/completions`,{body:t}));o(r,{successLabel:`Created`});return}if(e.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let _={};e[`ai-search-options-cache-cache-threshold`]!==void 0&&p(_,[`ai_search_options`,`cache`,`cache_threshold`],e[`ai-search-options-cache-cache-threshold`]),e[`ai-search-options-cache-enabled`]!==void 0&&p(_,[`ai_search_options`,`cache`,`enabled`],e[`ai-search-options-cache-enabled`]),e[`ai-search-options-custom-metadata`]!==void 0&&p(_,[`ai_search_options`,`custom_metadata`],f(e[`ai-search-options-custom-metadata`],`ai-search-options-custom-metadata`)),e[`ai-search-options-query-rewrite-enabled`]!==void 0&&p(_,[`ai_search_options`,`query_rewrite`,`enabled`],e[`ai-search-options-query-rewrite-enabled`]),e[`ai-search-options-query-rewrite-model`]!==void 0&&p(_,[`ai_search_options`,`query_rewrite`,`model`],h(e[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`)),e[`ai-search-options-query-rewrite-rewrite-prompt`]!==void 0&&p(_,[`ai_search_options`,`query_rewrite`,`rewrite_prompt`],h(e[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)),e[`ai-search-options-reranking-enabled`]!==void 0&&p(_,[`ai_search_options`,`reranking`,`enabled`],e[`ai-search-options-reranking-enabled`]),e[`ai-search-options-reranking-match-threshold`]!==void 0&&p(_,[`ai_search_options`,`reranking`,`match_threshold`],e[`ai-search-options-reranking-match-threshold`]),e[`ai-search-options-reranking-model`]!==void 0&&p(_,[`ai_search_options`,`reranking`,`model`],h(e[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)),e[`ai-search-options-retrieval-boost-by`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`boost_by`],u(e[`ai-search-options-retrieval-boost-by`],`ai-search-options-retrieval-boost-by`)),e[`ai-search-options-retrieval-context-expansion`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`context_expansion`],e[`ai-search-options-retrieval-context-expansion`]),e[`ai-search-options-retrieval-filters`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`filters`],f(e[`ai-search-options-retrieval-filters`],`ai-search-options-retrieval-filters`)),e[`ai-search-options-retrieval-fusion-method`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`fusion_method`],e[`ai-search-options-retrieval-fusion-method`]),e[`ai-search-options-retrieval-keyword-match-mode`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`keyword_match_mode`],e[`ai-search-options-retrieval-keyword-match-mode`]),e[`ai-search-options-retrieval-match-threshold`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`match_threshold`],e[`ai-search-options-retrieval-match-threshold`]),e[`ai-search-options-retrieval-max-num-results`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`max_num_results`],e[`ai-search-options-retrieval-max-num-results`]),e[`ai-search-options-retrieval-retrieval-type`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`retrieval_type`],e[`ai-search-options-retrieval-retrieval-type`]),e[`ai-search-options-retrieval-return-on-failure`]!==void 0&&p(_,[`ai_search_options`,`retrieval`,`return_on_failure`],e[`ai-search-options-retrieval-return-on-failure`]),e.messages!==void 0&&p(_,[`messages`],u(e.messages,`messages`)),e.model!==void 0&&p(_,[`model`],h(e.model,`model`,`text`)),e.stream!==void 0&&p(_,[`stream`],e.stream);let v=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${g}/ai-search/namespaces/${encodeURIComponent(String(e.namespace))}/instances/${encodeURIComponent(String(e[`instance-id`]))}/chat/completions`,{body:_}));o(v,{successLabel:`Created`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/ai-search/namespaces/${t.namespace}/instances`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,503:`ServiceUnavailableError`}};function x(e){return e.usage(`$0 ai-search create <namespace> <id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BlWCu-YH.mjs";import{i as n}from"./context-CSjTAJ8s.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-BcjUdm_B.mjs";import{t as o}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-BFRinxR0.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(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 p={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:f,handler:async e=>o({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`,body:`json`};function h(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 g={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:h,handler:async e=>o({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({topics:s(e.topics,`topics`)}):c(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,!await u({force:!!e.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`}))return;if(e.body){let t=c(e.body),n=await a(`Deleting`,async()=>o.send(m,{body:t,zone_id:d}));r(n,{successLabel:`Deleted`});return}let f=l({topics:s(e.topics,`topics`)}),p=await a(`Deleting`,async()=>o.send(m,{body:f,zone_id:d}));r(p,{successLabel:`Deleted`})})},_={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`};function y(e){return e.usage(`$0 ai-security get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-BFRinxR0.mjs";import{n as g,t as _}from"./raw-fetch-BO0VqOVx.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(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 ee={command:`list`,describe:`Get Alert Types`,builder:y,handler:async e=>c({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));a(u,{successLabel:`Loaded`})})},te={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/eligible`};function re(e){return e.usage(`$0 alerting destinations eligible get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m}from"./prompt-BFRinxR0.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(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 _={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:g,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(h,{zone_id:r}));o(a,{successLabel:`Loaded`})})},v={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency`,query:[`bins`]};function b(e){return e.usage(`$0 analytics latency get
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as u,t as d}from"./input-validation-D7z60HJH.mjs";var f={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics_engine/sql`,errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,429:`TooManyRequestsError`,500:`InternalServerError`,503:`ServiceUnavailableError`,504:`GatewayTimeoutError`}};function p(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 m={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:p,handler:async e=>l({command:`analytics-engine sql query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf analytics-engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:e.body});return}let l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.file){let t=d(e.file),r=await c(`Loading`,async()=>n(l,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));o(r,{successLabel:`Loaded`});return}if(e.body){let t=u(e.body,`body`,`binary`),r=await c(`Loading`,async()=>n(l,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));o(r,{successLabel:`Loaded`});return}let m=await c(`Loading`,async()=>l.send(f,{account_id:p}));o(m,{successLabel:`Loaded`})})},h={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`analytics-engine`,describe:`analytics-engine`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function e(e){return{headers:e.headers,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url}}const t={headers:new Headers,redirected:!1,status:499,statusText:`Client Closed Request`,type:`error`,url:``},n={headers:new Headers,redirected:!1,status:0,statusText:`Unknown Error`,type:`error`,url:``};function r({message:e,statusCode:t,body:n}){let r=[];return e!=null&&r.push(e),t!=null&&r.push(`Status code: ${t.toString()}`),n!=null&&r.push(`Body: ${JSON.stringify(n,void 0,2)}`),r.join(`
|
|
3
|
+
`)}var i=class extends Error{statusCode;body;rawResponse;constructor(e){super(r(e)),Object.setPrototypeOf(this,new.target.prototype),this.name=`ApiError`,this.statusCode=e.statusCode,this.body=e.body,this.rawResponse=e.rawResponse,e.cause!==void 0&&e.cause!==null&&Object.defineProperty(this,"cause",{value:e.cause,writable:!0,configurable:!0})}get requestId(){return this.rawResponse?.headers?.get(`x-request-id`)??void 0}},a=class extends i{constructor(e,t){super({message:e,cause:t?.cause}),Object.setPrototypeOf(this,new.target.prototype),this.name=`ApiTimeoutError`}};function o(e,t,n,r){let a=new i({message:e,statusCode:t,body:n,rawResponse:r});return a.name=e,a}function s(e){if(!e)return e;let t=+!!e.startsWith(`/`),n=e.endsWith(`/`)?e.length-1:e.length;return t===0&&n===e.length?e:e.slice(t,n)}function c(e,t){return e.endsWith(`/`)?e+t:`${e}/${t}`}function l(e,t){let n=e;for(let e of t){let t=s(e);t&&(n=c(n,t))}return t.at(-1)?.endsWith(`/`)&&!n.endsWith(`/`)&&(n+=`/`),n}function u(e,...t){if(!e)return``;if(t.length===0)return e;if(!e.includes(`://`))return l(e,t);let n;try{n=new URL(e)}catch{return l(e,t)}for(let e of t){let t=s(e);t&&(n.pathname=c(n.pathname,t))}return t.at(-1)?.endsWith(`/`)&&!n.pathname.endsWith(`/`)&&(n.pathname+=`/`),n.toString()}function d(e){return e==null?``:encodeURIComponent(String(e))}function f(e,t,n){let r=[];for(let[i,a]of Object.entries(e)){let e=t?`${t}[${i}]`:i;if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;if(n){let t=a.filter(e=>e!=null).map(d);t.length>0&&r.push(`${encodeURIComponent(e)}=${t.join(`,`)}`);continue}for(let t of a)t!=null&&(typeof t==`object`&&!Array.isArray(t)?r.push(...f(t,e,n)):r.push(`${encodeURIComponent(e)}=${d(t)}`))}else if(typeof a==`object`){if(Object.keys(a).length===0)continue;r.push(...f(a,e,n))}else r.push(`${encodeURIComponent(e)}=${d(a)}`)}}return r}function p(e,t=[]){let n=/* @__PURE__ */ new Map;for(let[t,r]of e){if(r==null)continue;let e=f({[t]:r},``,!1).join(`&`);e.length>0&&n.set(t,e)}for(let[r,i]of e){if(!t.includes(r)||i==null)continue;let e=f({[r]:i},``,!0).join(`&`);e.length>0&&n.set(r,e)}return[...n.values()].join(`&`)}function m(t,n){if(typeof t!=`object`||!t||Array.isArray(t)||!(`success`in t))return t;let r=e=>Reflect.get(t,e);if(r(`success`)===!1){let a=r(`errors`),o=(Array.isArray(a)?a:[]).map(e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`&&`message`in e){let t=Reflect.get(e,`message`);return typeof t==`string`?t:void 0}}).filter(e=>typeof e==`string`&&e.length>0).join(`, `)||`Cloudflare API request failed`,s=new i({message:o,statusCode:n?.ok===!1?n.status:void 0,body:t,rawResponse:n?e(n):void 0});throw s.name=`ApiEnvelopeError`,s.message=o,s}if(!(`result`in t))return t;let a=r(`result`);return Array.isArray(a)?{result:a,result_info:r(`result_info`)}:a}function h(e){let t={get bodyUsed(){return e.bodyUsed},stream:()=>e.body,arrayBuffer:e.arrayBuffer.bind(e),blob:e.blob.bind(e)};return`bytes`in e&&typeof e.bytes==`function`&&(t.bytes=e.bytes.bind(e)),t}async function g(e,t){if(t===`binary-response`)return h(e);if(t===`text`)return await e.text();let n=await e.text();if(n.length===0)return;let r;try{r=JSON.parse(n)}catch{return{ok:!1,error:{reason:`non-json`,statusCode:e.status,rawBody:n}}}return m(r,e)}const _=/* @__PURE__ */ new Set([`application/hal+json`,`application/json`,`application/ld+json`,`application/problem+json`,`application/vnd.api+json`,`text/json`]);async function v(e){let t=e.headers.get(`Content-Type`)?.toLowerCase();if(t==null||t.length===0)return g(e);if(t.includes(`;`)&&(t=t.split(`;`)[0]?.trim()??``),_.has(t)||t.startsWith(`application/vnd.`)&&t.endsWith(`+json`)){let t=await e.text();return t.length>0?JSON.parse(t):void 0}return await e.text()}function y(e){let t=new AbortController;for(let n of e)if(n.aborted||(n.addEventListener(`abort`,()=>t.abort(n.reason),{signal:t.signal}),n.aborted))return t.abort(n.reason),t.signal;return t.signal}async function b(e,t,n,r,i){let a=[],o;if(r!==void 0){let e=new AbortController;o=setTimeout(()=>e.abort(`timeout`),r),a.push(e.signal)}i!==void 0&&a.push(i);try{return await e(t,{...n,signal:y(a)})}finally{o!==void 0&&clearTimeout(o)}}const x=[408,429,502,503,504];function S(e,t){let n=e.headers.get(`Retry-After`);if(n){let e=parseInt(n,10);if(!Number.isNaN(e)&&e>0)return Math.min(e*1e3,6e4);let t=new Date(n);if(!Number.isNaN(t.getTime())){let e=t.getTime()-Date.now();if(e>0)return Math.min(e,6e4)}}let r=e.headers.get(`X-RateLimit-Reset`);if(r){let e=parseInt(r,10);if(!Number.isNaN(e)){let t=e*1e3-Date.now();if(t>0)return Math.min(t,6e4)*(1+Math.random()*.2)}}return Math.min(1e3*2**t,6e4)*(1+(Math.random()-.5)*.2)}async function C(e,t,n,r){let i=await b(e,t,n,r.timeoutMs,r.signal);for(let a=0;a<(r.maxRetries??2)&&x.includes(i.status);a++)await new Promise(e=>setTimeout(e,S(i,a))),i=await b(e,t,n,r.timeoutMs,r.signal);return i}function w(...e){let t={};for(let n of e)if(n!=null)for(let[e,r]of Object.entries(n)){let n=e.toLowerCase();r==null?n in t&&delete t[n]:t[n]=r}return t}var T=class{#e;constructor(e){this.#e=e}get baseUrl(){return this.#e.baseUrl}async#t(){return(await this.#e.auth?.())?.headers??{}}async send(r,s={},c){let l=new Set(r.pathParams),d=r.path(s),f=d.replace(/^\//,``),m=[];for(let e of r.query??[])l.add(e),m.push([e,s[e]]);let h={};for(let e of r.headers??[])l.add(e),h[e]=s[e];let _,y;if(r.body===`json`){_=s.body;let e=typeof _==`object`&&!!_&&!Array.isArray(_);r.constants!==void 0&&(_===void 0||e)&&(_={..._,...r.constants})}else if(r.body===`form`){y=new FormData;for(let[e,t]of Object.entries(s))!l.has(e)&&t!=null&&y.append(e,typeof t==`object`?JSON.stringify(t):String(t))}let b=u(this.#e.baseUrl,f),x=p(m,r.joined),S=new Headers;S.set(`Accept`,r.response===`text`?`text/plain`:`*/*`),_!==void 0&&r.body!==`form`&&S.set(`Content-Type`,r.contentType??`application/json`);let T=w(await this.#t(),this.#e.headers,Object.fromEntries(Object.entries(h).filter(([,e])=>e!=null)),c?.headers);for(let[e,t]of Object.entries(T))S.set(e,typeof t==`string`?t:`${t}`);let E={method:r.method,headers:S};y===void 0?_!==void 0&&(E.body=JSON.stringify(_)):(E.body=y,E.duplex=`half`);let D=c?.timeoutInSeconds??this.#e.timeoutInSeconds??60,O=c?.abortSignal,k;try{let t=await C(this.#e.fetch??fetch,x?`${b}?${x}`:b,E,{timeoutMs:D*1e3,signal:O,maxRetries:c?.maxRetries??this.#e.maxRetries}),n=e(t);if(t.status<200||t.status>=400){let e=await v(t),a=r.errors?.[String(t.status)];throw a===void 0?new i({statusCode:t.status,body:e,rawResponse:n}):o(a,t.status,e,n)}k=await g(t,r.response===!1?void 0:r.response)}catch(e){throw e instanceof i?e:O?.aborted?new i({message:`The user aborted a request`,rawResponse:t,cause:e}):e instanceof Error&&e.name===`AbortError`?new a(`Timeout exceeded when calling ${r.method} ${d}.`,{cause:e}):new i({message:e instanceof Error?e.message:JSON.stringify(e),rawResponse:n,cause:e})}if(r.response!==!1)return k}async fetch(e,t,n){let r=e instanceof URL?e.toString():e,i=r.startsWith(`http://`)||r.startsWith(`https://`)?r:u(this.#e.baseUrl,r),a={};for(let[e,t]of Object.entries(this.#e.headers??{}))t!=null&&(a[e.toLowerCase()]=`${t}`);for(let[e,t]of Object.entries(await this.#t()))a[e.toLowerCase()]=t;if(t?.headers!==void 0&&t.headers!==null){let e=t.headers instanceof Headers?Object.fromEntries(t.headers.entries()):Array.isArray(t.headers)?Object.fromEntries(t.headers):t.headers;for(let[t,n]of Object.entries(e))n!=null&&(a[t.toLowerCase()]=n)}for(let[e,t]of Object.entries(n?.headers??{}))a[e.toLowerCase()]=t;let o=n?.timeoutInSeconds??this.#e.timeoutInSeconds,s={method:t?.method??`GET`,headers:a};return t?.body!==void 0&&t.body!==null&&(s.body=t.body),C(this.#e.fetch??fetch,i,s,{timeoutMs:o===void 0?void 0:o*1e3,signal:n?.abortSignal??t?.signal??void 0,maxRetries:n?.maxRetries??this.#e.maxRetries})}};export{i as n,T as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BlWCu-YH.mjs";import{a as i,i as a,t as o}from"./context-CSjTAJ8s.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-BcjUdm_B.mjs";import{t as u}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as d,n as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-BFRinxR0.mjs";var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas`,body:`json`,constants:{kind:`openapi_v3`}};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`]}).coerce(`kind`,e=>m(e,`kind`,`text`)).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 y={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>u({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){c({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?p({kind:e.kind,name:m(e.name,`name`,`text`),source:m(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):f(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=f(e.body),i=await l(`Creating`,async()=>t.send(v,{body:r,zone_id:n}));s(i,{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await g(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await h(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await h(`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=p({kind:e.kind,name:m(e.name,`name`,`text`),source:m(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}),o=await l(`Creating`,async()=>t.send(v,{body:i,zone_id:n}));s(o,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/schema_validation/schemas/${t.schema_id}`};function ne(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"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,i,t as a}from"./context-CSjTAJ8s.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-BcjUdm_B.mjs";import{t as l}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{i as p}from"./prompt-BFRinxR0.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/argo/count_zones_enabled`};function h(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-account
|
|
3
3
|
|
|
4
4
|
Returns the number of zones that have Argo Smart Routing enabled for the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`count-zones-enabled-for-account`,describe:`Get count of zones with Argo Smart Routing enabled for account`,builder:h,handler:async e=>l({command:`argo smart-routing count-zones-enabled-for-account`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf argo smart-routing count-zones-enabled-for-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/argo/count_zones_enabled`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(m,{account_id:l}));o(u,{successLabel:`Loaded`})})};var _={method:`GET`,path:()=>`/user/argo/count_zones_enabled`};function v(e){return e.usage(`$0 argo smart-routing count-zones-enabled-for-user
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-BFRinxR0.mjs";import{n as m,t as h}from"./raw-fetch-BO0VqOVx.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function _(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`}).coerce(`jurisdiction`,e=>d(e,`jurisdiction`,`text`)).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 v={command:`create`,describe:`Create a namespace`,builder:_,handler:async e=>c({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({jurisdiction:e.jurisdiction,namespace:d(e.namespace,`namespace`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.namespace===void 0&&(e.namespace=await f(`namespace`,`The namespace field`));let m=u({jurisdiction:e.jurisdiction,namespace:d(e.namespace,`namespace`,`text`)}),h=await s(`Creating`,async()=>c.send(g,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/artifacts/namespaces/${t.namespace}`,response:!1,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 artifacts namespaces delete <namespace>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BlWCu-YH.mjs";import{a as r,t as i}from"./context-CSjTAJ8s.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-BcjUdm_B.mjs";import{t as c}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function u(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:`Since`}).option(`before`,{type:`string`,description:`Before`}).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 d={command:`list`,describe:`Get account audit logs`,builder:u,handler:async e=>c({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let c={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){let e=await r();o({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/audit_logs`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})},f={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{K as e}from"./dist-BtzWfAjU.mjs";import{n as t,t as n}from"./api-
|
|
2
|
+
import{K as e}from"./dist-BtzWfAjU.mjs";import{n as t,t as n}from"./api-X3wKppsT.mjs";import{a as r,n as i}from"./context-CSjTAJ8s.mjs";import{l as a}from"./oauth-C6uYSFM5.mjs";import{t as o}from"./auth-token-7Gn0n5N_.mjs";import{n as s}from"./request-headers-DFPlTFRf.mjs";const c=6e4;function l(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream}var u={method:`GET`,path:()=>`/accounts`,query:[`name`,`page`,`per_page`,`direction`]},d={method:`GET`,path:()=>`/memberships`,query:[`account.name`,`page`,`per_page`,`order`,`direction`,`name`,`status`]};function f(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function p(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function m(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function h(e,t,n){if(n!=null&&n!==``){if(Array.isArray(n))for(let r of n)h(e,t,r);else e.append(t,String(n))}}function g(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))h(t,n,r);return t.toString()}function _(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=g(n??{});return a&&(i.search=a),i.toString()}const v=/* @__PURE__ */ new WeakMap,y=/* @__PURE__ */ new WeakMap;async function b(e,n,r,i={}){let a=e.baseUrl,o=_(r,a,i.query),s={...i.headers},c;i.body!==void 0&&(f(i.body)||typeof i.body==`string`&&p(s)?c=i.body:(s[`Content-Type`]??=`application/json`,c=JSON.stringify(i.body)));let u=i.timeout===void 0&&l(c)?y.get(e):void 0,d=i.timeout??v.get(e)??6e4,h;try{h=await(u??e).fetch(o,{method:n,headers:s,body:c,signal:i.signal},{timeoutInSeconds:i.timeout===void 0?void 0:i.timeout/1e3,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e===`timeout`||e instanceof Error&&e.name===`AbortError`?Error(u?`Request timed out`:`Request timed out after ${d}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!h.ok)throw new t({statusCode:h.status,body:await m(h),rawResponse:{status:h.status,statusText:h.statusText,url:h.url||o,headers:h.headers,redirected:h.redirected,type:h.type}});if(h.status===204)return null;let g=h.headers.get(`content-type`)??``;if(!g.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await h.arrayBuffer());let b=await h.text();if(b===``)return null;if(!g.includes(`application/json`))return b;let x=JSON.parse(b);if(x.success===!1){let e=x.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`;throw new t({message:`API error: ${e}`,statusCode:h.status,body:x})}return`result`in x?x.result:x}function x(e){let t={baseUrl:e.baseURL??`https://api.cloudflare.com/client/v4`,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??6e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch},r=new n(t);return v.set(r,e.timeout??6e4),e.timeout===void 0&&y.set(r,new n({...t,timeoutInSeconds:void 0})),r}async function S(t){if(a())return;let n=await r();if(n)return n;try{let n=await o(),r=e({compliance_region:await i()}),a=t-Date.now();if(a<=0)return;let c=x({apiToken:n,baseURL:r,defaultHeaders:s()}),l={timeoutInSeconds:a/1e3,maxRetries:0},[f,p]=await Promise.allSettled([c.send(u,{per_page:50},l),c.send(d,{per_page:50},l)]);if(f.status===`rejected`)return;let m=f.value;if((m.result_info?.total_count??m.result.length)>m.result.length)return;let h=m.result;if(p.status===`fulfilled`){let e=p.value.result??[];if((p.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));h=h.filter(e=>t.has(e.id))}return h.length===1?h[0]?.id:void 0}catch{return}}async function C(t){if(t.dryRun&&a())throw Error(`This command's dry run cannot be used with --temporary-account. Remove --dry-run to run the command for real.`);let n=e({compliance_region:await i()});if(t.local){let{createLocalFetch:e}=await import(`./local-CAs8RWYW.mjs`);return x({apiToken:`cf-local-mode-no-auth`,baseURL:n,defaultHeaders:s(),fetch:e({persistTo:t.persistTo,apiBaseUrl:n})})}return x({apiToken:await o(),baseURL:n,defaultHeaders:s()})}export{S as a,l as c,b as i,c as l,C as n,d as o,g as r,u as s,x as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./agent-context-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./agent-context-Dtyy4aKL.mjs";import{i as n}from"./blocks-DDNRRYxu.mjs";import"./ui-DvC7Qa0H.mjs";import{t as r}from"./log-BWdaOGOW.mjs";import{d as i,f as a,i as o,r as s,t as c}from"./oauth-C6uYSFM5.mjs";import{t as l}from"./auth-token-7Gn0n5N_.mjs";import{t as u}from"./output-BJEgbI0G.mjs";import{n as d}from"./run--9dxcon4.mjs";import"./telemetry-THz8wtoW.mjs";import{a as f,c as p,i as m,n as h,o as g,r as _,s as v,t as y}from"./login-CJYJE6Ae.mjs";const b={command:`logout`,describe:`Log out and remove stored credentials`,handler:async t=>{m(t,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let n=s();n!=="default"&&r.warn(`This directory has profile "${n}" active. ${e.code(`cf auth logout`)} removes the default profile's token, not "${n}". To delete "${n}", run:`,`cf auth delete ${n}`),await i(`default`)}},x={command:`whoami`,describe:`Show current user and authentication status`,handler:async e=>{if(e[`temporary-account`]||e[`event-code`]!==void 0)throw Error(`--temporary-account and --event-code are not supported by cf auth whoami.`);let r=process.env.CLOUDFLARE_API_TOKEN,i=a(),s;s=r?`CLOUDFLARE_API_TOKEN environment variable`:i?.oauth_token?`OAuth token from ${o()}`:`none`;let d;try{d=await l()}catch{u({authenticated:!1,error:`Not logged in`}),s===`none`&&t().isAgentic&&console.error(n('Ask the user: "I can put this online for 60 minutes without you signing in. To keep it, complete the temporary-account claim before it expires. Would you like me to deploy it that way?" (https://developers.cloudflare.com/workers/platform/claim-deployments/) If they agree, run `cf deploy --temporary-account`.'));return}let{createCloudflareClientWithToken:f}=await import(`./auth-C0-WtqBw.mjs`),{default:p}=await import(`./get-BTisquA3.mjs`),m=f({apiToken:d}),h,g=[],[_,v]=await Promise.allSettled([m.send(p),c()]);if(_.status===`fulfilled`){let e=_.value;e&&`email`in e&&typeof e.email==`string`&&(h=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,_.reason);v.status===`fulfilled`?g=v.value:process.env.DEBUG&&console.error(`Account lookup error:`,v.reason);let y=_.status===`fulfilled`||v.status===`fulfilled`,b={authenticated:!0,authSource:s,tokenValid:y,...h&&{email:h},accounts:g};i?.oauth_token&&(b.scopes=i.scopes,b.expiresAt=i.expiration_time),u(b)}},S={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(d(y,{command:`auth login`,classification:h})).command(C(b,`auth logout`)).command(C(x,`auth whoami`)).command(C(f,`auth create`,[`browser`,`device`])).command(C(v,`auth delete`)).command(C(_,`auth activate`)).command(C(g,`auth deactivate`)).command(C(p,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e,t,n=[],r){return d(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{S as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{c as e}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import{t}from"./errors-
|
|
2
|
+
import{c as e}from"./chunk-XVBBSNW2-DfMyGS-l.mjs";import{t}from"./errors-DFSWbpd6.mjs";import{c as n,l as r,p as i,s as a}from"./oauth-C6uYSFM5.mjs";async function o(o){if(r())return(await i(o)).apiToken;let s=e({allowGlobalAuthKey:!1});if(s&&`apiToken`in s)return s.apiToken;let c=await a();if(c)return c;throw n()?Error(`Could not refresh your stored OAuth token. Check your connection and retry, or run 'cf auth login' to authenticate again.`):new t(`No authentication token found.
|
|
3
3
|
|
|
4
4
|
Please set one of the following:
|
|
5
5
|
1. Set the CLOUDFLARE_API_TOKEN environment variable
|