cf 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/agent-context.json +189 -187
- package/dist/_meta/commands.json +2591 -2248
- package/dist/_meta/hand-written-commands.json +146 -1
- package/dist/_meta/schemas.json +1548 -1313
- package/dist/{abuse-reports-BbaHw4ST.mjs → abuse-reports-CDFjJ2e8.mjs} +1 -1
- package/dist/{access-D6Xz892p.mjs → access-BoT1waG4.mjs} +1 -1
- package/dist/{account-DvxcqeaK.mjs → account-agnMUKWj.mjs} +1 -1
- package/dist/{account-tags-CeqfEWpz.mjs → account-tags-BRMMHCee.mjs} +1 -1
- package/dist/{accounts-Bx-8BMH9.mjs → accounts-Cut77dAt.mjs} +2 -2
- package/dist/{acm--0opdSGE.mjs → acm-C8WgXNCl.mjs} +1 -1
- package/dist/{addressing-BS1ynzLA.mjs → addressing-CR8EV42x.mjs} +1 -1
- package/dist/{agent-context-BPhyrSns.mjs → agent-context-Wj5TRRbW.mjs} +1 -1
- package/dist/{agent-memory-DczzpEw5.mjs → agent-memory-CVJpKKZy.mjs} +1 -1
- package/dist/{ai-CDdCTcQl.mjs → ai-BbNYt-yI.mjs} +1 -1
- package/dist/{ai-audit-Bx9KMQYh.mjs → ai-audit-mVajM-2i.mjs} +1 -1
- package/dist/{ai-gateway-BSXJEaYS.mjs → ai-gateway-BsepSA_v.mjs} +2 -2
- package/dist/{ai-search-DRQj1aMu.mjs → ai-search-DbEJqm5-.mjs} +1 -1
- package/dist/{ai-security-C_Rb0lGT.mjs → ai-security-DmyB5EYk.mjs} +1 -1
- package/dist/{alerting-BAR9eFs2.mjs → alerting-dmy3hd8O.mjs} +3 -3
- package/dist/analytics-B1xBMla0.mjs +5 -0
- package/dist/{analytics_engine-DkEzlhfT.mjs → analytics_engine-DazCn3iC.mjs} +1 -1
- package/dist/{api-security-jA0lOk6a.mjs → api-security-0HXCzfHk.mjs} +1 -1
- package/dist/{argo-Cz4pDagx.mjs → argo-DSHsE8zv.mjs} +1 -1
- package/dist/{artifacts-BcLTGfAv.mjs → artifacts-CwiU9Mxu.mjs} +1 -1
- package/dist/{audit-logs-DbIv4n6u.mjs → audit-logs-DwFtMDwH.mjs} +1 -1
- package/dist/{auth-rW5d3jtr.mjs → auth-B0ZyXc3y.mjs} +1 -1
- package/dist/{auth-tvDdC1J-.mjs → auth-DWxtJ918.mjs} +2 -2
- package/dist/{billing-Md87QjqW.mjs → billing-Cbpadkgu.mjs} +1 -1
- package/dist/{bot-management-VHMo4hpU.mjs → bot-management-B6M2Vyyn.mjs} +1 -1
- package/dist/{botnet-feed-BHqfo3sa.mjs → botnet-feed-Dn8UuE4h.mjs} +1 -1
- package/dist/{brand-protection-HUeR6Pof.mjs → brand-protection-B5R0b3pu.mjs} +1 -1
- package/dist/{browser-extension-199oZg3X.mjs → browser-extension-D55pYZf_.mjs} +1 -1
- package/dist/{browser-run-DDasyux-.mjs → browser-run-C1b2VkGB.mjs} +1 -1
- package/dist/build-CP2JUfV1.mjs +2 -0
- package/dist/{builds-B-lXn6JR.mjs → builds-CVEXO_4a.mjs} +8 -8
- package/dist/{cache-CevKpiTM.mjs → cache-BU5xX82E.mjs} +1 -1
- package/dist/{certificate-authorities-DAg-aO1B.mjs → certificate-authorities--tZTWJWD.mjs} +1 -1
- package/dist/cf-BV2HLCQm.mjs +18 -0
- package/dist/{chunk-QBZBEHZB-BuiXJn8j.mjs → chunk-QBZBEHZB-BcCMlc8C.mjs} +1 -1
- package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +103 -0
- package/dist/{client-certificates-Bay7oPLE.mjs → client-certificates-DX84qeYG.mjs} +1 -1
- package/dist/{client-side-security-CbU9xn0k.mjs → client-side-security-DsSO2rZQ.mjs} +1 -1
- package/dist/{cloud-connector-AH2ClcSL.mjs → cloud-connector-cf8qlxap.mjs} +1 -1
- package/dist/{cloudforce-one-DwOfS75V.mjs → cloudforce-one-DzVXorbu.mjs} +2 -2
- package/dist/command-BL6weJf3.mjs +3 -0
- package/dist/command-DYrspBc0.mjs +2 -0
- package/dist/{completions-nPO9PdSu.mjs → completions-Dn621okY.mjs} +1 -1
- package/dist/{config-B8lwPpVl.mjs → config-BY6KpMZs.mjs} +1 -1
- package/dist/config.d.mts +1 -1729
- package/dist/config.mjs +1 -1
- package/dist/{connector-interrupts-DcLrqM2V.mjs → connector-interrupts-DqpqPPkp.mjs} +1 -1
- package/dist/{connector-telemetry-events-PrJWgNs9.mjs → connector-telemetry-events-CCD-_B-8.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-CIjJm5yu.mjs → connector-telemetry-snapshots-D3CeGGhk.mjs} +1 -1
- package/dist/{connectors-CEAy30E-.mjs → connectors-aPQspZdg.mjs} +1 -1
- package/dist/{containers-BsbDqbSn.mjs → containers-D0Kjl8h-.mjs} +1 -1
- package/dist/{content-scan-BdK936iO.mjs → content-scan-BVx18XmS.mjs} +1 -1
- package/dist/{cps-oP97-qkm.mjs → cps-ByazyM0x.mjs} +1 -1
- package/dist/{csamScanner-DUNN4INg.mjs → csamScanner-OG5lQxBC.mjs} +1 -1
- package/dist/{ct-alerting-dV_gsV2w.mjs → ct-alerting-BJx5n8Zf.mjs} +1 -1
- package/dist/{custom-certificates-DYspvjo4.mjs → custom-certificates-BuJ2e9TA.mjs} +1 -1
- package/dist/{custom-csrs-DjSWLQRu.mjs → custom-csrs-CR_5qbST.mjs} +1 -1
- package/dist/{custom-hostnames-df1lH6IY.mjs → custom-hostnames-BzDTsQXb.mjs} +1 -1
- package/dist/{custom-nameservers-CLTbN-9R.mjs → custom-nameservers-OfMPRGkD.mjs} +1 -1
- package/dist/custom-pages-BmGXoTIo.mjs +3 -0
- package/dist/d1-DedC8N0N.mjs +21 -0
- package/dist/data-security-B2UB26ry.mjs +7 -0
- package/dist/{dcv-delegation-_r6Vc6VL.mjs → dcv-delegation-C11vmzbG.mjs} +1 -1
- package/dist/{deploy-QTGENpOM.mjs → deploy-BtETDvDA.mjs} +1 -1
- package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-BoLTdQzS.mjs} +1 -1
- package/dist/{dev-CAubuxCc.mjs → dev-B5WcIpEr.mjs} +2 -2
- package/dist/{diagnostics-B0DRh714.mjs → diagnostics-Cf6BLpAo.mjs} +1 -1
- package/dist/dialog-Bud0hiYv.mjs +2 -0
- package/dist/{dist-DW5BPGFs.mjs → dist-BRg_z9Ut.mjs} +1 -1
- package/dist/{shared-YJtB5KZB.mjs → dist-CFQREIRi.mjs} +86 -86
- package/dist/dist-CyisSore.mjs +371 -0
- package/dist/dist-Dr4Hg_Up.mjs +48 -0
- package/dist/{dls-CFzTHcZM.mjs → dls-R6PvHbhj.mjs} +1 -1
- package/dist/{dns-Dw6u-NV1.mjs → dns-Cl8se64c.mjs} +1 -1
- package/dist/{dns-firewall-CIPptslp.mjs → dns-firewall-WtmKilDT.mjs} +1 -1
- package/dist/dry-run-YSQndLvt.mjs +2 -0
- package/dist/{durable-objects-CCkeqqBq.mjs → durable-objects-jfVU6yp_.mjs} +1 -1
- package/dist/{email-auth-kdxO51Oz.mjs → email-auth-DPmZ85eW.mjs} +1 -1
- package/dist/{email-routing-BLggZdQq.mjs → email-routing-Bf6DbNTr.mjs} +1 -1
- package/dist/{email-security-DjADlgdM.mjs → email-security-DTifjSxM.mjs} +1 -1
- package/dist/{email-sending-Cz7E7GoP.mjs → email-sending-Dm3WkFHV.mjs} +1 -1
- package/dist/{error-sanitization-DfLijlBJ.mjs → error-sanitization-D8zuyPj_.mjs} +1 -1
- package/dist/{fieldExtractors-BWaMi6lD.mjs → fieldExtractors-CeXZL0-I.mjs} +1 -1
- package/dist/{firewall-5t6OBIOl.mjs → firewall-D5N2APXO.mjs} +1 -1
- package/dist/{flagship-CzG_VoNR.mjs → flagship-sUOy9jei.mjs} +1 -1
- package/dist/{fraud-UOg_69Ob.mjs → fraud-WLW2Ep1Z.mjs} +1 -1
- package/dist/{google-tag-gateway-DirkD-Q2.mjs → google-tag-gateway-lbww1FaJ.mjs} +1 -1
- package/dist/{healthchecks-BkHZGTp1.mjs → healthchecks-0ih8Qjiw.mjs} +1 -1
- package/dist/{hostnames-EUYOZm21.mjs → hostnames-Ba6FuL8K.mjs} +1 -1
- package/dist/{hyperdrive-ZoLJlJCL.mjs → hyperdrive-DMqcU639.mjs} +1 -1
- package/dist/{iam-BQ2xSgYN.mjs → iam-CXlYm0uC.mjs} +1 -1
- package/dist/{images-CkEq6ScP.mjs → images-D_g1oli6.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-DDWEdGyl.mjs → intel-B8bS0ARd.mjs} +1 -1
- package/dist/interactive-CGOh-aYq.mjs +32 -0
- package/dist/{ips-54Qmy-Uw.mjs → ips-68fzniN4.mjs} +1 -1
- package/dist/{keyless-certificates-CXHLc3Qz.mjs → keyless-certificates-CeLnqBvX.mjs} +1 -1
- package/dist/{keys-rvI4TC3Z.mjs → keys-DkVdS2lF.mjs} +1 -1
- package/dist/{kv-CAeN1zBy.mjs → kv-gDAN50BQ.mjs} +1 -1
- package/dist/{leaked-credential-checks-CbbwtG-p.mjs → leaked-credential-checks-DfnvHpvg.mjs} +1 -1
- package/dist/{lifecycle-XswDq0ZB.mjs → lifecycle-CadF_i2n.mjs} +1 -1
- package/dist/{load-balancers-BFwdwAIU.mjs → load-balancers-m0HqyXPZ.mjs} +1 -1
- package/dist/{local-C6XsFD_W.mjs → local-BwL_gesw.mjs} +1 -1
- package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-Dj8k-p62.mjs} +1 -1
- package/dist/{logo-matches-Y3PxVn7t.mjs → logo-matches-DPbHlsKQ.mjs} +1 -1
- package/dist/{logos-BN8SvJhS.mjs → logos-DFBJFAYJ.mjs} +1 -1
- package/dist/{logpush-BnLA4WVm.mjs → logpush-gzmlZayc.mjs} +1 -1
- package/dist/logs-BuzwQgt5.mjs +18 -0
- package/dist/{magic-cloud-networking-wPuLwu-F.mjs → magic-cloud-networking-BbHCi1Vp.mjs} +1 -1
- package/dist/{magic-network-monitoring-BNERUpxS.mjs → magic-network-monitoring-kWMmnPTG.mjs} +1 -1
- package/dist/{magic-transit-6tvVOECW.mjs → magic-transit-ClSmJDKw.mjs} +1 -1
- package/dist/{managed-defense-AYwBOYIH.mjs → managed-defense-EOihg1UR.mjs} +1 -1
- package/dist/{managed-transforms-HZZNrkC7.mjs → managed-transforms-BZ_XdGE2.mjs} +1 -1
- package/dist/{matches-Dp91L3dL.mjs → matches-B6sG0_fr.mjs} +1 -1
- package/dist/{mcp-P7pcieiT.mjs → mcp--kK0vS5i.mjs} +1 -1
- package/dist/{mesh-DjFrk6PL.mjs → mesh-DfXYUHOO.mjs} +1 -1
- package/dist/{mtls-certificates-DZMoef2H.mjs → mtls-certificates-DZd-0X7l.mjs} +1 -1
- package/dist/{network-7cd1U6-I.mjs → network-U6f_5ihp.mjs} +1 -1
- package/dist/{network-interconnects-CQ7cPZjK.mjs → network-interconnects-DKZGTiYM.mjs} +1 -1
- package/dist/oauth-BdVr2hJp.mjs +14 -0
- package/dist/{oauth-clients-P9t-eMnx.mjs → oauth-clients-CY3OkPhC.mjs} +1 -1
- package/dist/{oauth-scopes-C3r9Qh_y.mjs → oauth-scopes-BTY7_5L-.mjs} +1 -1
- package/dist/{observability-M1DnLhMR.mjs → observability-Bsp-LdmJ.mjs} +1 -1
- package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-ClEt4E8F.mjs} +3 -3
- package/dist/{organization-cUE7GDCt.mjs → organization-BSeMdj-7.mjs} +1 -1
- package/dist/{organizations-C-Hcpd0w.mjs → organizations-BroR48Nv.mjs} +1 -1
- package/dist/{origin-ca-certificates-C8cJMyQH.mjs → origin-ca-certificates-jC-EMn6W.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DjZJCk8M.mjs → origin-post-quantum-encryption-DIspLvA0.mjs} +1 -1
- package/dist/{origin-tls-client-auth-BsjR5EAV.mjs → origin-tls-client-auth-CZ_nUEcM.mjs} +1 -1
- package/dist/{page-rules-B-zq1EUb.mjs → page-rules-ZcdjPohY.mjs} +1 -1
- package/dist/{pages-B6YpkPos.mjs → pages-W4tKa7xk.mjs} +1 -1
- package/dist/pay-per-crawl-BNM1mJmP.mjs +5 -0
- package/dist/pay-per-use-DKxlnkH3.mjs +2 -0
- package/dist/{pipelines-BJc_RylD.mjs → pipelines-Dug0BR-c.mjs} +1 -1
- package/dist/{precursor-CLQu7suY.mjs → precursor-D-11DkRU.mjs} +1 -1
- package/dist/previews-D_Nv4dR6.mjs +4 -0
- package/dist/{progress-V6SZV3Ux.mjs → progress-a5IKeKni.mjs} +1 -1
- package/dist/project-settings-Bc3wYHo8.mjs +3 -0
- package/dist/prompt-BP8XrQSj.mjs +3 -0
- package/dist/{queries-DSrrket-.mjs → queries-BdA2vJoe.mjs} +1 -1
- package/dist/{queues-Tf7kPBpn.mjs → queues-Bu06ZqUE.mjs} +1 -1
- package/dist/{r2-DmKNnxtC.mjs → r2-COC9wMKb.mjs} +1 -1
- package/dist/{r2-data-catalog-DBxoifOq.mjs → r2-data-catalog-CX5Rl5Qx.mjs} +1 -1
- package/dist/{radar-Csk7Ab-b.mjs → radar-L-yoLIHF.mjs} +1 -1
- package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNH2V8qH.mjs} +1 -1
- package/dist/{realtime-CDehZVhV.mjs → realtime-JKIiXfzi.mjs} +1 -1
- package/dist/{registrar-vflzeNQ9.mjs → registrar-_dYUZrK0.mjs} +2 -2
- package/dist/{registrar-sandbox-BxVdfnam.mjs → registrar-sandbox-D1yfW_Q_.mjs} +2 -2
- package/dist/{registry-CWUfXloz.mjs → registry-BrtVdMrC.mjs} +1 -1
- package/dist/{reporting-BaPZ1PHN.mjs → reporting-3fyoMcmb.mjs} +1 -1
- package/dist/request-headers-BhQQAfJt.mjs +2 -0
- package/dist/{request-tracers-C_UVBexV.mjs → request-tracers-TisEth2p.mjs} +1 -1
- package/dist/{resolve-B8CyM1mi.mjs → resolve-CYUp6YgC.mjs} +1 -1
- package/dist/{resource-sharing-CoB4S9j1.mjs → resource-sharing-C4-dnohU.mjs} +1 -1
- package/dist/{resource-tagging-CUiUC5g4.mjs → resource-tagging-BRDifKqM.mjs} +1 -1
- package/dist/{rules-4O8076_s.mjs → rules-BCF3gIkw.mjs} +2 -2
- package/dist/{rulesets-C84MxTYo.mjs → rulesets-wp6rllt3.mjs} +1 -1
- package/dist/{rum-Bvwkrntx.mjs → rum-B77awgoB.mjs} +1 -1
- package/dist/run-BS8otL3u.mjs +2 -0
- package/dist/{schema-C8hU6G9R.mjs → schema-DmuJtMN5.mjs} +1 -1
- package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CUGxFeZe.mjs} +4 -4
- package/dist/{scim-BvxQmde6.mjs → scim-C9BmUYil.mjs} +1 -1
- package/dist/{sdk-C12y5qCN.mjs → sdk-Bvqx-_3z.mjs} +1 -1
- package/dist/{secrets-store-DOKWiC-j.mjs → secrets-store-ckkZR2dM.mjs} +1 -1
- package/dist/{security-center-Bhy_aC-w.mjs → security-center-BCahKT57.mjs} +1 -1
- package/dist/{security-txt-L7HJ9tq5.mjs → security-txt-0SI5du7I.mjs} +1 -1
- package/dist/shared-D0B-7q-D.mjs +2 -0
- package/dist/{smart-shield-COMXuQ1S.mjs → smart-shield-BDPbrZa4.mjs} +1 -1
- package/dist/{snippets-DffQhlKt.mjs → snippets-CVRR_h0i.mjs} +1 -1
- package/dist/spawn-DP4T92ss.mjs +519 -0
- package/dist/{spectrum-Cmf7SqQE.mjs → spectrum-CjNXQIQE.mjs} +3 -3
- package/dist/{speed-m8cdhLFS.mjs → speed-CrXCHk3h.mjs} +1 -1
- package/dist/src-BbnV77C4.mjs +108 -0
- package/dist/{ssl-D4ffsdSw.mjs → ssl-DKORhHkh.mjs} +1 -1
- package/dist/{startup-profile-Dx95Y5cl.mjs → startup-profile-CBIH6yZy.mjs} +3 -3
- package/dist/{state-CHif8Y5I.mjs → state-QUu6HfxC.mjs} +1 -1
- package/dist/{stream-DPF5fojV.mjs → stream-wY3zi3FK.mjs} +1 -1
- package/dist/{submit-Br8hfP0_.mjs → submit-B-4oCBSk.mjs} +1 -1
- package/dist/{tags-Bnt4JuxQ.mjs → tags-5uJEkYJZ.mjs} +1 -1
- package/dist/{telemetry-DjGNSlkU.mjs → telemetry-2s9Y3FaN.mjs} +1 -1
- package/dist/{telemetry-Ch1vCICm.mjs → telemetry-n3NJourL.mjs} +1 -1
- package/dist/{tenant-D8u0CxoC.mjs → tenant-BkFvv2o3.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BrWMyslZ.mjs → tenant-custom-nameservers-DcjC1q0r.mjs} +1 -1
- package/dist/{tools-D9RZkZRc.mjs → tools-Dz1JCrHd.mjs} +1 -1
- package/dist/tunnel-Cd4ipbvJ.mjs +2 -0
- package/dist/{tunnels-BkNPpTHa.mjs → tunnels-9Zg3ePwD.mjs} +1 -1
- package/dist/{turnstile-MgwRECJv.mjs → turnstile-BTwKYpzD.mjs} +1 -1
- package/dist/{url-info-Ddp7MgcI.mjs → url-info-D7Y61BFd.mjs} +1 -1
- package/dist/{url-normalization-3ptK9ntV.mjs → url-normalization-B4n8HiNQ.mjs} +1 -1
- package/dist/{url-scanner-Psb9ollR.mjs → url-scanner-CiCIltSQ.mjs} +1 -1
- package/dist/{user-DWdshcIu.mjs → user-DDFDGJ0Y.mjs} +1 -1
- package/dist/{values-CDKQL1z2.mjs → values-DRznB_Cl.mjs} +1 -1
- package/dist/{vectorize-CTYYUyQj.mjs → vectorize-CbznPhzq.mjs} +1 -1
- package/dist/waiting-rooms-CKP5hYBK.mjs +11 -0
- package/dist/{web-assets-CpDwDEx8.mjs → web-assets-C-ZoSkkh.mjs} +1 -1
- package/dist/{web3-YsjDyAzH.mjs → web3-DwlN4dOw.mjs} +1 -1
- package/dist/{workers-builds-BWo5vUA9.mjs → workers-builds-ECw_x_kp.mjs} +1 -1
- package/dist/{workers-for-platforms-ASJsxYdM.mjs → workers-for-platforms-BYGy46R6.mjs} +2 -2
- package/dist/{workers-vpc-RkTnRvA2.mjs → workers-vpc-CCosFcxz.mjs} +1 -1
- package/dist/workers-zFMrbUkg.mjs +6 -0
- package/dist/{workflows-KrIFI9ns.mjs → workflows-C8GXGDRW.mjs} +1 -1
- package/dist/{zaraz-DglXbVzZ.mjs → zaraz-B5UIREaz.mjs} +1 -1
- package/dist/{zero-trust-RilTdSjX.mjs → zero-trust-DUp0XoIo.mjs} +50 -50
- package/dist/{zone-DsBtVkvT.mjs → zone-BGLkk-mL.mjs} +1 -1
- package/dist/{zones-BFxvWFQW.mjs → zones-CwYjNXMH.mjs} +1 -1
- package/package.json +11 -11
- package/dist/analytics-BaUZwNc5.mjs +0 -4
- package/dist/build-0QlYUfFS.mjs +0 -2
- package/dist/cf-C11NGkjx.mjs +0 -18
- package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
- package/dist/command-CMzMsll4.mjs +0 -2
- package/dist/custom-pages-DzKnSgL3.mjs +0 -3
- package/dist/d1-JBEqjJoj.mjs +0 -20
- package/dist/data-security-CIktWnXt.mjs +0 -7
- package/dist/dist-12KzRsBM.mjs +0 -387
- package/dist/dist-BCVqQpg2.mjs +0 -2
- package/dist/dist-Cp3uJN1x.mjs +0 -48
- package/dist/dist-S9K_8gq9.mjs +0 -9
- package/dist/dry-run-DiVy1lVo.mjs +0 -2
- package/dist/interactive-B2E03Fs-.mjs +0 -11
- package/dist/interactive-_B-EqD0Y.mjs +0 -23
- package/dist/logexplorer-D8rOPB5I.mjs +0 -17
- package/dist/logs-CDo7Y5sA.mjs +0 -3
- package/dist/oauth-DH3kMXSs.mjs +0 -14
- package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
- package/dist/prompt-DjRTpML4.mjs +0 -3
- package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
- package/dist/request-headers-CC4eHmI2.mjs +0 -3
- package/dist/run-CRfinkSe.mjs +0 -2
- package/dist/schemas-O_ZNaF8R.mjs +0 -65
- package/dist/spawn-C1AISA2V.mjs +0 -526
- package/dist/src-C8phrg-8.mjs +0 -109
- package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
- package/dist/workers-BKKxaZcz.mjs +0 -6
- /package/dist/{alerts-B2SJO4nd.mjs → alerts-CarPLL8k.mjs} +0 -0
- /package/dist/{autorag-iNjZXw1n.mjs → autorag-zK-3harf.mjs} +0 -0
- /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-Cmw7PZ7a.mjs} +0 -0
- /package/dist/{brands-BrVnNrT3.mjs → brands-CpgTsX8h.mjs} +0 -0
- /package/dist/{clear-an9o3dJ3.mjs → clear-C5gzBA8G.mjs} +0 -0
- /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-abvWQN3T.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-BY-dbhQZ.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-DoMvHvCO.mjs} +0 -0
- /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-Cw3G4nap.mjs} +0 -0
- /package/dist/{health-CIUg1C5o.mjs → health-DkEXPkS6.mjs} +0 -0
- /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-nF-0Ze2h.mjs} +0 -0
- /package/dist/{internal-DmpATljO.mjs → internal-4fU2r5en.mjs} +0 -0
- /package/dist/{live-B66u3_0g.mjs → live-B4iGrwY2.mjs} +0 -0
- /package/dist/{metadata-D062SVyy.mjs → metadata-C5fJJr-k.mjs} +0 -0
- /package/dist/{output-COcSQsfn.mjs → output-Z2lQmPUW.mjs} +0 -0
- /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-DNsAFIeM.mjs} +0 -0
- /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-CsOim7bm.mjs} +0 -0
- /package/dist/{ready-C-H2cwp_.mjs → ready-tTe-zcIw.mjs} +0 -0
- /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-B3eTV5yC.mjs} +0 -0
- /package/dist/{refute-uSlzkQKq.mjs → refute-BY76YVrT.mjs} +0 -0
- /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-DdoF_a5y.mjs} +0 -0
- /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-sSgLwwZN.mjs} +0 -0
- /package/dist/{search-BlKeSfVD.mjs → search-BFvQr-sl.mjs} +0 -0
- /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-Cr8hiZPJ.mjs} +0 -0
- /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-DT2mLnu1.mjs} +0 -0
- /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-6gs5iy9T.mjs} +0 -0
- /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-D6XKO2EV.mjs} +0 -0
- /package/dist/{verify-S-TmhUDr.mjs → verify-CM1NakP0.mjs} +0 -0
package/dist/config.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
export*from"@cloudflare/config/public";export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as c,t as l}from"./body-parser-Cmw7PZ7a.mjs";function u(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`reboot-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`restart-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`shutdown-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Interrupt action for a connector.`})}const d={command:`create <connector-id>`,describe:`Creates an interrupt for a Magic WAN Connector.`,builder:u,handler:async u=>s({command:`connector-interrupts create`,classification:{safeFlags:[`reboot-purge`,`restart-purge`,`shutdown-purge`,`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf connector-interrupts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${u[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(u[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(u[`connector-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({reboot:{purge:u[`reboot-purge`]},restart:{purge:u[`restart-purge`]},shutdown:{purge:u[`shutdown-purge`]}}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.connectorInterrupts.create({...e,account_id:d,connector_id:u[`connector-id`]})),{successLabel:`Created`});return}let f=l({reboot:{purge:u[`reboot-purge`]},restart:{purge:u[`restart-purge`]},shutdown:{purge:u[`shutdown-purge`]}});i(await o(`Creating`,async()=>s.connectorInterrupts.create({...f,account_id:d,connector_id:u[`connector-id`]})),{successLabel:`Created`})})};function f(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`list`,describe:`Lists interrupts for a Magic WAN Connector.`,builder:f,handler:async c=>s({command:`connector-interrupts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connector-interrupts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectorInterrupts.list({account_id:l,connector_id:c[`connector-id`]})),{successLabel:`Loaded`})})},m={command:`connector-interrupts`,describe:`connector-interrupts`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
package/dist/{connector-telemetry-events-PrJWgNs9.mjs → connector-telemetry-events-CCD-_B-8.mjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";function c(e){return e.positional(`event-n`,{type:`string`,description:`Event n`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`event-t`,{type:`string`,description:`Event t`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get <event-n>`,describe:`Gets Magic WAN Connector Telemetry Event`,builder:c,handler:async c=>s({command:`connector-telemetry-events get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connector-telemetry-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/events/${c[`event-t`]==null?`<event-t>`:encodeURIComponent(String(c[`event-t`]))}.${c[`event-n`]==null?`<event-n>`:encodeURIComponent(String(c[`event-n`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``),"event-t":String(c[`event-t`]??``),"event-n":String(c[`event-n`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectorTelemetryEvents.get({account_id:l,connector_id:c[`connector-id`],event_t:c[`event-t`],event_n:c[`event-n`]})),{successLabel:`Loaded`})})};function u(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`kind`,{type:`string`,description:`Filter by event kind`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`Lists Magic WAN Connector Telemetry Events`,builder:u,handler:async c=>s({command:`connector-telemetry-events list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={from:c.from,to:c.to,limit:c.limit,cursor:c.cursor,k:c.kind};if(c.dryRun){a({command:`cf connector-telemetry-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/events`,pathParams:{"connector-id":String(c[`connector-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetryEvents.list({account_id:u,connector_id:c[`connector-id`],...s})),{successLabel:`Loaded`})})},f={command:`connector-telemetry-events`,describe:`connector-telemetry-events`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";function c(e){return e.positional(`snapshot-t`,{type:`string`,description:`Snapshot t`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get <snapshot-t>`,describe:`Gets Magic WAN Connector Telemetry Snapshot`,builder:c,handler:async c=>s({command:`connector-telemetry-snapshots get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connector-telemetry-snapshots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/snapshots/${c[`snapshot-t`]==null?`<snapshot-t>`:encodeURIComponent(String(c[`snapshot-t`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``),"snapshot-t":String(c[`snapshot-t`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectorTelemetrySnapshots.get({account_id:l,connector_id:c[`connector-id`],snapshot_t:c[`snapshot-t`]})),{successLabel:`Loaded`})})};function u(e){return e.option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`from`,{type:`number`,description:`From`,demandOption:!0}).option(`to`,{type:`number`,description:`To`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`Lists Magic WAN Connector Telemetry Snapshots`,builder:u,handler:async c=>s({command:`connector-telemetry-snapshots list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={from:c.from,to:c.to,limit:c.limit,cursor:c.cursor};if(c.dryRun){a({command:`cf connector-telemetry-snapshots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/snapshots`,pathParams:{"connector-id":String(c[`connector-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.connectorTelemetrySnapshots.list({account_id:u,connector_id:c[`connector-id`],...s})),{successLabel:`Loaded`})})},f={command:`connector-telemetry-snapshots`,describe:`connector-telemetry-snapshots`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as c,t as l}from"./body-parser-Cmw7PZ7a.mjs";import{n as u}from"./input-validation-nF-0Ze2h.mjs";import{n as d}from"./prompt-BP8XrQSj.mjs";import{t as f}from"./cli-types-abvWQN3T.mjs";function p(e){return e.option(`device-id`,{type:`string`,description:`The device.id field`}).option(`device-provision-license`,{type:`boolean`,description:`When true, create and provision a new licence key for the connector.`}).option(`device-serial-number`,{type:`string`,description:`The device.serial_number field`}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Creates a Magic WAN Connector.`,builder:p,handler:async d=>s({command:`connectors create`,classification:{safeFlags:[`device-provision-license`,`activated`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf connectors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},bodyKind:`json`,body:d.body===void 0?l({device:{id:u(d[`device-id`],`device-id`,`text`),provision_license:d[`device-provision-license`],serial_number:u(d[`device-serial-number`],`device-serial-number`,`text`)},activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.connectors.create({...e,account_id:f})),{successLabel:`Created`});return}let p=l({device:{id:u(d[`device-id`],`device-id`,`text`),provision_license:d[`device-provision-license`],serial_number:u(d[`device-serial-number`],`device-serial-number`,`text`)},activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`)});i(await o(`Creating`,async()=>s.connectors.create({...p,account_id:f})),{successLabel:`Created`})})};function h(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <connector-id>`,describe:`Deletes a Magic WAN Connector.`,builder:h,handler:async c=>s({command:`connectors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf connectors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>s.connectors.delete({account_id:l,connector_id:c[`connector-id`]})),{successLabel:`Deleted`})})};function _(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`provision-license`,{type:`boolean`,description:`When true, regenerate license key for the connector.`}).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:`edit <connector-id>`,describe:`Edits properties of a Magic WAN Connector. May be used to re-provision a license key.`,builder:_,handler:async d=>s({command:`connectors edit`,classification:{safeFlags:[`activated`,`provision-license`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf connectors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${d[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(d[`connector-id`]))}`,pathParams:{"connector-id":String(d[`connector-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`),provision_license:d[`provision-license`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.connectors.edit({...e,account_id:f,connector_id:d[`connector-id`]})),{successLabel:`Updated`});return}let p=l({activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`),provision_license:d[`provision-license`]});i(await o(`Updating`,async()=>s.connectors.edit({...p,account_id:f,connector_id:d[`connector-id`]})),{successLabel:`Updated`})})};function y(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <connector-id>`,describe:`Gets a Magic WAN Connector.`,builder:y,handler:async c=>s({command:`connectors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectors.get({account_id:l,connector_id:c[`connector-id`]})),{successLabel:`Loaded`})})};function x(e){return e.option(`device-type`,{type:`string`,description:`Filter connectors by device type.`,choices:[`MANAGED`,`LICENSED`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`Lists Magic WAN Connectors.`,builder:f(x),handler:async c=>s({command:`connectors list`,classification:{safeFlags:[`device-type`,`dry-run`]}},c,async()=>{let s={device_type:c[`device-type`]};if(c.dryRun){a({command:`cf connectors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.connectors.list({account_id:u,...s})),{successLabel:`Loaded`})})};function C(e){return e.positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`provision-license`,{type:`boolean`,description:`When true, regenerate license key for the connector.`}).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 w={command:`update <connector-id>`,describe:`Updates properties of a Magic WAN Connector. May be used to re-provision a license key.`,builder:C,handler:async d=>s({command:`connectors update`,classification:{safeFlags:[`activated`,`provision-license`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf connectors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${d[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(d[`connector-id`]))}`,pathParams:{"connector-id":String(d[`connector-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`),provision_license:d[`provision-license`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.connectors.update({...e,account_id:f,connector_id:d[`connector-id`]})),{successLabel:`Updated`});return}let p=l({activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`),provision_license:d[`provision-license`]});i(await o(`Updating`,async()=>s.connectors.update({...p,account_id:f,connector_id:d[`connector-id`]})),{successLabel:`Updated`})})},T={command:`connectors`,describe:`connectors`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{U as e}from"./dist-CyisSore.mjs";import{r as t}from"./ui-DQSZeaG5.mjs";import{t as n}from"./local-BwL_gesw.mjs";import{f as r,g as i,p as a}from"./oauth-BdVr2hJp.mjs";import{n as o}from"./request-headers-BhQQAfJt.mjs";import{i as s,r as c}from"./auth-DWxtJ918.mjs";import{t as l}from"./output-Z2lQmPUW.mjs";import{t as u}from"./dry-run-YSQndLvt.mjs";import{t as d}from"./progress-a5IKeKni.mjs";import{r as f,t as p}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as m,r as h,t as g}from"./body-parser-Cmw7PZ7a.mjs";import{n as _}from"./input-validation-nF-0Ze2h.mjs";import{a as v,i as y,n as b}from"./prompt-BP8XrQSj.mjs";import{t as ee}from"./cli-types-abvWQN3T.mjs";import{C as x,E as S,b as te,c as C,d as w,g as T,h as E,o as D,p as O,u as k,v as A,w as j}from"./dist-Dr4Hg_Up.mjs";function M(e){return e.positional(`path`,{type:`string`,demandOption:!0,description:`Directory containing the Dockerfile to build`}).option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Name and optional tag for the built image`}).option(`push`,{alias:`p`,type:`boolean`,default:!1,description:`Push the built image to Cloudflare's managed registry`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var N=f({command:`build <path>`,describe:`Build a Container image`,builder:M,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers build`.");let n={compliance_region:t.push?await a():`public`},i=t.push?await s():``,o=S(i);E({logger:o.logger,fetchResult:o.fetchResult,fetchPagedListResult:o.fetchPagedListResult}),t.push&&k(await r(),i,e(n)),await C({PATH:t.path,tag:t.tag,push:t.push,pathToDocker:t[`path-to-docker`]},n)}},{command:`containers build`,classification:{safeFlags:[`push`],shortFlagAliases:{p:{canonical:`push`,type:`boolean`},t:{canonical:`tag`,type:`value`}}}});function P(e){return e.option(`tag`,{alias:`t`,type:`string`,demandOption:!0,description:`Tag of the local image to push`}).option(`path-to-docker`,{type:`string`,description:`Path to the Docker binary if it is not on PATH`})}var F=f({command:`push`,describe:`Push a local image to the Cloudflare managed registry`,builder:P,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers push`.");let n=await s(),i=await r(),o={compliance_region:await a()},c=S(n);E({logger:c.logger,fetchResult:c.fetchResult,fetchPagedListResult:c.fetchPagedListResult}),k(i,n,e(o)),await te({TAG:t.tag,pathToDocker:t[`path-to-docker`]},i,o)}},{command:`containers push`,classification:{safeFlags:[],shortFlagAliases:{t:{canonical:`tag`,type:`value`}}}});function I(e){return e.positional(`id`,{type:`string`,demandOption:!0,description:`ID of the container instance`}).positional(`ssh-command`,{type:`string`,array:!0,description:`Command and arguments to run in the container`}).options(w).middleware(e=>{x(e)&&(e.quiet=!0)},!0).parserConfiguration({"populate--":!0,"unknown-options-as-args":!0,"parse-positional-numbers":!1})}const L={command:`ssh <id> [ssh-command..]`,describe:`SSH into a container`,builder:I,handler:async t=>{if(t.local)throw Error("--local is not supported with `cf containers ssh`.");let n=await s(),i=await r(),c={compliance_region:await a()},l=S(n);E({logger:l.logger,fetchResult:l.fetchResult}),D.HEADERS=o(),k(i,n,e(c)),await j({...t,id:t.id,command:[...t[`ssh-command`]??[],...Array.isArray(t[`--`])?t[`--`].map(String):[]]})}},R=f(L,{command:`containers ssh`,recordArgs:!1});var z={...R,handler:async e=>{if(x(e)){let{markCommandReported:t}=await import(`./telemetry-n3NJourL.mjs`).then(e=>e.t);return t(),L.handler(e)}return R.handler(e)}};function B(e){return e.option(`configuration-command`,{type:`string`,array:!0,description:`The command that runs when the container starts, passed to the entrypoint.
|
|
3
3
|
You can override this at run-time. If you override only the command,
|
|
4
4
|
it gets passed to the default entrypoint specified in the image.
|
|
5
5
|
`}).option(`configuration-entrypoint`,{type:`string`,array:!0,description:`The entry point for the container, specifying the executable to run when the container starts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BdVr2hJp.mjs";import{r as t}from"./auth-DWxtJ918.mjs";import{t as n}from"./output-Z2lQmPUW.mjs";import{t as r}from"./dry-run-YSQndLvt.mjs";import{t as i}from"./progress-a5IKeKni.mjs";import{t as a}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as o,t as s}from"./body-parser-Cmw7PZ7a.mjs";import{n as c}from"./input-validation-nF-0Ze2h.mjs";import{a as l,i as u,n as d}from"./prompt-BP8XrQSj.mjs";function f(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const p={command:`create`,describe:'Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example `lookup_json_string(http.request.body.raw, "file")`.',builder:f,handler:async s=>a({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let a=await t(s),c=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=c,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.contentScan.expressions.create({body:e,zone_id:c})),{successLabel:`Created`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,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 <expression-id>`,describe:`Delete the Content Scanning custom expression with the given identifier and return the expressions that remain. Content objects reached only by the deleted expression are no longer scanned.`,builder:m,handler:async o=>a({command:`content-scan expressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf content-scan expressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/content-upload-scan/payloads/${o[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(o[`expression-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"expression-id":String(o[`expression-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force,message:`This operation deletes a Content Scanning custom expression.`})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>a.contentScan.expressions.delete({zone_id:s,expression_id:o[`expression-id`]})),{successLabel:`Deleted`})})};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List the Content Scanning custom expressions configured for the zone, each with its own identifier. A custom expression tells the scanner how to reach content objects in a request it cannot parse on its own, such as files Base64-encoded inside a JSON body.`,builder:g,handler:async o=>a({command:`content-scan expressions list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf content-scan expressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.contentScan.expressions.list({zone_id:s})),{successLabel:`Loaded`})})};function v(e){return e.positional(`expression-id`,{type:`string`,description:`Defines the unique ID for this Content Scanning custom expression.`,demandOption:!0}).option(`payload`,{type:`string`,description:`Defines the custom content extraction expression used to reach content objects in the request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Content Scanning custom expression to update.`})}const y={command:`update <expression-id>`,describe:`Update the Content Scanning custom expression with the given identifier and return the updated list of expressions.`,builder:v,handler:async u=>a({command:`content-scan expressions update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf content-scan expressions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/content-upload-scan/payloads/${u[`expression-id`]==null?`<expression-id>`:encodeURIComponent(String(u[`expression-id`]))}`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``),"expression-id":String(u[`expression-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({payload:c(u.payload,`payload`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.contentScan.expressions.update({...e,zone_id:d,expression_id:u[`expression-id`]})),{successLabel:`Updated`});return}u.payload===void 0&&(u.payload=await l(`payload`,`Defines the custom content extraction expression used to reach content objects in the request.`));let f=s({payload:c(u.payload,`payload`,`text`)});n(await i(`Updating`,async()=>a.contentScan.expressions.update({...f,zone_id:d,expression_id:u[`expression-id`]})),{successLabel:`Updated`})})},b={command:`expressions`,describe:`Custom expressions that tell the scanner how to reach content objects it cannot parse on its own`,builder:e=>e.command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get the current Content Scanning status for the zone, together with the date the status was last modified.`,builder:x,handler:async o=>a({command:`content-scan get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf content-scan get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.contentScan.get({zone_id:s})),{successLabel:`Loaded`})})};function C(e){return e.option(`value`,{type:`string`,description:`The status value for Content Scanning.`,choices:[`enabled`,`disabled`]}).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:`Content Scanning settings to update.`})}const w={command:`update`,describe:"Update the Content Scanning status by setting the status value to `enabled` or `disabled`. This is equivalent to calling the dedicated enable and disable endpoints.",builder:C,handler:async l=>a({command:`content-scan update`,classification:{safeFlags:[`value`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){r({command:`cf content-scan update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/content-upload-scan/settings`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({value:c(l.value,`value`,`text`)}):o(l.body)});return}let a=await t(l),f=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=f,!await d({force:!!l.force,message:`This operation toggles Content Scanning for a zone.`})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}if(l.body){let e=o(l.body);n(await i(`Deleting`,async()=>a.contentScan.update({...e,zone_id:f})),{successLabel:`Deleted`});return}l.value===void 0&&(l.value=await u(`value`,`The status value for Content Scanning.`,[`enabled`,`disabled`]));let p=s({value:c(l.value,`value`,`text`)});n(await i(`Deleting`,async()=>a.contentScan.update({...p,zone_id:f})),{successLabel:`Deleted`})})},T={command:`content-scan`,describe:`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,builder:e=>e.command(S).command(w).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-DWxtJ918.mjs";import{t}from"./output-Z2lQmPUW.mjs";import{t as n}from"./dry-run-YSQndLvt.mjs";import{t as r}from"./progress-a5IKeKni.mjs";import{t as i}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as a,t as o}from"./body-parser-Cmw7PZ7a.mjs";import{n as s}from"./input-validation-nF-0Ze2h.mjs";function c(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Retrieve the communication preferences for the authenticated user, including email verification status, marketing subscription opt-in/opt-out state, and language locale. Callers authenticate with standard Cloudflare API tokens or keys.`,builder:c,handler:async a=>i({command:`cps get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf cps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.cps.get()),{successLabel:`Loaded`})})};function u(e){return e.option(`language-locale`,{type:`string`,description:`The user's preferred language locale for communications. If omitted, the language locale does not change.`,choices:[`en-US`,`es-ES`,`de-DE`,`fr-FR`,`it-IT`,`ja-JP`,`ko-KR`,`pt-BR`,`zh-CN`,`zh-TW`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating communication preferences. An email field in the payload is ignored; email verification state is managed separately, so the field is excluded from this schema.`})}const d={command:`update`,describe:`Set one or more communication preferences for the authenticated user. Supply a map of preference keys to subscription states, and an optional language locale. This endpoint does not modify email verification settings. Callers authenticate with standard Cloudflare API tokens or keys.`,builder:u,handler:async c=>i({command:`cps update`,classification:{safeFlags:[`language-locale`,`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf cps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`json`,body:c.body===void 0?o({"language-locale":s(c[`language-locale`],`language-locale`,`text`)}):a(c.body)});return}let i=await e(c);if(c.body){let e=a(c.body);t(await r(`Updating`,async()=>i.cps.update({...e})),{successLabel:`Updated`});return}let l=o({"language-locale":s(c[`language-locale`],`language-locale`,`text`)});t(await r(`Updating`,async()=>i.cps.update({...l})),{successLabel:`Updated`})})},f={command:`cps`,describe:`cps`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BdVr2hJp.mjs";import{r as t}from"./auth-DWxtJ918.mjs";import{t as n}from"./output-Z2lQmPUW.mjs";import{t as r}from"./dry-run-YSQndLvt.mjs";import{t as i}from"./progress-a5IKeKni.mjs";import{t as a}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as o,t as s}from"./body-parser-Cmw7PZ7a.mjs";import{n as c}from"./input-validation-nF-0Ze2h.mjs";function l(e){return e.option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
|
|
3
3
|
email verification is triggered automatically.
|
|
4
4
|
`}).option(`value-enabled`,{type:`boolean`,description:`Whether CSAM scanning is enabled for this zone.`}).option(`value-resend-email`,{type:`boolean`,description:`Set to true to trigger re-sending the email verification.
|
|
5
5
|
Write-only; never appears in responses (omitted when false).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BdVr2hJp.mjs";import{r as t}from"./auth-DWxtJ918.mjs";import{t as n}from"./output-Z2lQmPUW.mjs";import{t as r}from"./dry-run-YSQndLvt.mjs";import{t as i}from"./progress-a5IKeKni.mjs";import{t as a}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as o,t as s}from"./body-parser-Cmw7PZ7a.mjs";function c(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Retrieve the Certificate Transparency alerting subscription settings for a zone. Returns whether CT monitoring is enabled and the list of email addresses that receive alerts, if any have been configured.`,builder:c,handler:async o=>a({command:`ct-alerting get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ct-alerting get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.ctAlerting.get({zone_id:s})),{successLabel:`Loaded`})})};function u(e){return e.option(`emails`,{type:`string`,array:!0,description:`Email addresses that receive CT alert notifications for the zone. A maximum of 100 addresses may be configured. Each address must be a valid RFC 5322 email address and must not contain a comma.
|
|
3
3
|
`}).option(`enabled`,{type:`boolean`,description:`Whether CT alerting is enabled for the zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating CT alerting subscription settings.`})}const d={command:`update`,describe:"Create or update the Certificate Transparency alerting subscription for a zone. Enables or disables email notifications when certificates are issued for the zone's domains. The `enabled` field is required on every request and controls whether the subscription is active. The `emails` field is optional and, when provided, replaces the stored recipient list for the zone. When `emails` is omitted, the stored recipient list is preserved and only the enabled state is toggled. A maximum of 100 email addresses may be configured per zone. Requests that omit `enabled` are rejected with error code 1008. Subscribe and unsubscribe notification emails are only sent for recipients whose effective subscription state changes. Idempotent requests (no state change) send no notification email.",builder:u,handler:async c=>a({command:`ct-alerting update`,classification:{safeFlags:[`enabled`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf ct-alerting update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ct/alerting`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({emails:c.emails,enabled:c.enabled}):o(c.body)});return}let a=await t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.ctAlerting.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(c.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=s({emails:c.emails,enabled:c.enabled});n(await i(`Updating`,async()=>a.ctAlerting.update({...u,zone_id:l})),{successLabel:`Updated`})})},f={command:`ct-alerting`,describe:`ct-alerting`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BdVr2hJp.mjs";import{r as t}from"./auth-DWxtJ918.mjs";import{t as n}from"./output-Z2lQmPUW.mjs";import{t as r}from"./dry-run-YSQndLvt.mjs";import{t as i}from"./progress-a5IKeKni.mjs";import{t as a}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as o,r as s,t as c}from"./body-parser-Cmw7PZ7a.mjs";import{n as l}from"./input-validation-nF-0Ze2h.mjs";import{a as u,n as d}from"./prompt-BP8XrQSj.mjs";import{t as f}from"./cli-types-abvWQN3T.mjs";function p(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`],default:`production`}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
|
|
3
3
|
Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".`}).option(`private-key`,{type:`string`,description:`The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare.`}).option(`type`,{type:`string`,description:`The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake.`,choices:[`legacy_custom`,`sni_custom`],default:`legacy_custom`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Upload a new SSL certificate for a zone.`,builder:p,handler:async s=>a({command:`custom-certificates create`,classification:{safeFlags:[`bundle-method`,`deploy`,`geo-restrictions-label`,`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf custom-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/custom_certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`),type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.customCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's SSL certificate or certificate and the intermediate(s).`));let f=c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`),type:l(s.type,`type`,`text`)});n(await i(`Creating`,async()=>a.customCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function h(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`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 g={command:`delete <custom-certificate-id>`,describe:`Remove a SSL certificate from a zone.`,builder:h,handler:async o=>a({command:`custom-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf custom-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_certificates/${o[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(o[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(o[`custom-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}n(await i(`Deleting`,async()=>a.customCertificates.delete({zone_id:s,custom_certificate_id:o[`custom-certificate-id`]})),{successLabel:`Deleted`})})};function _(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).option(`custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`deploy`,{type:`string`,description:`The environment to deploy the certificate to, defaults to production.`,choices:[`staging`,`production`]}).option(`geo-restrictions-label`,{type:`string`,description:`The geo_restrictions.label field`,choices:[`us`,`eu`,`highest_security`]}).option(`policy`,{type:`string`,description:`Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as 'country: IN', as well as 'region: EU' which refers to the EU region. If there are too few data centers satisfying the policy, it will be rejected.
|
|
5
5
|
Note: The API accepts this field as either "policy" or "policy_restrictions" in requests. Responses return this field as "policy_restrictions".`}).option(`private-key`,{type:`string`,description:`The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare.`}).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:`edit <custom-certificate-id>`,describe:`Upload a new private key and/or PEM/CRT for the SSL certificate. Note: PATCHing a configuration for sni_custom certificates will result in a new resource id being returned, and the previous one being deleted.`,builder:_,handler:async s=>a({command:`custom-certificates edit`,classification:{safeFlags:[`bundle-method`,`deploy`,`geo-restrictions-label`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf custom-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/custom_certificates/${s[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(s[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(s[`custom-certificate-id`]??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.customCertificates.edit({...e,zone_id:u,custom_certificate_id:s[`custom-certificate-id`]})),{successLabel:`Updated`});return}let d=c({bundle_method:l(s[`bundle-method`],`bundle-method`,`text`),certificate:l(s.certificate,`certificate`,`text`),custom_csr_id:l(s[`custom-csr-id`],`custom-csr-id`,`text`),deploy:l(s.deploy,`deploy`,`text`),geo_restrictions:{label:l(s[`geo-restrictions-label`],`geo-restrictions-label`,`text`)},policy:l(s.policy,`policy`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)});n(await i(`Updating`,async()=>a.customCertificates.edit({...d,zone_id:u,custom_certificate_id:s[`custom-certificate-id`]})),{successLabel:`Updated`})})};function y(e){return e.positional(`custom-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <custom-certificate-id>`,describe:`Retrieves details for a specific custom SSL certificate, including certificate metadata, bundle method, geographic restrictions, and associated keyless server configuration.`,builder:y,handler:async o=>a({command:`custom-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf custom-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_certificates/${o[`custom-certificate-id`]==null?`<custom-certificate-id>`:encodeURIComponent(String(o[`custom-certificate-id`]))}`,pathParams:{"custom-certificate-id":String(o[`custom-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.customCertificates.get({zone_id:s,custom_certificate_id:o[`custom-certificate-id`]})),{successLabel:`Loaded`})})};function x(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of zones per page.`}).option(`match`,{type:`string`,description:`Whether to match all search requirements or at least one (any).`,choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`Status of the zone's custom SSL.`,choices:[`active`,`expired`,`deleted`,`pending`,`initializing`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List, search, and filter all of your custom SSL certificates. The higher priority will break ties across overlapping 'legacy_custom' certificates, but 'legacy_custom' certificates will always supercede 'sni_custom' certificates.`,builder:f(x),handler:async o=>a({command:`custom-certificates list`,classification:{safeFlags:[`match`,`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],match:o.match,status:o.status};if(o.dryRun){r({command:`cf custom-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.customCertificates.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function C(e){return e.option(`certificates`,{type:`string`,description:`Array of ordered certificates. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`update`,describe:`If a zone has multiple SSL certificates, you can set the order in which they should be used during a request. The higher priority will break ties across overlapping 'legacy_custom' certificates.`,builder:C,handler:async l=>a({command:`custom-certificates prioritize update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf custom-certificates prioritize update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_certificates/prioritize`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({certificates:s(l.certificates,`certificates`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.customCertificates.prioritize.update({...e,zone_id:u})),{successLabel:`Updated`});return}if(l.certificates===void 0)throw Error(`--certificates is required (or pass --body with this field set).`);let d=c({certificates:s(l.certificates,`certificates`)});n(await i(`Updating`,async()=>a.customCertificates.prioritize.update({...d,zone_id:u})),{successLabel:`Updated`})})},T={command:`prioritize`,describe:`Operations for prioritize`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`custom-certificates`,describe:`custom-certificates`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n,h as r}from"./oauth-BdVr2hJp.mjs";import{r as i}from"./auth-DWxtJ918.mjs";import{t as a}from"./output-Z2lQmPUW.mjs";import{t as o}from"./dry-run-YSQndLvt.mjs";import{t as s}from"./progress-a5IKeKni.mjs";import{t as c}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as l,t as u}from"./body-parser-Cmw7PZ7a.mjs";import{n as d}from"./input-validation-nF-0Ze2h.mjs";import{a as f,n as p}from"./prompt-BP8XrQSj.mjs";import{t as m}from"./cli-types-abvWQN3T.mjs";function h(e){return e.option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a custom CSR.`})}const g={command:`customCsrsForAnAccountCreateCustomCsr`,describe:`Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.`,builder:h,handler:async p=>c({command:`custom-csrs customCsrsForAnAccountCreateCustomCsr`,classification:{safeFlags:[`key-type`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-csrs customCsrsForAnAccountCreateCustomCsr`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({common_name:d(p[`common-name`],`common-name`,`text`),country:d(p.country,`country`,`text`),description:d(p.description,`description`,`text`),key_type:d(p[`key-type`],`key-type`,`text`),locality:d(p.locality,`locality`,`text`),name:d(p.name,`name`,`text`),organization:d(p.organization,`organization`,`text`),organizational_unit:d(p[`organizational-unit`],`organizational-unit`,`text`),sans:p.sans,state:d(p.state,`state`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await t();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customCsrs.customCsrsForAnAccountCreateCustomCsr({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}if(p[`common-name`]===void 0&&(p[`common-name`]=await f(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),p.country===void 0&&(p.country=await f(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),p.locality===void 0&&(p.locality=await f(`locality`,`City or locality name.`)),p.organization===void 0&&(p.organization=await f(`organization`,`Organization name.`)),p.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);p.state===void 0&&(p.state=await f(`state`,`State or province name.`));let g=u({common_name:d(p[`common-name`],`common-name`,`text`),country:d(p.country,`country`,`text`),description:d(p.description,`description`,`text`),key_type:d(p[`key-type`],`key-type`,`text`),locality:d(p.locality,`locality`,`text`),name:d(p.name,`name`,`text`),organization:d(p.organization,`organization`,`text`),organizational_unit:d(p[`organizational-unit`],`organizational-unit`,`text`),sans:p.sans,state:d(p.state,`state`,`text`)});a(await s(`Creating`,async()=>c.customCsrs.customCsrsForAnAccountCreateCustomCsr({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function _(e){return e.positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`customCsrsForAnAccountCustomCsrDetails <custom-csr-id>`,describe:`Retrieve details for a specific custom Certificate Signing Request (CSR).`,builder:_,handler:async l=>c({command:`custom-csrs customCsrsForAnAccountCustomCsrDetails`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-csrs customCsrsForAnAccountCustomCsrDetails`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs/${l[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(l[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(t),"custom-csr-id":String(l[`custom-csr-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customCsrs.customCsrsForAnAccountCustomCsrDetails({account_or_zone:u,account_or_zone_id:d,custom_csr_id:l[`custom-csr-id`]})),{successLabel:`Loaded`})})};function y(e){return e.positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`customCsrsForAnAccountDeleteCustomCsr <custom-csr-id>`,describe:`Delete a custom Certificate Signing Request (CSR) and its associated private key.`,builder:y,handler:async l=>c({command:`custom-csrs customCsrsForAnAccountDeleteCustomCsr`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-csrs customCsrsForAnAccountDeleteCustomCsr`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs/${l[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(l[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(t),"custom-csr-id":String(l[`custom-csr-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}a(await s(`Deleting`,async()=>c.customCsrs.customCsrsForAnAccountDeleteCustomCsr({account_or_zone:u,account_or_zone_id:d,custom_csr_id:l[`custom-csr-id`]})),{successLabel:`Deleted`})})};function x(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom CSRs per page.`}).option(`order`,{type:`string`,description:`The field to sort the returned custom CSRs by.`,choices:[`name`,`account_tag`,`created_at`]}).option(`direction`,{type:`string`,description:`The direction to sort by.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`customCsrsForAnAccountListCustomCsrs`,describe:`List all custom Certificate Signing Requests (CSRs) for an account or zone.`,builder:m(x),handler:async l=>c({command:`custom-csrs customCsrsForAnAccountListCustomCsrs`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-csrs customCsrsForAnAccountListCustomCsrs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_csrs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await t();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.customCsrs.customCsrsForAnAccountListCustomCsrs({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},C={command:`custom-csrs`,describe:`custom-csrs`,builder:e=>e.command(g).command(v).command(b).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{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BdVr2hJp.mjs";import{r as t}from"./auth-DWxtJ918.mjs";import{t as n}from"./output-Z2lQmPUW.mjs";import{t as r}from"./dry-run-YSQndLvt.mjs";import{t as i}from"./progress-a5IKeKni.mjs";import{t as a}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as o,t as s}from"./body-parser-Cmw7PZ7a.mjs";import{n as c}from"./input-validation-nF-0Ze2h.mjs";import{a as l,n as u}from"./prompt-BP8XrQSj.mjs";import{t as d}from"./cli-types-abvWQN3T.mjs";function f(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`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 p={command:`delete <certificate-id>`,describe:`Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`,builder:f,handler:async o=>a({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/${o[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(o[`custom-hostname-id`]))}/certificate_pack/${o[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(o[`certificate-pack-id`]))}/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(o[`custom-hostname-id`]??``),"certificate-pack-id":String(o[`certificate-pack-id`]??``),"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>a.customHostnames.certificatePack.certificates.delete({zone_id:s,custom_hostname_id:o[`custom-hostname-id`],certificate_pack_id:o[`certificate-pack-id`],certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function m(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).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:`update <certificate-id>`,describe:`Replace a single custom certificate within a certificate pack that contains two bundled certificates. The replacement must adhere to the following constraints. You can only replace an RSA certificate with another RSA certificate or an ECDSA certificate with another ECDSA certificate.`,builder:m,handler:async u=>a({command:`custom-hostnames certificate-pack certificates update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf custom-hostnames certificate-pack certificates update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/custom_hostnames/${u[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(u[`custom-hostname-id`]))}/certificate_pack/${u[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(u[`certificate-pack-id`]))}/certificates/${u[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(u[`certificate-id`]))}`,pathParams:{"custom-hostname-id":String(u[`custom-hostname-id`]??``),"certificate-pack-id":String(u[`certificate-pack-id`]??``),"certificate-id":String(u[`certificate-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({custom_certificate:c(u[`custom-certificate`],`custom-certificate`,`text`),custom_key:c(u[`custom-key`],`custom-key`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.customHostnames.certificatePack.certificates.update({body:e,zone_id:d,custom_hostname_id:u[`custom-hostname-id`],certificate_pack_id:u[`certificate-pack-id`],certificate_id:u[`certificate-id`]})),{successLabel:`Updated`});return}u[`custom-certificate`]===void 0&&(u[`custom-certificate`]=await l(`custom-certificate`,`If a custom uploaded certificate is used.`)),u[`custom-key`]===void 0&&(u[`custom-key`]=await l(`custom-key`,`The key for a custom uploaded certificate.`,{kind:`secret`}));let f=s({custom_certificate:c(u[`custom-certificate`],`custom-certificate`,`text`),custom_key:c(u[`custom-key`],`custom-key`,`text`)});n(await i(`Updating`,async()=>a.customHostnames.certificatePack.certificates.update({body:f,zone_id:d,custom_hostname_id:u[`custom-hostname-id`],certificate_pack_id:u[`certificate-pack-id`],certificate_id:u[`certificate-id`]})),{successLabel:`Updated`})})},g={command:`certificates`,describe:`Operations for certificate-pack.certificates`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`certificate-pack`,describe:`Operations for certificate-pack`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`hostname`,{type:`string`,description:`The custom hostname that will point to your hostname via CNAME.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).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:`Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, txt, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation). Enable bundling of certificates using the custom_cert_bundle field. The bundling process requires the following condition One certificate in the bundle must use an RSA, and the other must use an ECDSA.`,builder:v,handler:async u=>a({command:`custom-hostnames create`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf custom-hostnames create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({custom_origin_server:c(u[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:c(u[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:c(u.hostname,`hostname`,`text`),ssl:{bundle_method:c(u[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:c(u[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:u[`ssl-cloudflare-branding`],custom_certificate:c(u[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:c(u[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:c(u[`ssl-custom-key`],`ssl-custom-key`,`text`),method:c(u[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:u[`ssl-settings-ciphers`],early_hints:c(u[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:c(u[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:c(u[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:c(u[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:c(u[`ssl-type`],`ssl-type`,`text`),wildcard:u[`ssl-wildcard`]}}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.customHostnames.create({...e,zone_id:d})),{successLabel:`Created`});return}u.hostname===void 0&&(u.hostname=await l(`hostname`,`The custom hostname that will point to your hostname via CNAME.`));let f=s({custom_origin_server:c(u[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:c(u[`custom-origin-sni`],`custom-origin-sni`,`text`),hostname:c(u.hostname,`hostname`,`text`),ssl:{bundle_method:c(u[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:c(u[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:u[`ssl-cloudflare-branding`],custom_certificate:c(u[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:c(u[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:c(u[`ssl-custom-key`],`ssl-custom-key`,`text`),method:c(u[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:u[`ssl-settings-ciphers`],early_hints:c(u[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:c(u[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:c(u[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:c(u[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:c(u[`ssl-type`],`ssl-type`,`text`),wildcard:u[`ssl-wildcard`]}});n(await i(`Creating`,async()=>a.customHostnames.create({...f,zone_id:d})),{successLabel:`Created`})})};function b(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`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 x={command:`delete <custom-hostname-id>`,describe:`Permanently deletes a custom hostname and revokes any SSL certificates that were issued for it. This action cannot be undone.`,builder:b,handler:async o=>a({command:`custom-hostnames delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/${o[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(o[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(o[`custom-hostname-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}n(await i(`Deleting`,async()=>a.customHostnames.delete({zone_id:s,custom_hostname_id:o[`custom-hostname-id`]})),{successLabel:`Deleted`})})};function S(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`custom-origin-server`,{type:`string`,description:`a valid hostname that’s been added to your DNS zone as an A, AAAA, or CNAME record.`}).option(`custom-origin-sni`,{type:`string`,description:`A hostname that will be sent to your custom origin server as SNI for TLS handshake. This can be a valid subdomain of the zone or custom origin server name or the string ':request_host_header:' which will cause the host header in the request to be used as SNI. Not configurable with default/fallback origin server.`}).option(`ssl-bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`]}).option(`ssl-certificate-authority`,{type:`string`,description:`The Certificate Authority that will issue the certificate.`,choices:[`digicert`,`google`,`lets_encrypt`,`ssl_com`]}).option(`ssl-cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`ssl-custom-certificate`,{type:`string`,description:`If a custom uploaded certificate is used.`}).option(`ssl-custom-csr-id`,{type:`string`,description:`The identifier for the Custom CSR that was used.`}).option(`ssl-custom-key`,{type:`string`,description:`The key for a custom uploaded certificate.`}).option(`ssl-method`,{type:`string`,description:`Domain control validation (DCV) method used for this hostname.`,choices:[`http`,`txt`,`email`]}).option(`ssl-settings-ciphers`,{type:`string`,array:!0,description:`An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.`}).option(`ssl-settings-early-hints`,{type:`string`,description:`Whether or not Early Hints is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-http2`,{type:`string`,description:`Whether or not HTTP2 is enabled.`,choices:[`on`,`off`]}).option(`ssl-settings-min-tls-version`,{type:`string`,description:`The minimum TLS version supported.`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`ssl-settings-tls-1-3`,{type:`string`,description:`Whether or not TLS 1.3 is enabled.`,choices:[`on`,`off`]}).option(`ssl-type`,{type:`string`,description:`Level of validation to be used for this hostname. Domain validation (dv) must be used.`,choices:[`dv`]}).option(`ssl-wildcard`,{type:`boolean`,description:`Indicates whether the certificate covers a wildcard.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`edit <custom-hostname-id>`,describe:`Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'. Bundle an existing certificate with another certificate by using the "custom_cert_bundle" field. The bundling process supports combining certificates as long as the following condition is met. One certificate must use the RSA algorithm, and the other must use the ECDSA algorithm.`,builder:S,handler:async l=>a({command:`custom-hostnames edit`,classification:{safeFlags:[`ssl-bundle-method`,`ssl-certificate-authority`,`ssl-cloudflare-branding`,`ssl-method`,`ssl-settings-early-hints`,`ssl-settings-http2`,`ssl-settings-min-tls-version`,`ssl-settings-tls-1-3`,`ssl-type`,`ssl-wildcard`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf custom-hostnames edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/custom_hostnames/${l[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(l[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(l[`custom-hostname-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({custom_origin_server:c(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:c(l[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:c(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:c(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:c(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:c(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:c(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:c(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:c(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:c(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:c(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:c(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:c(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.customHostnames.edit({...e,zone_id:u,custom_hostname_id:l[`custom-hostname-id`]})),{successLabel:`Updated`});return}let d=s({custom_origin_server:c(l[`custom-origin-server`],`custom-origin-server`,`text`),custom_origin_sni:c(l[`custom-origin-sni`],`custom-origin-sni`,`text`),ssl:{bundle_method:c(l[`ssl-bundle-method`],`ssl-bundle-method`,`text`),certificate_authority:c(l[`ssl-certificate-authority`],`ssl-certificate-authority`,`text`),cloudflare_branding:l[`ssl-cloudflare-branding`],custom_certificate:c(l[`ssl-custom-certificate`],`ssl-custom-certificate`,`text`),custom_csr_id:c(l[`ssl-custom-csr-id`],`ssl-custom-csr-id`,`text`),custom_key:c(l[`ssl-custom-key`],`ssl-custom-key`,`text`),method:c(l[`ssl-method`],`ssl-method`,`text`),settings:{ciphers:l[`ssl-settings-ciphers`],early_hints:c(l[`ssl-settings-early-hints`],`ssl-settings-early-hints`,`text`),http2:c(l[`ssl-settings-http2`],`ssl-settings-http2`,`text`),min_tls_version:c(l[`ssl-settings-min-tls-version`],`ssl-settings-min-tls-version`,`text`),tls_1_3:c(l[`ssl-settings-tls-1-3`],`ssl-settings-tls-1-3`,`text`)},type:c(l[`ssl-type`],`ssl-type`,`text`),wildcard:l[`ssl-wildcard`]}});n(await i(`Updating`,async()=>a.customHostnames.edit({...d,zone_id:u,custom_hostname_id:l[`custom-hostname-id`]})),{successLabel:`Updated`})})};function w(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete`,describe:`Removes the fallback origin configuration for custom hostnames on a zone. Custom hostnames without specific origins will no longer have a fallback.`,builder:w,handler:async o=>a({command:`custom-hostnames fallback-origin delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames fallback-origin delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}n(await i(`Deleting`,async()=>a.customHostnames.fallbackOrigin.delete({zone_id:s})),{successLabel:`Deleted`})})};function E(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get`,describe:`Retrieves the current fallback origin configuration for custom hostnames on a zone. The fallback origin handles traffic when specific custom hostname origins are unavailable.`,builder:E,handler:async o=>a({command:`custom-hostnames fallback-origin get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames fallback-origin get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.customHostnames.fallbackOrigin.get({zone_id:s})),{successLabel:`Loaded`})})};function O(e){return e.option(`origin`,{type:`string`,description:`Your origin hostname that requests to your custom hostnames will be sent to.`}).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 k={command:`update`,describe:`Updates the fallback origin configuration for custom hostnames on a zone. Sets the default origin server for custom hostname traffic.`,builder:O,handler:async u=>a({command:`custom-hostnames fallback-origin update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf custom-hostnames fallback-origin update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/custom_hostnames/fallback_origin`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({origin:c(u.origin,`origin`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.customHostnames.fallbackOrigin.update({...e,zone_id:d})),{successLabel:`Updated`});return}u.origin===void 0&&(u.origin=await l(`origin`,`Your origin hostname that requests to your custom hostnames will be sent to.`));let f=s({origin:c(u.origin,`origin`,`text`)});n(await i(`Updating`,async()=>a.customHostnames.fallbackOrigin.update({...f,zone_id:d})),{successLabel:`Updated`})})},A={command:`fallback-origin`,describe:`Operations for fallback-origin`,builder:e=>e.command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.positional(`custom-hostname-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <custom-hostname-id>`,describe:`Retrieves detailed information about a specific custom hostname, including SSL certificate status, ownership verification, and origin configuration.`,builder:j,handler:async o=>a({command:`custom-hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/${o[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(o[`custom-hostname-id`]))}`,pathParams:{"custom-hostname-id":String(o[`custom-hostname-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.customHostnames.get({zone_id:s,custom_hostname_id:o[`custom-hostname-id`]})),{successLabel:`Loaded`})})};function N(e){return e.option(`hostname`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-exact`,{type:`string`,description:`Fully qualified domain name to match against. This parameter cannot be used with the 'id', 'hostname', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`hostname-starts-with`,{type:`string`,description:`Filters hostnames by a prefix match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.contain' parameters.`}).option(`hostname-contain`,{type:`string`,description:`Filters hostnames by a substring match on the hostname value. This parameter cannot be used with the 'id', 'hostname', 'hostname.exact', or 'hostname.startsWith' parameters.`}).option(`id`,{type:`string`,description:`Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname', 'hostname.exact', 'hostname.contain', or 'hostname.startsWith' parameters.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of hostnames per page.`}).option(`order`,{type:`string`,description:`Field to order hostnames by.`,choices:[`ssl`,`ssl_status`]}).option(`direction`,{type:`string`,description:`Direction to order hostnames.`,choices:[`asc`,`desc`]}).option(`ssl-status`,{type:`string`,description:`Filter by SSL certificate status.`,choices:[`initializing`,`pending_validation`,`deleted`,`pending_issuance`,`pending_deployment`,`pending_deletion`,`pending_expiration`,`expired`,`active`,`initializing_timed_out`,`validation_timed_out`,`issuance_timed_out`,`deployment_timed_out`,`deletion_timed_out`,`pending_cleanup`,`staging_deployment`,`staging_active`,`deactivating`,`inactive`,`backup_issued`,`holding_deployment`]}).option(`hostname-status`,{type:`string`,description:`Filter by the hostname's activation status.`,choices:[`active`,`pending`,`active_redeploying`,`moved`,`pending_deletion`,`deleted`,`pending_blocked`,`pending_migration`,`pending_provisioned`,`test_pending`,`test_active`,`test_active_apex`,`test_blocked`,`test_failed`,`provisioned`,`blocked`]}).option(`certificate-authority`,{type:`string`,description:`Filter by the certificate authority that issued the SSL certificate.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`wildcard`,{type:`boolean`,description:`Filter by whether the custom hostname is a wildcard hostname.`}).option(`custom-origin-server`,{type:`string`,description:`Filter by custom origin server name.`}).option(`ssl`,{type:`string`,description:`Whether to filter hostnames based on if they have SSL enabled.`,choices:[`0`,`1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List, search, sort, and filter all of your custom hostnames.`,builder:d(N),handler:async o=>a({command:`custom-hostnames list`,classification:{safeFlags:[`order`,`direction`,`ssl-status`,`hostname-status`,`certificate-authority`,`wildcard`,`ssl`,`dry-run`]}},o,async()=>{let a={hostname:o.hostname,"hostname.exact":o[`hostname-exact`],"hostname.startsWith":o[`hostname-starts-with`],"hostname.contain":o[`hostname-contain`],id:o.id,page:o.page,per_page:o[`per-page`],order:o.order,direction:o.direction,ssl_status:o[`ssl-status`],hostname_status:o[`hostname-status`],certificate_authority:o[`certificate-authority`],wildcard:o.wildcard,custom_origin_server:o[`custom-origin-server`],ssl:o.ssl};if(o.dryRun){r({command:`cf custom-hostnames list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.customHostnames.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function F(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Returns custom hostname quota usage for a zone. The allocated quota is a soft limit; creating custom hostnames after usage exceeds this limit can still succeed until the hard cap is reached. Use the exceeded and hard_cap fields to track when usage is above the soft limit and when new custom hostname creation will be rejected.`,builder:F,handler:async o=>a({command:`custom-hostnames quota get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf custom-hostnames quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/custom_hostnames/quota`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.customHostnames.quota.get({zone_id:s})),{successLabel:`Loaded`})})},L={command:`quota`,describe:`Operations for quota`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`custom-hostnames`,describe:`custom-hostnames`,builder:e=>e.command(y).command(x).command(C).command(M).command(P).command(_).command(A).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{R as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n,h as r}from"./oauth-BdVr2hJp.mjs";import{r as i}from"./auth-DWxtJ918.mjs";import{t as a}from"./output-Z2lQmPUW.mjs";import{t as o}from"./dry-run-YSQndLvt.mjs";import{t as s}from"./progress-a5IKeKni.mjs";import{t as c}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as l,t as u}from"./body-parser-Cmw7PZ7a.mjs";import{n as d}from"./input-validation-nF-0Ze2h.mjs";import{a as f,n as p}from"./prompt-BP8XrQSj.mjs";function m(e){return e.option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.`,builder:m,handler:async p=>c({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_ns`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await t();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customNameservers.create({body:e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`ns-name`]===void 0&&(p[`ns-name`]=await f(`ns-name`,`The FQDN of the name server.`));let g=u({ns_name:d(p[`ns-name`],`ns-name`,`text`),ns_set:p[`ns-set`]});a(await s(`Creating`,async()=>c.customNameservers.create({body:g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function g(e){return e.positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <custom-ns-id>`,describe:`Removes a custom nameserver from the account.`,builder:g,handler:async r=>c({command:`custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/custom_ns/${r[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(r[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(r[`custom-ns-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}a(await s(`Deleting`,async()=>c.customNameservers.delete({account_id:l,custom_ns_id:r[`custom-ns-id`]})),{successLabel:`Deleted`})})};function v(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`List an account or zone's custom nameservers.`,builder:v,handler:async l=>c({command:`custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_ns`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customNameservers.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},b={command:`custom-nameservers`,describe:`custom-nameservers`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n,h as r}from"./oauth-BdVr2hJp.mjs";import{r as i}from"./auth-DWxtJ918.mjs";import{t as a}from"./output-Z2lQmPUW.mjs";import{t as o}from"./dry-run-YSQndLvt.mjs";import{t as s}from"./progress-a5IKeKni.mjs";import{t as c}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as l,t as u}from"./body-parser-Cmw7PZ7a.mjs";import{n as d}from"./input-validation-nF-0Ze2h.mjs";import{a as f,i as p,n as m}from"./prompt-BP8XrQSj.mjs";function h(e){return e.option(`act`,{type:`string`,description:`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`}).option(`target`,{type:`string`,description:`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`}).option(`url`,{type:`string`,description:`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Creates a signed JWT for previewing an account or zone-level custom page before it is published.`,builder:h,handler:async p=>c({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await t();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p.act===void 0&&(p.act=await f(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),p.target===void 0&&(p.target=await f(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),p.url===void 0&&(p.url=await f(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=u({act:d(p.act,`act`,`text`),target:d(p.target,`target`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Creating`,async()=>c.customPages.accountCustomPages.previewTokens.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},_={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`state`,{type:`string`,description:`The custom page state.`,choices:[`default`,`customized`]}).option(`url`,{type:`string`,description:`The URL associated with the custom page.`}).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:`update <identifier>`,describe:`Updates the configuration for a custom page type.`,builder:v,handler:async m=>c({command:`custom-pages account-custom-pages update`,classification:{safeFlags:[`state`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=m.zone===void 0?await n():void 0,t=m.zone===void 0?`accounts`:`zones`,r=m.zone??e??`<account-id>`;o({command:`cf custom-pages account-custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/${m.identifier==null?`<identifier>`:encodeURIComponent(String(m.identifier))}`,pathParams:{"account-or-zone":String(t),identifier:String(m.identifier??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:m.body===void 0?u({state:d(m.state,`state`,`text`),url:d(m.url,`url`,`text`)}):l(m.body)});return}let c=await i(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await r({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await t();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body);a(await s(`Updating`,async()=>c.customPages.accountCustomPages.update({...e,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier})),{successLabel:`Updated`});return}m.state===void 0&&(m.state=await p(`state`,`The custom page state.`,[`default`,`customized`])),m.url===void 0&&(m.url=await f(`url`,`The URL associated with the custom page.`));let _=u({state:d(m.state,`state`,`text`),url:d(m.url,`url`,`text`)});a(await s(`Updating`,async()=>c.customPages.accountCustomPages.update({..._,account_or_zone:h,account_or_zone_id:g,identifier:m.identifier})),{successLabel:`Updated`})})},b={command:`account-custom-pages`,describe:`Manage account-level custom pages`,builder:e=>e.command(y).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).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:`asset`,describe:`Creates a custom asset for an account or zone.`,builder:x,handler:async p=>c({command:`custom-pages assets create custom asset`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages assets create custom asset`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({description:d(p.description,`description`,`text`),name:d(p.name,`name`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await t();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p.description===void 0&&(p.description=await f(`description`,`A short description of the custom asset.`)),p.name===void 0&&(p.name=await f(`name`,`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`)),p.url===void 0&&(p.url=await f(`url`,`The URL where the asset content is fetched from.`));let g=u({description:d(p.description,`description`,`text`),name:d(p.name,`name`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Creating`,async()=>c.customPages.assets.create.custom.asset({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},C={command:`custom`,describe:`Operations for assets.create.custom`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`create`,describe:`Operations for assets.create`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,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 E={command:`asset <asset-name>`,describe:`Deletes a custom asset from an account or zone.`,builder:T,handler:async l=>c({command:`custom-pages assets delete custom asset`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets delete custom asset`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();if(u===`zones`?l.zoneId=d:l.accountId=d,!await m({force:!!l.force})){process.stderr.write(`Aborted.
|
|
3
|
+
`);return}a(await s(`Deleting`,async()=>c.customPages.assets.delete.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]})),{successLabel:`Deleted`})})},D={command:`custom`,describe:`Operations for assets.delete.custom`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`delete`,describe:`Operations for assets.delete`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`asset <asset-name>`,describe:`Returns a custom asset for an account or zone.`,builder:k,handler:async l=>c({command:`custom-pages assets get custom asset`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets get custom asset`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/assets/${l[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(l[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(l[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.assets.get.custom.asset({account_or_zone:u,account_or_zone_id:d,asset_name:l[`asset-name`]})),{successLabel:`Loaded`})})},j={command:`custom`,describe:`Operations for assets.get.custom`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`get`,describe:`Operations for assets.get`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom assets per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`assets`,describe:`Lists custom assets for an account or zone.`,builder:N,handler:async l=>c({command:`custom-pages assets list custom assets`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages assets list custom assets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/assets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await t();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.customPages.assets.list.custom.assets({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},F={command:`custom`,describe:`Operations for assets.list.custom`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`list`,describe:`Operations for assets.list`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).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 R={command:`asset <asset-name>`,describe:`Updates a custom asset for an account or zone.`,builder:L,handler:async p=>c({command:`custom-pages assets update custom asset`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf custom-pages assets update custom asset`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/assets/${p[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(p[`asset-name`]))}`,pathParams:{"account-or-zone":String(t),"asset-name":String(p[`asset-name`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({description:d(p.description,`description`,`text`),url:d(p.url,`url`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await t();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Updating`,async()=>c.customPages.assets.update.custom.asset({...e,account_or_zone:m,account_or_zone_id:h,asset_name:p[`asset-name`]})),{successLabel:`Updated`});return}p.description===void 0&&(p.description=await f(`description`,`A short description of the custom asset.`)),p.url===void 0&&(p.url=await f(`url`,`The URL where the asset content is fetched from.`));let g=u({description:d(p.description,`description`,`text`),url:d(p.url,`url`,`text`)});a(await s(`Updating`,async()=>c.customPages.assets.update.custom.asset({...g,account_or_zone:m,account_or_zone_id:h,asset_name:p[`asset-name`]})),{successLabel:`Updated`})})},z={command:`custom`,describe:`Operations for assets.update.custom`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},B={command:`update`,describe:`Operations for assets.update`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`assets`,describe:`Manage account- and zone-level custom assets`,builder:e=>e.command(w).command(O).command(M).command(I).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <identifier>`,describe:`Returns the configuration for a custom page type.`,builder:H,handler:async l=>c({command:`custom-pages get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages/${l.identifier==null?`<identifier>`:encodeURIComponent(String(l.identifier))}`,pathParams:{"account-or-zone":String(t),identifier:String(l.identifier??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.get({account_or_zone:u,account_or_zone_id:d,identifier:l.identifier})),{successLabel:`Loaded`})})};function W(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Lists all custom page configurations for an account or zone.`,builder:W,handler:async l=>c({command:`custom-pages list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/custom_pages`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await t();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.customPages.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},K={command:`custom-pages`,describe:`Manage custom error and challenge pages and their assets for accounts and zones`,builder:e=>e.command(U).command(G).command(b).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|