cf 1.0.0-beta.31 → 1.0.0-beta.32
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 +1138 -70
- package/dist/_meta/schemas.json +1003 -54
- package/dist/{abuse-reports-B8vD22yf.mjs → abuse-reports-DYm1nDLb.mjs} +1 -1
- package/dist/{access-BkZlZPER.mjs → access-Be_7nPz4.mjs} +1 -1
- package/dist/{accounts-CG6_1Bfa.mjs → accounts-DXULGfnh.mjs} +1 -1
- package/dist/{acm-B5VvmBfE.mjs → acm-Btsz5gzV.mjs} +1 -1
- package/dist/{addressing-Db9Z1P-r.mjs → addressing-DBQ5dUBd.mjs} +1 -1
- package/dist/{agent-memory-nzAUPSmC.mjs → agent-memory-Df0q-68_.mjs} +1 -1
- package/dist/{ai-RTQ-iZFq.mjs → ai-CJfI9JI2.mjs} +1 -1
- package/dist/{ai-audit-BGipueRC.mjs → ai-audit-Dv37OLES.mjs} +1 -1
- package/dist/{ai-gateway-F2pW8d5j.mjs → ai-gateway-BRSUY1QZ.mjs} +5 -5
- package/dist/{ai-search-CKM-K1Hm.mjs → ai-search-Bxv4hDG9.mjs} +3 -3
- package/dist/{ai-security-CS2VJd4V.mjs → ai-security-ByNRXyJv.mjs} +1 -1
- package/dist/{alerting-DNqXDY_7.mjs → alerting-UkiCzqAq.mjs} +2 -4
- package/dist/{analytics-DM85HHka.mjs → analytics-B4Wq2vJx.mjs} +1 -1
- package/dist/{analytics-engine-CxnuZwEx.mjs → analytics-engine-BbwIXL0f.mjs} +1 -1
- package/dist/{api-security-BwLSP_5v.mjs → api-security-B6YETCDG.mjs} +1 -1
- package/dist/{argo-DZM2SJFd.mjs → argo-CHSOLyFh.mjs} +1 -1
- package/dist/{artifacts-CKbQsn4H.mjs → artifacts-1xMBpJLr.mjs} +1 -1
- package/dist/{audit-logs-CG76HATH.mjs → audit-logs-Cz__6-PH.mjs} +1 -1
- package/dist/auth-Byb5Y3o4.mjs +2 -0
- package/dist/{auth-NIRm11Ab.mjs → auth-CRq9OQKr.mjs} +1 -1
- package/dist/{auth-DBM4EcdJ.mjs → auth-CrBQca61.mjs} +1 -1
- package/dist/{auth-token-Cp_u44cF.mjs → auth-token-BEkR6ulS.mjs} +1 -1
- package/dist/{autoconfig-CQjvJ8Rp.mjs → autoconfig-BDEt9orA.mjs} +1 -1
- package/dist/{basin-catalog-BMKr8hFw.mjs → basin-catalog-DRVVY1Ff.mjs} +1 -1
- package/dist/{billing-LiyUCn9n.mjs → billing-CInp7pBa.mjs} +1 -1
- package/dist/{blocks-DdIA5quB.mjs → blocks-DGXsHh9X.mjs} +1 -1
- package/dist/{bot-management-ATqDTT08.mjs → bot-management--NcaqMij.mjs} +1 -1
- package/dist/{botnet-feed-Dk3eMSZo.mjs → botnet-feed-DbPZ3Wzl.mjs} +1 -1
- package/dist/{brand-protection-B82xx9X5.mjs → brand-protection-B3s-8soV.mjs} +1 -1
- package/dist/{browser-run-DEVs2X54.mjs → browser-run-B9hyiK7P.mjs} +1 -1
- package/dist/build-Bd56lS7c.mjs +2 -0
- package/dist/{build-D18S0p87.mjs → build-I3m3uZn6.mjs} +1 -1
- package/dist/{builds-kZaYZiQn.mjs → builds-D0mRyKe3.mjs} +1 -1
- package/dist/{cache-BSkT4mhb.mjs → cache-eKHZG4U7.mjs} +1 -1
- package/dist/{cf-QIG83e0V.mjs → cf-MAiSK--E.mjs} +1 -1
- package/dist/{chunk-DSGVRFIS-CeCM3XGQ.mjs → chunk-DSGVRFIS-L76IWWlr.mjs} +1 -1
- package/dist/{chunk-Q5KVZMHK-Bjvrcihk.mjs → chunk-Q5KVZMHK-CYhKv3kZ.mjs} +1 -1
- package/dist/{cli-dk6sJFtN.mjs → cli-hFt2ZEED.mjs} +1 -1
- package/dist/{client-side-security-90cX3xFX.mjs → client-side-security-BvIdcAtV.mjs} +1 -1
- package/dist/{cloud-connector-CtJhvxoD.mjs → cloud-connector-B-04mm0j.mjs} +1 -1
- package/dist/{cloudflared-DKh4JK7j.mjs → cloudflared-DynBXmdP.mjs} +1 -1
- package/dist/{cloudforce-one-DOf-Y51V.mjs → cloudforce-one-BAGybQNM.mjs} +139 -143
- package/dist/{command-DuCT0YaL.mjs → command-5bkZXAlq.mjs} +1 -1
- package/dist/{command-BORazCDG.mjs → command-BCECG198.mjs} +1 -1
- package/dist/{command-DPo7r1PT.mjs → command-BaFQsuac.mjs} +1 -1
- package/dist/{command-C2HYwGn_.mjs → command-BdnTjDyg.mjs} +1 -1
- package/dist/{command-BUYlzx4J.mjs → command-BkCc_9UI.mjs} +1 -1
- package/dist/{command-B6ustzcW.mjs → command-CQU92hcH.mjs} +1 -1
- package/dist/{command-QInwUVT5.mjs → command-CdB1DQZl.mjs} +1 -1
- package/dist/{command-MWbvYsQH.mjs → command-CoR-c8lP.mjs} +1 -1
- package/dist/{command-B2dfzTXs.mjs → command-D-a4KxcW.mjs} +1 -1
- package/dist/{command-aeKPI1bt.mjs → command-D6wod_eb.mjs} +1 -1
- package/dist/{command-BAzptjLF.mjs → command-DSPEpZHp.mjs} +1 -1
- package/dist/{command-BUbUtS1f.mjs → command-EG23K_k6.mjs} +1 -1
- package/dist/{command-V0dODmT-.mjs → command-Ux0DLWdC.mjs} +1 -1
- package/dist/{command-CTpn87uz.mjs → command-oko8tT2c.mjs} +1 -1
- package/dist/{completions-4aAl8vcF.mjs → completions-CdlqoV7q.mjs} +1 -1
- package/dist/{connector-interrupts-qEMhlWeV.mjs → connector-interrupts-D9iiu7ZU.mjs} +1 -1
- package/dist/{connector-telemetry-events-CdqnrxRp.mjs → connector-telemetry-events-C8ouyC4A.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-BRvmHAEM.mjs → connector-telemetry-snapshots-Ck9btYy7.mjs} +1 -1
- package/dist/{connectors-BqShaonQ.mjs → connectors-kGPYvin5.mjs} +1 -1
- package/dist/{containers-BNuGwLRK.mjs → containers-DIf9nmcC.mjs} +2 -2
- package/dist/{content-scan-02SOIW_1.mjs → content-scan-Cr0i9wJK.mjs} +1 -1
- package/dist/{context-CroqTqbk.mjs → context-DsVjrTbe.mjs} +1 -1
- package/dist/{cps-DvEG2eZl.mjs → cps-BHmMKg5Q.mjs} +1 -1
- package/dist/{csam-scanner-Bvklah8m.mjs → csam-scanner-DGTOi2EL.mjs} +1 -1
- package/dist/{custom-csrs-BVcDWpY-.mjs → custom-csrs-DpLkO9_M.mjs} +1 -1
- package/dist/{custom-hostnames-IgjZmeJc.mjs → custom-hostnames-beJnRWcQ.mjs} +1 -1
- package/dist/{custom-nameservers-0EYFPBz2.mjs → custom-nameservers-B1WtaEDH.mjs} +1 -1
- package/dist/{custom-pages-W2weASNg.mjs → custom-pages-BVXmc-u6.mjs} +1 -1
- package/dist/{d1-Df4t1noM.mjs → d1-DYQBKGMz.mjs} +1 -1
- package/dist/{delegate-CEaYc4br.mjs → delegate-4bIHEQ8-.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CGx9aUuj.mjs → deploy-DEq6UKzb.mjs} +1 -1
- package/dist/{deploy-context-DzSmuU32.mjs → deploy-context-DJNsb7w-.mjs} +1 -1
- package/dist/{deploy-input-DA70GC4o.mjs → deploy-input-Bkll8tDW.mjs} +1 -1
- package/dist/{dev-BDls_bK6.mjs → dev-DIguZvJE.mjs} +1 -1
- package/dist/{diagnostics-C8V1G64d.mjs → diagnostics-DyCPKwXL.mjs} +1 -1
- package/dist/{disk-cache-D6xHBTAA.mjs → disk-cache-BVfJigfC.mjs} +1 -1
- package/dist/{dist-DwxlJ9Ms.mjs → dist-BoDdDWjK.mjs} +33 -33
- package/dist/{dls-BpU_jtuh.mjs → dls-BXGJug7c.mjs} +1 -1
- package/dist/{dns-BlgfnRkG.mjs → dns-Ev7l7p2X.mjs} +1 -1
- package/dist/{dns-firewall-DtkcaFQ0.mjs → dns-firewall-CrkTqlYI.mjs} +1 -1
- package/dist/{docs-BI2ZoYmm.mjs → docs-Dx9n33S3.mjs} +1 -1
- package/dist/{durable-objects-BPTzK6Xh.mjs → durable-objects-ChKP2Y6u.mjs} +1 -1
- package/dist/{email-auth-BSoYwLs1.mjs → email-auth-B-n1rKim.mjs} +1 -1
- package/dist/{email-routing-3AIhCb7w.mjs → email-routing-Dfs1g7hk.mjs} +1 -1
- package/dist/{email-security-INhnV4tT.mjs → email-security-B9wpMLHr.mjs} +1 -1
- package/dist/{email-sending-BJ3OLfN3.mjs → email-sending-DUyDi24R.mjs} +3 -3
- package/dist/{errors-CBngn9n1.mjs → errors-CUuKkONZ.mjs} +1 -1
- package/dist/{field-extractors-lSqk5ySb.mjs → field-extractors-B_R4gU51.mjs} +1 -1
- package/dist/{firewall-CdXsS4Cc.mjs → firewall-B5_DMZ5c.mjs} +1 -1
- package/dist/{flagship-CtnQ4Emf.mjs → flagship-D_jWMrT9.mjs} +1 -1
- package/dist/{fraud-CAZdLc_4.mjs → fraud-BPywqzR5.mjs} +1 -1
- package/dist/{google-tag-gateway-CBMNbgeM.mjs → google-tag-gateway-B8SGqWxf.mjs} +1 -1
- package/dist/{healthchecks-DdPEo0GC.mjs → healthchecks-C1NL0A-K.mjs} +1 -1
- package/dist/{hyperdrive-DxHbVnyO.mjs → hyperdrive-C1C_n591.mjs} +1 -1
- package/dist/{iam-CISZzLLr.mjs → iam-BWm6OeLJ.mjs} +1 -1
- package/dist/{images-DeMHqQHl.mjs → images-CU9B4ml9.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-DKADNnPy.mjs → init-DJGas0DL.mjs} +1 -1
- package/dist/{intel-BYvnwlXr.mjs → intel-COtK2F9g.mjs} +1 -1
- package/dist/{interactive-DCbIwYxy.mjs → interactive-CQ29h7qo.mjs} +1 -1
- package/dist/{ips-CS5SkxUL.mjs → ips-Dv5eyxgM.mjs} +1 -1
- package/dist/{k2-isJz0-93.mjs → k2-CdhxgeiI.mjs} +1 -1
- package/dist/{kv-Beih-nj_.mjs → kv-gNSTaGhd.mjs} +1 -1
- package/dist/{lazy-command-Dfv2jIGz.mjs → lazy-command-CJcN1Ze6.mjs} +1 -1
- package/dist/{leaked-credential-checks-CP_8DWAX.mjs → leaked-credential-checks-B222QFHE.mjs} +1 -1
- package/dist/{load-balancers-fhAs7LaH.mjs → load-balancers-CM-4BY5q.mjs} +1 -1
- package/dist/{login-BdTYP5Xw.mjs → login-Csb8Ld0x.mjs} +1 -1
- package/dist/login-bHCEjxRS.mjs +2 -0
- package/dist/{logpush-fHQiJ9eI.mjs → logpush-CmothcrK.mjs} +1 -1
- package/dist/{logs-Bquc4oxR.mjs → logs-CnKqBsDl.mjs} +1 -1
- package/dist/{magic-network-monitoring-DqQUEtPW.mjs → magic-network-monitoring-BEdRTgMa.mjs} +1 -1
- package/dist/{magic-transit-py-CXbOl.mjs → magic-transit-CXjc5Yo4.mjs} +1 -1
- package/dist/{managed-defense-nFm4rVCR.mjs → managed-defense-BuOxTHAO.mjs} +1 -1
- package/dist/{managed-transforms-2k6tV3U-.mjs → managed-transforms-BlqW4xkh.mjs} +1 -1
- package/dist/{mcp-BCtJ76cJ.mjs → mcp-ubFVHsP4.mjs} +1 -1
- package/dist/{mesh-D2V3ITA7.mjs → mesh-DQS7KfDF.mjs} +1 -1
- package/dist/{migrate-CqUzEP9-.mjs → migrate-fY24KHV_.mjs} +1 -1
- package/dist/{monetization-CQL4WEtz.mjs → monetization-CagZDoKh.mjs} +1 -1
- package/dist/{network-1oR1_5Ak.mjs → network-BB35dF4N.mjs} +1 -1
- package/dist/{network-interconnects-BKRa6OaY.mjs → network-interconnects-Dy4m1jMu.mjs} +2 -2
- package/dist/{o11y-B2hny1eT.mjs → o11y-Dmll3yib.mjs} +1 -1
- package/dist/{oauth-Dp9VNyOf.mjs → oauth-Dv7Wucj6.mjs} +1 -1
- package/dist/{oauth-CQiiWvag.mjs → oauth-NljTb7u9.mjs} +1 -1
- package/dist/observability-rtMYSCht.mjs +4 -0
- package/dist/{ohttp-gateway-B67P-f_M.mjs → ohttp-gateway-BM3nsC92.mjs} +1 -1
- package/dist/{organizations-Dk5cbMB5.mjs → organizations-Xus5102w.mjs} +1 -1
- package/dist/package-BJWSNfbc.mjs +2 -0
- package/dist/{page-rules-hRzoq6WZ.mjs → page-rules-BKoA5eaf.mjs} +1 -1
- package/dist/{pages-D_0y5Pbg.mjs → pages-CLhvyehs.mjs} +4 -4
- package/dist/{pay-per-crawl-C0ZDkVH8.mjs → pay-per-crawl-BLjKJl62.mjs} +1 -1
- package/dist/{pay-per-use-Z_LlZyxh.mjs → pay-per-use-FbddmVNv.mjs} +1 -1
- package/dist/{pipelines-B8-zUXTD.mjs → pipelines-BsJkvK-K.mjs} +1 -1
- package/dist/{precursor-vlW9-fma.mjs → precursor-oLj-WPJH.mjs} +1 -1
- package/dist/{previews-DZX0vwDU.mjs → previews-BRPPf7UU.mjs} +1 -1
- package/dist/{progress-DQfZZwit.mjs → progress-DItBn6ZV.mjs} +1 -1
- package/dist/{prompt-e6K5lhdE.mjs → prompt-BGz3DNLz.mjs} +1 -1
- package/dist/{queues-6WHCb5qi.mjs → queues-DAnbmO-t.mjs} +3 -3
- package/dist/{r2-C9xL1Rcg.mjs → r2-DNN91rtN.mjs} +1 -1
- package/dist/{radar-DN1PIWRf.mjs → radar-YWsfV39d.mjs} +1 -1
- package/dist/{raw-fetch-DXSBORQI.mjs → raw-fetch-CmI3Ol3q.mjs} +1 -1
- package/dist/{realtime-CcOSBEFJ.mjs → realtime-CfsgoOsd.mjs} +1 -1
- package/dist/{registrar-BjBA2lbF.mjs → registrar-N1c89kFV.mjs} +1 -1
- package/dist/{registrar-sandbox-DVeWO8gt.mjs → registrar-sandbox-D5lsoy-x.mjs} +1 -1
- package/dist/{reporting-cOY97XSy.mjs → reporting-CI5TLvj4.mjs} +1 -1
- package/dist/{request-headers-xtY5gOlq.mjs → request-headers-CUwBDAwI.mjs} +1 -1
- package/dist/{request-tracers-bHnQoIpS.mjs → request-tracers-DO63p3ou.mjs} +1 -1
- package/dist/{resource-sharing-CQMP1o3F.mjs → resource-sharing-CxdcY5n1.mjs} +1 -1
- package/dist/{rules-CrevxzXm.mjs → rules-DuuULmp2.mjs} +1 -1
- package/dist/{rulesets-DzGcmiGs.mjs → rulesets-3_8IWMfL.mjs} +1 -1
- package/dist/{rum-edoW7i0P.mjs → rum-DkfsMJa7.mjs} +1 -1
- package/dist/run-C9SxROBF.mjs +2 -0
- package/dist/{run-DhU17ztU.mjs → run-DAK_kbUa.mjs} +1 -1
- package/dist/{schema-cache-BFMBra5w.mjs → schema-cache-BcbUfb3D.mjs} +1 -1
- package/dist/{scim-BC31cTiV.mjs → scim-DCR6AQp5.mjs} +1 -1
- package/dist/{secrets-store-DJlRawQ0.mjs → secrets-store-C3v0_Us9.mjs} +1 -1
- package/dist/{security-insights-jHGuq15c.mjs → security-insights-0el4fk-S.mjs} +4 -2
- package/dist/security-txt-CcsEaOm5.mjs +8 -0
- package/dist/{session-Py5R3Tdx.mjs → session-CgJ6kB79.mjs} +1 -1
- package/dist/{shared-C50J5uEm.mjs → shared-DjaJ-SCM.mjs} +1 -1
- package/dist/{smart-shield-YI9Y6xhz.mjs → smart-shield-BxTEZqtZ.mjs} +1 -1
- package/dist/{snippets-SKlEbP3W.mjs → snippets-CH4PcqCg.mjs} +1 -1
- package/dist/{spawn-BXaiweDp.mjs → spawn-B681PPG2.mjs} +2 -2
- package/dist/{spectrum-CFl8kTtP.mjs → spectrum-DconVKYG.mjs} +1 -1
- package/dist/{speed-DekTJTgw.mjs → speed-Euqtk0Vc.mjs} +1 -1
- package/dist/{sql-tkIoPSbE.mjs → sql-UNZoawTj.mjs} +1 -1
- package/dist/{src-COKSSJwa.mjs → src-CSSFtpQM.mjs} +5 -5
- package/dist/{ssl-DRGNVUlP.mjs → ssl-CGWF2ZSz.mjs} +9 -9
- package/dist/startup-profile-ajl_yZx2.mjs +2 -0
- package/dist/{startup-profile-CyIelqtC.mjs → startup-profile-ne34QxOx.mjs} +1 -1
- package/dist/{state-BI_wSuID.mjs → state-BFClIYM_.mjs} +1 -1
- package/dist/state-V1KLVkd6.mjs +2 -0
- package/dist/{static-assets-pAj1uSDU.mjs → static-assets-CWo7dxyW.mjs} +164 -164
- package/dist/{stream-WHdFw1o1.mjs → stream-B3tkAx82.mjs} +1 -1
- package/dist/{tags-CNEWjoac.mjs → tags-CKnt6RT6.mjs} +9 -9
- package/dist/telemetry-B3S5OfOn.mjs +2 -0
- package/dist/{telemetry-BCQMv5dO.mjs → telemetry-COJrOM3V.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BCJoh-yz.mjs → tenant-custom-nameservers-BdVLeMsA.mjs} +1 -1
- package/dist/{tenants-Coo3-wTg.mjs → tenants-C8Emd5Ou.mjs} +1 -1
- package/dist/{tunnels-Cy3byznJ.mjs → tunnels-vUfvvRWt.mjs} +15 -13
- package/dist/{turnstile-DvkuMuTq.mjs → turnstile-D-6e0ShA.mjs} +1 -1
- package/dist/ui-YBIkZLZt.mjs +2 -0
- package/dist/{update-check-Buyg_Zyb.mjs → update-check-BW_N6gX4.mjs} +1 -1
- package/dist/{update-check-CV30Z3FO.mjs → update-check-CvzNuZHG.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DJzp3oJN.mjs → url-normalization-Bfj-1zgi.mjs} +1 -1
- package/dist/{url-scanner-C28ADWWB.mjs → url-scanner-CcZzqvrj.mjs} +1 -1
- package/dist/{user-CiFGo-51.mjs → user-CYHyVzic.mjs} +1 -1
- package/dist/{vectorize-DZ-VBQjl.mjs → vectorize-69UvmqNI.mjs} +1 -1
- package/dist/version-5uL0ecbB.mjs +2 -0
- package/dist/{waiting-rooms-mLG31NWt.mjs → waiting-rooms-Dj92gXpa.mjs} +1 -1
- package/dist/{web-assets-Caubyaqz.mjs → web-assets-vbQ0MSCd.mjs} +1 -1
- package/dist/{web3-Ctcb6rxj.mjs → web3-0Sz4gIto.mjs} +1 -1
- package/dist/{whoami-DBZfITBb.mjs → whoami-C4xRnPxf.mjs} +3 -3
- package/dist/whoami-wYc70ks4.mjs +2 -0
- package/dist/{workers-ClK3WFQg.mjs → workers-BQM8pUYu.mjs} +2 -2
- package/dist/{workers-for-platforms-D6fknsnw.mjs → workers-for-platforms-BfXIqCm4.mjs} +1 -1
- package/dist/{workers-vpc-B7wRAn-K.mjs → workers-vpc-CR3tfj4I.mjs} +1 -1
- package/dist/{workflows-B0UzguVf.mjs → workflows-DpQgBIHz.mjs} +1 -1
- package/dist/{wrangler-migration-u2oXOk-L.mjs → wrangler-migration-ChTsuUHx.mjs} +57 -57
- package/dist/{zaraz-p9rNptt3.mjs → zaraz-BPOBM0-W.mjs} +1 -1
- package/dist/{zero-trust-Dw5CvLQD.mjs → zero-trust-Cridhy7G.mjs} +21 -17
- package/dist/{zones-DzPc0thm.mjs → zones-BIKClc2S.mjs} +3 -3
- package/package.json +12 -12
- package/dist/auth-BBUZyJJx.mjs +0 -2
- package/dist/build-CjqOmQjC.mjs +0 -2
- package/dist/login-Bux329zM.mjs +0 -2
- package/dist/observability-ByzMkD8L.mjs +0 -4
- package/dist/package-CcmyQJFT.mjs +0 -2
- package/dist/run-B6k0nZU4.mjs +0 -2
- package/dist/security-txt-D1vV2ySL.mjs +0 -8
- package/dist/startup-profile-Dif7XOsU.mjs +0 -2
- package/dist/state-xUh3Z77T.mjs +0 -2
- package/dist/telemetry-CruYXv5e.mjs +0 -2
- package/dist/ui-CA_2sliN.mjs +0 -2
- package/dist/version--BAAeBma.mjs +0 -2
- package/dist/whoami-rfo2jx0r.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,i as p,n as m}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function _(e){return e.usage(`$0 email-security allow-policies batch
|
|
3
3
|
|
|
4
4
|
Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string}].`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"comments"?: (string | null), "expires_at"?: (string | null), "is_acceptable_sender"?: boolean, "is_exempt_recipient"?: boolean, "is_recipient"?: boolean, ...more} & {"id": string})]. ? marks optional keys.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"is_acceptable_sender": boolean, "is_exempt_recipient": boolean, "is_regex": boolean, "is_trusted_sender": boolean, "pattern": string, ...more}].`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"is_acceptable_sender": boolean, "is_exempt_recipient": boolean, "is_regex": boolean, "is_trusted_sender": boolean, "pattern": string, ...more} & {"id": string})].`}).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 ee={command:`batch`,describe:`Batch allow policy operations`,builder:_,handler:async e=>u({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({deletes:n(e.deletes,`deletes`),patches:n(e.patches,`patches`),posts:n(e.posts,`posts`),puts:n(e.puts,`puts`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),f=await t(e),p=e.local?c:await o();if(e.accountId=p,!await m({force:!!e.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`}))return;if(e.body!==void 0){let e=u,t=await d(`Processing`,async()=>f.send(g,{body:e,account_id:p}));l(t,{successLabel:`Done`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let h=i({deletes:n(e.deletes,`deletes`),patches:n(e.patches,`patches`),posts:n(e.posts,`posts`),puts:n(e.puts,`puts`)}),_=await d(`Processing`,async()=>f.send(g,{body:h,account_id:p}));l(_,{successLabel:`Done`})})};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,body:`json`};function te(e){return e.usage(`$0 email-security allow-policies create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{i as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-BGz3DNLz.mjs";import{t as _}from"./body-unions-QFGGUlIr.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 email-sending get <message-id>
|
|
3
3
|
|
|
4
4
|
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <message-id>`,describe:`Fetch an email message`,builder:ee,handler:async e=>l({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(v,{account_id:l,message_id:e[`message-id`]}));s(u,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/limits`,errors:{403:`ForbiddenError`}};function te(e){return e.usage(`$0 email-sending limits get
|
|
5
5
|
|
|
@@ -32,7 +32,7 @@ this subdomain drops that recipient and still delivers to the
|
|
|
32
32
|
rest, instead of failing the entire request.
|
|
33
33
|
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const _e={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:ge,handler:async e=>l({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):f(e.body)});return}let r=e.body===void 0?void 0:f(e.body),a=await t(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let t=r,n=await c(`Updating`,async()=>a.send(J,{body:t,zone_id:o,subdomain_id:e[`subdomain-id`]}));s(n,{successLabel:`Updated`});return}let l=p({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}),u=await c(`Updating`,async()=>a.send(J,{body:l,zone_id:o,subdomain_id:e[`subdomain-id`]}));s(u,{successLabel:`Updated`})})},ve={command:`subdomains`,describe:`Configure sending subdomains and keep their DNS records healthy`,builder:e=>e.command(k).command(M).command(G).command(le).command(de).command(_e).command(H).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function ye(e){return e.usage(`$0 email-sending suppressions create
|
|
34
34
|
|
|
35
|
-
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a
|
|
35
|
+
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).coerce(`scope-type`,e=>m(e,`scope-type`,`text`)).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`scope-type`,`scope-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const X=[{path:[`scope`],selector:`type`,variants:[{values:[`account`],schema:{type:`object`,properties:{type:{enum:[`account`]}},required:[`type`],additionalProperties:!1}},{values:[`sending_domain`],schema:{type:`object`,properties:{type:{enum:[`sending_domain`]},value:{type:`string`}},required:[`type`,`value`],additionalProperties:!1}}]}],be={command:`create`,describe:`Create account Email Sending suppression`,builder:ye,handler:async e=>l({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}}),X):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(Y,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}e.email===void 0&&(e.email=await h(`email`,`The email address to suppress.`));let d=p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}});_(d,X);let g=await c(`Creating`,async()=>l.send(Y,{body:d,account_id:u}));s(g,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Se(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
|
|
36
36
|
|
|
37
37
|
Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ce={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Se,handler:async e=>l({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`}))return;let u=await c(`Deleting`,async()=>i.send(xe,{account_id:l,suppression_id:e[`suppression-id`]}));s(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function we(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
|
|
38
38
|
|
|
@@ -42,4 +42,4 @@ Gets an Email Sending suppression owned by the account.`).positional(`suppressio
|
|
|
42
42
|
|
|
43
43
|
Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with the same email address and scope are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"email": string, "expires_at"?: (string | null), "note"?: string, "scope"?: {...}}]. ? marks optional keys.`}).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 Ae={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:ke,handler:async e=>l({command:`email-sending suppressions import`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf email-sending suppressions import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({items:d(e.items,`items`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(Q,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}if(e.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let m=p({items:d(e.items,`items`)}),h=await c(`Creating`,async()=>l.send(Q,{body:m,account_id:u}));s(h,{successLabel:`Created`})})};var $={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions`,query:[`per_page`,`cursor`,`email`,`search`,`reason`,`scope_type`,`scope_value`],errors:{400:`BadRequestError`}};function je(e){return e.usage(`$0 email-sending suppressions list
|
|
44
44
|
|
|
45
|
-
Lists every active Email Sending suppression owned by the account: sending-domain suppressions
|
|
45
|
+
Lists every active Email Sending suppression owned by the account: sending-domain suppressions and account-wide suppressions (including legacy rows with internal zone memberships). Each scope is listed newest first. The order between sending-domain and account-wide suppressions is not fixed; use \`scope_type\` to list one scope.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`scope-type`,{type:`string`,description:"Filter by scope: `account` returns only account-wide suppressions, `sending_domain` only sending-domain suppressions. Omit to list both; the order between the two scopes is not fixed.",choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:"Exact sending-domain filter. Requires `scope_type=sending_domain`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List account Email Sending suppressions`,builder:je,handler:async e=>l({command:`email-sending suppressions list`,classification:{safeFlags:[`reason`,`scope-type`,`dry-run`]}},e,async()=>{let i={per_page:e[`per-page`],cursor:e.cursor,email:e.email,search:e.search,reason:e.reason,scope_type:e[`scope-type`],scope_value:e[`scope-value`]};if(e.dryRun){let e=await r();n({command:`cf email-sending suppressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send($,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},Ne={command:`suppressions`,describe:`Prevent delivery to suppressed addresses and manage the account suppression list`,builder:e=>e.command(be).command(Ce).command(Te).command(Oe).command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pe={command:`email-sending`,describe:`Send transactional email and manage sending subdomains and their DNS configuration`,builder:e=>e.command(y).command(E).command(C).command(re).command(se).command(ve).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n as t}from"./version
|
|
2
|
+
import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n as t}from"./version-5uL0ecbB.mjs";import{t as n}from"./session-CgJ6kB79.mjs";import{i as r,t as i}from"./blocks-DGXsHh9X.mjs";import{r as a}from"./theme-BGHWSKCw.mjs";import{i as o}from"./api-Dnt6lRJG.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(e){return Array.isArray(e)?e.flatMap(e=>{if(typeof e==`string`)return[{message:e}];if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.code==`number`?t.code:void 0,r=typeof t.message==`string`?t.message:void 0;return n!==void 0||r!==void 0?[{code:n,message:r}]:[]}):[]}function d(s){if(n(t),s instanceof o){let e=s.statusCode,t=s.body,n=e===void 0?`Envelope Error`:p(e),o=typeof t==`object`&&t?t:void 0,c=[...u(o?.errors).map(e=>({...e,isError:!0})),...u(o?.messages).map(e=>({...e,isError:!1}))],d=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,f=e===void 0?n:`${e} ${n}`,m=d?`${f} · ${d}`:f,h=a.muted(m),g=``;return c.length>0?g=c.map((e,t)=>{let n=typeof e.code==`number`?a.error(a.bold(`[${e.code}]`)):e.isError?a.error(a.bold(`[error]`)):void 0,r=a.bold(e.message??``),i=n?`${n} ${r}`:r;return t===c.length-1?`${i}\n${h}`:i}).join(`
|
|
3
3
|
|
|
4
4
|
`):(g=a.error(a.bold(s.message||m)),s.message&&m&&(g+=`\n${h}`)),console.error(i(g,void 0,{title:`APIError`,rawMessage:!0})),e===401?console.error(`
|
|
5
5
|
`+r(`Try running: cf auth login`)):e===403&&console.error(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,t as i}from"./context-DsVjrTbe.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-PRKYaJuo.mjs";import{t as s}from"./progress-DItBn6ZV.mjs";import{t as c}from"./run-DAK_kbUa.mjs";import{n as l}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{o as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
|
|
3
3
|
|
|
4
4
|
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:m,handler:async e=>c({command:`field-extractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf field-extractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await t(e),u=e.local?a:await i();if(e.accountId=u,!await l({force:!!e.force}))return;let d=await s(`Deleting`,async()=>c.send(p,{account_id:u,extractor:e.extractor}));o(d,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 field-extractors get <extractor>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,i as o,t as s}from"./context-DsVjrTbe.mjs";import{t as c}from"./dry-run-mrA7FFLR.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{t as u}from"./local-B3zt9PXR.mjs";import{t as d}from"./run-DAK_kbUa.mjs";import{t as f}from"./output-PRKYaJuo.mjs";import{t as p}from"./progress-DItBn6ZV.mjs";import{a as m,i as h,n as g}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function v(e){return e.usage(`$0 firewall access-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{i as r,o as i,r as a,t as o}from"./body-parser-HN91kAf0.mjs";import{a as s,t as c}from"./context-DsVjrTbe.mjs";import{t as l}from"./dry-run-mrA7FFLR.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./run-DAK_kbUa.mjs";import{t as p}from"./output-PRKYaJuo.mjs";import{t as m}from"./progress-DItBn6ZV.mjs";import{a as h,n as g}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
|
|
3
3
|
|
|
4
4
|
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).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:`Create app`,builder:v,handler:async e=>f({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();l({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?o({name:u(e.name,`name`,`text`)}):a(e.body)});return}let t=e.body===void 0?void 0:a(e.body),r=await n(e),i=e.local?d:await c();if(e.accountId=i,e.body!==void 0){let e=t,n=await m(`Creating`,async()=>r.send(_,{body:e,account_id:i}));p(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let f=o({name:u(e.name,`name`,`text`)}),g=await m(`Creating`,async()=>r.send(_,{body:f,account_id:i}));p(g,{successLabel:`Created`})})};function b(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>f({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={};if(e[`if-none-match`]!==void 0&&(r[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await s();l({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?d:await c();e.accountId=a;let o=await m(`Loading`,async()=>t(i,`GET`,`/accounts/${a}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(r).length>0?r:void 0}));p(o,{successLabel:`Loaded`})})},S={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 flagship apps delete <app-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-DItBn6ZV.mjs";import{t as o}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
|
|
3
3
|
|
|
4
4
|
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,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(u,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
|
|
5
5
|
- Maximum of 10 codes per criterion.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-DItBn6ZV.mjs";import{t as o}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-BGz3DNLz.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
|
|
3
3
|
|
|
4
4
|
Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,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}));i(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{i as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./run-DAK_kbUa.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./progress-DItBn6ZV.mjs";import{a as d,n as f}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
|
|
3
3
|
|
|
4
4
|
Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>s(e,`http-config-method`,`text`)).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).coerce(`tcp-config-method`,e=>s(e,`tcp-config-method`,`text`)).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>c({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({address:s(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:s(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:s(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:r(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:s(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:s(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:s(e.type,`type`,`text`)},[[`http_config`,`header`]]):i(e.body)});return}let c=e.body===void 0?void 0:i(e.body),f=await t(e),m=await n({zone:e.zone},f,{quiet:e.quiet});if(e.zoneId=m,e.body!==void 0){let e=c,t=await u(`Creating`,async()=>f.send(p,{body:e,zone_id:m}));l(t,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let h=a({address:s(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:s(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:s(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:r(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:s(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:s(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:s(e.type,`type`,`text`)},[[`http_config`,`header`]]),g=await u(`Creating`,async()=>f.send(p,{body:h,zone_id:m}));l(g,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,i as p,n as m}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
|
|
3
3
|
|
|
4
4
|
Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>s(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{a as o,t as s}from"./context-DsVjrTbe.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./run-DAK_kbUa.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{t as g}from"./list-ByCv9-Fl.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function v(e){return e.usage(`$0 iam oauth-clients create
|
|
3
3
|
|
|
4
4
|
Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>c(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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:`Create OAuth Client`,builder:v,handler:async e=>d({command:`iam oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await o();a({command:`cf iam oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({allowed_cors_origins:e[`allowed-cors-origins`],client_name:c(e[`client-name`],`client-name`,`text`),client_uri:c(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:c(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:c(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:c(e[`tos-uri`],`tos-uri`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),d=await t(e),h=e.local?l:await s();if(e.accountId=h,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>d.send(_,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await p(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await m(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=i({allowed_cors_origins:e[`allowed-cors-origins`],client_name:c(e[`client-name`],`client-name`,`text`),client_uri:c(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:c(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:c(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:c(e[`tos-uri`],`tos-uri`,`text`)}),v=await f(`Creating`,async()=>d.send(_,{body:g,account_id:h}));u(v,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function ee(e){return e.usage(`$0 iam oauth-clients delete-rotated-secret <oauth-client-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.mjs";import{n as s,t as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./run-DAK_kbUa.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.mjs";import{i as g,o as _,r as v,t as y}from"./body-parser-HN91kAf0.mjs";import{n as b,t as x}from"./raw-fetch-CmI3Ol3q.mjs";var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/images/v1`,pathParams:[`account_id`],body:`form`};function ee(e){return e.usage(`$0 images create
|
|
3
3
|
|
|
4
4
|
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const te={command:`create`,describe:`Upload an image`,builder:ee,handler:async e=>d({command:`images create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,creator:e.creator,id:e.id,metadata:e.metadata,"require-signed-urls":e[`require-signed-urls`],url:e.url}});return}let a=await n(e),d=e.local?l:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.creator!==void 0||e.id!==void 0||e.metadata!==void 0||e[`require-signed-urls`]!==void 0||e.url!==void 0){let n=new FormData;if(e.file!==void 0){let t=c(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.creator!==void 0&&n.append(`creator`,String(s(e.creator,`creator`,`text`)??``)),e.id!==void 0&&n.append(`id`,String(s(e.id,`id`,`text`)??``)),e.metadata!==void 0){let t=typeof e.metadata==`string`?s(e.metadata,`metadata`,`text`):e.metadata;n.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}e[`require-signed-urls`]!==void 0&&n.append(`requireSignedURLs`,String(e[`require-signed-urls`])),e.url!==void 0&&n.append(`url`,String(s(e.url,`url`,`text`)??``));let r=await f(`Creating`,async()=>t(a,`POST`,`/accounts/${d}/images/v1`,{body:n}));u(r,{successLabel:`Created`});return}if(e.body!==void 0){let n=s(e.body,`body`,`binary`),r=await f(`Creating`,async()=>t(a,`POST`,`/accounts/${d}/images/v1`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));u(r,{successLabel:`Created`});return}let p=await f(`Creating`,async()=>a.send(S,{account_id:d}));u(p,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/images/v1/${t.image_id}`};function re(e){return e.usage(`$0 images delete <image-id>
|
|
5
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./src-
|
|
2
|
+
import{n as e,r as t,t as n}from"./src-CSSFtpQM.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./telemetry-
|
|
2
|
+
import"./telemetry-B3S5OfOn.mjs";import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n,z as r}from"./dist-BoDdDWjK.mjs";import"./src-CSSFtpQM.mjs";import{i,n as a,t as o}from"./autoconfig-BDEt9orA.mjs";import{i as s}from"./delegate-4bIHEQ8-.mjs";import{n as c,r as l}from"./dialog-CD94-Kzw.mjs";import{t as ee}from"./progress-DItBn6ZV.mjs";import{t as u}from"./project-settings-D_S-UC8I.mjs";import"./ui-YBIkZLZt.mjs";import{t as d}from"./log-Brx-wjJW.mjs";import{n as f}from"./run-DAK_kbUa.mjs";import{n as p}from"./version-5uL0ecbB.mjs";import{basename as m,dirname as h,isAbsolute as g,join as _,relative as v,resolve as y}from"node:path";import{mkdir as b,readdir as x,stat as S,writeFile as C}from"node:fs/promises";const w={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function te(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":T()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function T(){return`# Approve build scripts needed by the generated Worker's dependencies.
|
|
3
3
|
allowBuilds:
|
|
4
4
|
esbuild: true
|
|
5
5
|
workerd: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{n as h,t as g}from"./raw-fetch-CmI3Ol3q.mjs";import{a as _,n as v}from"./prompt-BGz3DNLz.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function te(e){return e.usage(`$0 intel asn get <asn>
|
|
3
3
|
|
|
4
4
|
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <asn>`,describe:`Get ASN Overview.`,builder:te,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let t=await n(e),a=e.local?s:await o();e.accountId=a;let u=await l(`Loading`,async()=>t.send(ee,{account_id:a,asn:e.asn}));c(u,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ie(e){return e.usage(`$0 intel asn subnets list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{H as r}from"./dist-
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{H as r}from"./dist-BoDdDWjK.mjs";import{t as i}from"./src-COwxoocl.mjs";import{r as a}from"./interactive-wQM7Blhm.mjs";import{n as o,t as s}from"./ansi-styles-kSC6bEIq.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=r,x=r.hex(`#BD5B08`),S=r.hex(`#111`),C=r.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=r.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=r.hex(`#218529`),re=S.bgHex(`#218529`),ie=r.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(ge,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=O(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=O(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
|
|
3
3
|
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===``){_e.lastIndex=e+1;let t=_e.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
4
4
|
`){a&&(r+=be(``));let e=i?ve(i):void 0;i&&e&&(r+=ye(e))}else t===`
|
|
5
5
|
`&&(i&&ve(i)&&(r+=ye(i)),a&&(r+=be(a)))}return r},we=/\r?\n/;function Te(e,t,n){return String(e).normalize().split(we).map(e=>Ce(e,t,n)).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CRq9OQKr.mjs";import{t}from"./dry-run-mrA7FFLR.mjs";import{t as n}from"./output-PRKYaJuo.mjs";import{t as r}from"./progress-DItBn6ZV.mjs";import{t as i}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
|
|
3
3
|
|
|
4
4
|
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){t({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));n(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{r as n,t as r}from"./body-parser-HN91kAf0.mjs";import{a as i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./dry-run-mrA7FFLR.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import{t as u}from"./output-PRKYaJuo.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>l({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):n(e.body)});return}let l=e.body===void 0?void 0:n(e.body),p=await t(e),h=e.local?c:await a();if(e.accountId=h,e.body!==void 0){let e=l,t=await d(`Creating`,async()=>p.send(m,{body:e,account_id:h}));u(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let g=r({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:s(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await d(`Creating`,async()=>p.send(m,{body:g,account_id:h}));u(_,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
|
|
3
3
|
|
|
4
4
|
Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,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 <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>l({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?c:await a();if(e.accountId=r,!await p({force:!!e.force}))return;let s=await d(`Deleting`,async()=>n.send(_,{account_id:r,stream_id:e[`stream-id`]}));u(s,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{t as c}from"./local-B3zt9PXR.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import{t as d}from"./progress-DItBn6ZV.mjs";import{a as f,n as p}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{n as g,t as _}from"./raw-fetch-CmI3Ol3q.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/delete`,body:`json`};function y(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
3
|
|
|
4
4
|
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:y,handler:async e=>u({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:r(e.body,[],1e4),i=await n(e),u=e.local?c:await o();if(e.accountId=u,await p({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})&&e.body!==void 0){let n=t,r=await d(`Processing`,async()=>i.send(v,{body:n,account_id:u,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Done`})}})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>m(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>u({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):r(e.body)});return}let t=e.body===void 0?void 0:r(e.body),u=await n(e),f=e.local?c:await o();if(e.accountId=f,e.body!==void 0){let n=t,r=await d(`Creating`,async()=>u.send(b,{body:n,account_id:f,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=i({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),m=await d(`Creating`,async()=>u.send(b,{body:p,account_id:f,namespace_id:e[`namespace-id`]}));l(m,{successLabel:`Created`})})};var C={method:`PUT`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk`,body:`json`};function w(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:w,handler:async e=>u({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:r(e.body,[],1e4),i=await n(e),u=e.local?c:await o();if(e.accountId=u,e.body!==void 0){let n=t,r=await d(`Updating`,async()=>i.send(C,{body:n,account_id:u,namespace_id:e[`namespace-id`]}));l(r,{successLabel:`Updated`})}})},E={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(ee).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function O(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 k={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:O,handler:async e=>u({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?c:await o();if(e.accountId=r,!await p({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`}))return;let i=await d(`Deleting`,async()=>t.send(D,{account_id:r,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));l(i,{successLabel:`Deleted`})})};function A(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const j={command:`get <key-name>`,describe:`Get a key's value`,builder:A,handler:async e=>u({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}await n(e);let t=e.local?c:await o();e.accountId=t;let r=await d(`Loading`,async()=>_(`/accounts/${t}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(e.text===!0?r.toString(`utf-8`):r)})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/keys`,query:[`limit`,`prefix`,`cursor`]};function N(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List keys in a namespace`,builder:N,handler:async e=>u({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,prefix:e.prefix,cursor:e.cursor};if(e.dryRun){let n=await a();s({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?c:await o();e.accountId=i;let u=await d(`Loading`,async()=>r.send(M,{account_id:i,namespace_id:e[`namespace-id`],...t}));l(u,{successLabel:`Loaded`})})};function F(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const te={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:F,handler:async e=>u({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let r={expiration:e.expiration,expiration_ttl:e[`expiration-ttl`]};if(e.dryRun){let t=await a();s({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},query:r,bodyKind:e.metadata===void 0?`octet-stream`:`multipart`,body:e.metadata===void 0?e.body:{body:e.body,file:e.file,metadata:e.metadata}});return}if(e.body===void 0&&e.file===void 0&&e.metadata===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let i=e.metadata!==void 0||e.file!==void 0?void 0:m(e.body,`body`,`binary`),u=await n(e),f=e.local?c:await o();if(e.accountId=f,e.metadata!==void 0){let n=new FormData;if(e.file!==void 0){let t=h(e.file);n.append(`value`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`value`,e.body);e.metadata!==void 0&&n.append(`metadata`,String(m(e.metadata,`metadata`,`text`)??``));let r=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:n}));l(r,{successLabel:`Updated`})}else if(e.file!==void 0){let n=h(e.file),r=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}}));l(r,{successLabel:`Updated`})}else if(e.body!==void 0){let n=i,a=new URLSearchParams(Object.entries(r).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o=await d(`Updating`,async()=>t(u,`PUT`,`/accounts/${f}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}${a?`?`+a:``}`,{body:n,headers:{"Content-Type":`application/octet-stream`}}));l(o,{successLabel:`Updated`})}})},I={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(k).command(j).command(P).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/metadata/${t.key_name}`};function R(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <key-name>`,describe:`Get a key's metadata`,builder:R,handler:async e=>u({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/metadata/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let t=await n(e),r=e.local?c:await o();e.accountId=r;let i=await d(`Loading`,async()=>t.send(L,{account_id:r,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));l(i,{successLabel:`Loaded`})})},B={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,body:`json`};function H(e){return e.usage(`$0 kv namespaces create
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-
|
|
2
|
+
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-C9SxROBF.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
|
package/dist/{leaked-credential-checks-CP_8DWAX.mjs → leaked-credential-checks-B222QFHE.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n}from"./context-DsVjrTbe.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{n as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./run-DAK_kbUa.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import"./telemetry-B3S5OfOn.mjs";import{n as u}from"./prompt-BGz3DNLz.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
3
|
|
|
4
4
|
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>s({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({password:o(e.password,`password`,`text`),username:o(e.username,`username`,`text`)}):r(e.body)});return}let s=e.body===void 0?void 0:r(e.body),u=await t(e),f=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let e=s,t=await l(`Creating`,async()=>u.send(d,{body:e,zone_id:f}));c(t,{successLabel:`Created`});return}let p=i({password:o(e.password,`password`,`text`),username:o(e.username,`username`,`text`)}),m=await l(`Creating`,async()=>u.send(d,{body:p,zone_id:f}));c(m,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{i as n,o as r,r as i,t as a}from"./body-parser-HN91kAf0.mjs";import{a as o,i as s,t as c}from"./context-DsVjrTbe.mjs";import{t as l}from"./dry-run-mrA7FFLR.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{t as d}from"./local-B3zt9PXR.mjs";import{t as f}from"./run-DAK_kbUa.mjs";import{t as p}from"./output-PRKYaJuo.mjs";import{t as m}from"./progress-DItBn6ZV.mjs";import{a as h,n as g}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
|
|
3
3
|
|
|
4
4
|
Create a new account or zone-scoped load balancer.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,v as n}from"./chunk-Q5KVZMHK-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{c as t,v as n}from"./chunk-Q5KVZMHK-CYhKv3kZ.mjs";import{c as r,d as i,f as a,g as o,h as s,i as c,o as l,r as u,s as d,u as f}from"./oauth-NljTb7u9.mjs";import"./ui-YBIkZLZt.mjs";import{t as p}from"./log-Brx-wjJW.mjs";import{n as m,t as h}from"./output-PRKYaJuo.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),n(e.name);let t=l().configs.exists(e.name);await f({browser:e.browser,device:e.device,scopes:e.scopes,profile:e.name}),m(t?`Profile "${e.name}" re-authenticated.`:`Profile "${e.name}" created.`),p.info(`To use this profile in a directory, run:`,`cf auth activate ${e.name}`)}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),n(t.name);let r=l();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let a=r.bindings.removeAllBindingsForProfile(t.name);a.length>0&&p.info([`Removed directory bindings:`,...a.map(e=>` ${e}`)].join(`
|
|
3
3
|
`)),await i(t.name),r.configs.delete(t.name),m(`Profile "${t.name}" deleted.`);let o=r.bindings.getProfileForDirectory(process.cwd());o?p.info(`Active profile for this directory: ${o}.`):r.configs.exists(`default`)?p.info(`This directory now uses the default profile.`):p.info(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),n(e.name);let t=l();if(!t.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();t.bindings.activate(e.name,r),m(`Profile "${e.name}" activated for "${g.resolve(r)}".`)}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=l(),r=t.dir??process.cwd(),{removedProfile:i,newResolution:a}=n.bindings.deactivate(r);m(`Profile "${i}" deactivated from "${g.resolve(r)}".`),a.profile===void 0?p.info(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`):a.profile==="default"?p.info(`This directory now uses the default profile.`):p.info(`Now using: ${a.profile} (${a.source}).`)}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=l(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`,`use-keyring`,`useKeyring`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}).option(`use-keyring`,{type:`boolean`,description:`Encrypt OAuth credentials using the OS keychain (persisted across invocations; use --no-use-keyring to disable)`}),handler:async n=>{_(n,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let i=u();if(i!=="default"&&p.warn(`This directory has profile "${i}" active. ${e.code(`cf auth login`)} updates the default profile, not "${i}". To re-authenticate "${i}", run:`,`cf auth create ${i}`),o(`default`),n.useKeyring!==void 0&&s(n.useKeyring),t({allowGlobalAuthKey:!1})!==void 0){p.warn(`${e.code(`CLOUDFLARE_API_TOKEN`)} is set and takes precedence. Unset it to log in via OAuth.`);return}if(!n.force&&r()){if(await d()){let t=a(),n=[`You are already logged in.`,`${e.info(`Config file:`)} ${e.muted(c())}`];t?.expiration_time&&n.push(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),n.push(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`),p.info(n.join(`
|
|
4
4
|
`));return}p.warn(`Existing tokens are invalid or expired. Starting fresh login...`)}else n.force&&r()&&p.info(`Re-authenticating...`);if(p.info(`Starting OAuth login flow...`),!await f({browser:n.browser,device:n.device,scopes:n.scopes,profile:`default`}))return;let l=a(),m=[`${e.info(`Config file:`)} ${e.muted(c())}`];l?.scopes&&m.push(l.scopes.length>5?`${e.info(`Scopes:`)} ${l.scopes.length} granted. Run ${e.code(`cf auth scopes`)} to view them by product or ${e.code(`cf auth scopes --all`)} for the full list.`:`${e.info(`Scopes:`)} ${l.scopes.join(`, `)}`),l?.expiration_time&&m.push(`${e.info(`Token expires:`)} ${new Date(l.expiration_time).toLocaleString()}`),p.info(m.join(`
|
|
5
5
|
`))}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./telemetry-B3S5OfOn.mjs";import"./ui-YBIkZLZt.mjs";import{n as t}from"./run-DAK_kbUa.mjs";import{t as n}from"./log-Brx-wjJW.mjs";import{n as r,t as i}from"./login-Csb8Ld0x.mjs";const a={...i,describe:!1,handler:async t=>{t.quiet||n.info(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`),await i.handler(t)}};var o=t(a,{command:`login`,classification:r});export{o as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{t as n}from"./dry-run-mrA7FFLR.mjs";import{a as r,i,t as a}from"./context-DsVjrTbe.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-DItBn6ZV.mjs";import{t as l}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{i as u,r as d,t as f}from"./body-parser-HN91kAf0.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BGz3DNLz.mjs";var g={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logpush/datasets/${t.dataset_id}/fields`};function _(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
|
|
3
3
|
|
|
4
4
|
Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-CRq9OQKr.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-DItBn6ZV.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import"./telemetry-B3S5OfOn.mjs";import{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-BGz3DNLz.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
|
|
3
3
|
|
|
4
4
|
Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.
|
|
5
5
|
|
package/dist/{magic-network-monitoring-DqQUEtPW.mjs → magic-network-monitoring-BEdRTgMa.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CRq9OQKr.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DsVjrTbe.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-DAK_kbUa.mjs";import{t as d}from"./output-PRKYaJuo.mjs";import{t as f}from"./progress-DItBn6ZV.mjs";import{a as p,i as m,n as h}from"./prompt-BGz3DNLz.mjs";import"./telemetry-B3S5OfOn.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function _(e){return e.usage(`$0 magic-network-monitoring configs create
|
|
3
3
|
|
|
4
4
|
Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "name": string, "router_ip": string}].`}).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 account configuration`,builder:_,handler:async e=>u({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),m=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>m.send(g,{body:e,account_id:h}));d(t,{successLabel:`Created`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`The account name.`));let _=i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}),v=await f(`Creating`,async()=>m.send(g,{body:_,account_id:h}));d(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function b(e){return e.usage(`$0 magic-network-monitoring configs delete
|
|
5
5
|
|