cf 0.3.0 → 0.4.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 +26 -21
- package/dist/_meta/commands.json +7696 -18100
- package/dist/_meta/schemas.json +6411 -13925
- package/dist/{abuse-reports-dMIfUJ8v.mjs → abuse-reports-Dy76QPNP.mjs} +1 -1
- package/dist/{accounts-Kx1epdA1.mjs → accounts-CjtZ8x1z.mjs} +2 -2
- package/dist/{acm-Utu252kC.mjs → acm-C2lYIWs1.mjs} +1 -1
- package/dist/{addressing-CBq7Z7Vq.mjs → addressing-CHFK6uxW.mjs} +1 -1
- package/dist/{agent-context-BGTU299M.mjs → agent-context-CgGCT0xU.mjs} +1 -1
- package/dist/{ai-DOOKLPkG.mjs → ai-DS3i-I1a.mjs} +1 -1
- package/dist/{ai-gateway-Cj1T3avF.mjs → ai-gateway-RIsegO2x.mjs} +1 -1
- package/dist/ai-search-Dcj4BauG.mjs +7 -0
- package/dist/{ai_gateway-C3fH22C0.mjs → ai_gateway-w7YwfcPE.mjs} +1 -1
- package/dist/{alerting-CqmEIaKn.mjs → alerting-Bk85NNf5.mjs} +1 -1
- package/dist/{analytics-Dv-X8x7D.mjs → analytics-CkhhhZWZ.mjs} +1 -1
- package/dist/{analytics_engine-DdXVR8z2.mjs → analytics_engine-B7qgDJCA.mjs} +1 -1
- package/dist/{api-gateway-CNv0IHTU.mjs → api-gateway-CWdR4Ne7.mjs} +1 -1
- package/dist/{argo-CX_A4kcn.mjs → argo-DnJRVnGX.mjs} +1 -1
- package/dist/artifacts-BVWKiJUl.mjs +4 -0
- package/dist/{audit-logs-BfBf3oo-.mjs → audit-logs-DjTstbzL.mjs} +1 -1
- package/dist/auth-BqDOIrKX.mjs +150 -0
- package/dist/auth-DKkSwnxh.mjs +5 -0
- package/dist/billing-3rEqF83h.mjs +2 -0
- package/dist/{bot-management-CFvtVx62.mjs → bot-management-CJxD1pqi.mjs} +1 -1
- package/dist/{botnet-feed-B-M4Yu0W.mjs → botnet-feed-MG91D7BR.mjs} +1 -1
- package/dist/{brand-protection-D05Eg-_6.mjs → brand-protection-CK7gJi06.mjs} +1 -1
- package/dist/browser-rendering-Rae0AUt0.mjs +4 -0
- package/dist/{build-DYkGW4dh.mjs → build-BE4o4imx.mjs} +131 -131
- package/dist/{cache-DsoW6Xwv.mjs → cache-B7pRbpTy.mjs} +1 -1
- package/dist/{calls-CZbO7TyR.mjs → calls-DXRWsZ8n.mjs} +3 -3
- package/dist/{certificate-authorities-D2yr7_3t.mjs → certificate-authorities-BR3gXBLs.mjs} +1 -1
- package/dist/chunk-6IEM75FG-U3L9fKgi.mjs +2 -0
- package/dist/{client-certificates-MJcDsTId.mjs → client-certificates-B0ebLJdk.mjs} +1 -1
- package/dist/{cloud-connector-DWOrN2eM.mjs → cloud-connector-BOjaggJk.mjs} +1 -1
- package/dist/{cloudforce-one-2Bhz8YdW.mjs → cloudforce-one-B6HYfk5Z.mjs} +1 -1
- package/dist/{completions-BwRpZQVn.mjs → completions-D_9WsLG7.mjs} +1 -1
- package/dist/config-7CBz8Xm0.mjs +2 -0
- package/dist/{connectivity-BX8C7tvK.mjs → connectivity-welFvZ7X.mjs} +1 -1
- package/dist/connector-interrupts-DTV3F-50.mjs +2 -0
- package/dist/connector-telemetry-events-kDqb_AGm.mjs +2 -0
- package/dist/connector-telemetry-snapshots-DC-wD75E.mjs +2 -0
- package/dist/connectors-3vjrdFLB.mjs +3 -0
- package/dist/content-scanning-CnW2A0pv.mjs +4 -0
- package/dist/{context-DGlHRGWM.mjs → context-CONbNKO-.mjs} +1 -1
- package/dist/{custom-certificates-aAiEguR7.mjs → custom-certificates-CnYh6Yi-.mjs} +1 -1
- package/dist/{custom-hostnames-AG5yBHIi.mjs → custom-hostnames-C2upqZso.mjs} +1 -1
- package/dist/{custom-nameservers-D1DtlRue.mjs → custom-nameservers-BGkAD_PZ.mjs} +1 -1
- package/dist/{custom-pages-DQCi2plU.mjs → custom-pages-5fCSP8in.mjs} +1 -1
- package/dist/{d1-DbnYhw45.mjs → d1-CyiRbZZn.mjs} +1 -1
- package/dist/data-security-Casx4OS_.mjs +6 -0
- package/dist/{dcv-delegation-CHspSzTI.mjs → dcv-delegation-DVYO10oA.mjs} +1 -1
- package/dist/{deploy-CQial3kN.mjs → deploy-KBRFIatG.mjs} +1 -1
- package/dist/{dev-B38LfCTl.mjs → dev-pPazzZvt.mjs} +1 -1
- package/dist/{diagnostics-BJQGjVJn.mjs → diagnostics-BqYDoDfw.mjs} +1 -1
- package/dist/{dispatch-namespaces-DmHvoBOg.mjs → dispatch-namespaces-Cz2rajnP.mjs} +1 -1
- package/dist/{dist-AIcZFk0U.mjs → dist-DA54ZQu0.mjs} +7 -7
- package/dist/dist-DpDjsWWn.mjs +306 -0
- package/dist/{dns-VMhQSr5n.mjs → dns-62t95Xif.mjs} +1 -1
- package/dist/{dns-firewall-B4DVXFBQ.mjs → dns-firewall-Coy8d47t.mjs} +1 -1
- package/dist/{durable-objects-CTboySEo.mjs → durable-objects-BSuRERkw.mjs} +1 -1
- package/dist/{email-routing-tIR2SFu-.mjs → email-routing-BDUYYeV3.mjs} +1 -1
- package/dist/{email-security-Ca1id3rZ.mjs → email-security-ChHA6eqQ.mjs} +1 -1
- package/dist/{email-sending-DwWKc5jC.mjs → email-sending-CVrRqn6S.mjs} +1 -1
- package/dist/{filters-A4dg_a68.mjs → filters-qJpU9uAS.mjs} +1 -1
- package/dist/{firewall-DWPQgYd9.mjs → firewall-C3DDwfwh.mjs} +1 -1
- package/dist/{fraud-BMkSsJGU.mjs → fraud-DY3YXFVf.mjs} +1 -1
- package/dist/{google-tag-gateway-BGD49nRC.mjs → google-tag-gateway-B00MHDfB.mjs} +1 -1
- package/dist/{healthchecks-CtIfrFql.mjs → healthchecks-Drvb79v0.mjs} +1 -1
- package/dist/{hostnames-BiomxukN.mjs → hostnames-BdAQo1Mr.mjs} +1 -1
- package/dist/{hyperdrive-Da104VaQ.mjs → hyperdrive-99OJV9nl.mjs} +1 -1
- package/dist/{iam-BIGKo0WW.mjs → iam-BRbpg3lN.mjs} +1 -1
- package/dist/images-D1jI3r3O.mjs +7 -0
- package/dist/index.mjs +1 -1
- package/dist/{intel-CY6_79v8.mjs → intel-C3ajLpXd.mjs} +1 -1
- package/dist/{ips-K4bzaGqd.mjs → ips-B6JETVOY.mjs} +1 -1
- package/dist/{keyless-certificates-CZC-L8gM.mjs → keyless-certificates-C4MZ4xnf.mjs} +1 -1
- package/dist/{kv-8o27w_pY.mjs → kv-CSWoD9ks.mjs} +1 -1
- package/dist/{leaked-credential-checks-qLzRyu85.mjs → leaked-credential-checks-Dgs2oKm9.mjs} +2 -2
- package/dist/{load-balancers-DtG8nj25.mjs → load-balancers-Du1tNuUt.mjs} +1 -1
- package/dist/{logpush-4L0njy1d.mjs → logpush-SuJyO-uX.mjs} +1 -1
- package/dist/{logs-B_Yp95hv.mjs → logs-DcDNRPRl.mjs} +1 -1
- package/dist/{magic-cloud-networking-CSOM3EM-.mjs → magic-cloud-networking-D-T0RCvi.mjs} +1 -1
- package/dist/{magic-network-monitoring-BnwvM4-I.mjs → magic-network-monitoring-CqtvOePQ.mjs} +1 -1
- package/dist/{magic-transit-CXDyvhxq.mjs → magic-transit-BTbkhBtF.mjs} +32 -33
- package/dist/{managed-transforms-D15yVbZx.mjs → managed-transforms-CfUBSz9p.mjs} +1 -1
- package/dist/{mtls-certificates-D8k0AXWK.mjs → mtls-certificates-Cf1O8c2E.mjs} +1 -1
- package/dist/{network-interconnects-rrr7red3.mjs → network-interconnects-DsiNytOU.mjs} +1 -1
- package/dist/{observability-DWvpqnQJ.mjs → observability-CLqZ7OSi.mjs} +1 -1
- package/dist/open-YWOUIZ5Y-BpqIuBsR.mjs +4 -0
- package/dist/{organizations-T77D50Sq.mjs → organizations-aRi1bhFC.mjs} +2 -2
- package/dist/{origin-ca-certificates-DXIvD8H5.mjs → origin-ca-certificates-BB4H89a_.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-C8oOczyV.mjs → origin-post-quantum-encryption-DurP3PXG.mjs} +1 -1
- package/dist/{origin-tls-client-auth-CaVW1Ztp.mjs → origin-tls-client-auth-CnQNy9-l.mjs} +1 -1
- package/dist/{output-BJFNwj7b.mjs → output-CUxZRM5A.mjs} +1 -1
- package/dist/{page-rules-CjZPTMQX.mjs → page-rules-CYqtPU1p.mjs} +1 -1
- package/dist/{page-shield-D5RRNJCY.mjs → page-shield-D8l9ZMUl.mjs} +1 -1
- package/dist/{pages-CWJtJnL0.mjs → pages-ChurJ2H7.mjs} +1 -1
- package/dist/{pipelines-B0L_7j9e.mjs → pipelines-CeyujvRf.mjs} +1 -1
- package/dist/{progress-CrCGTq7N.mjs → progress-Cent9Lsg.mjs} +1 -1
- package/dist/{queues-CN6DPhRR.mjs → queues-Rf_n11Cx.mjs} +1 -1
- package/dist/{r2-DQIcyRtA.mjs → r2-BtuTO3vQ.mjs} +1 -1
- package/dist/{r2-data-catalog-Bbo93TJx.mjs → r2-data-catalog-Debz38kv.mjs} +1 -1
- package/dist/radar-CzGM92uM.mjs +2 -0
- package/dist/{rate-limits-DcrQV6Ar.mjs → rate-limits-Bbk7HxP7.mjs} +1 -1
- package/dist/{raw-fetch-Dlccg0Tr.mjs → raw-fetch-DnbAMFBp.mjs} +1 -1
- package/dist/{realtime-kit-CaquuVOE.mjs → realtime-kit-CivLpkpg.mjs} +1 -1
- package/dist/{registrar-Ko-xZemf.mjs → registrar-8IeA5DKd.mjs} +1 -1
- package/dist/{request-tracers-DOW_reTJ.mjs → request-tracers-D1aH4NmL.mjs} +1 -1
- package/dist/{resource-sharing-D7TX0JV0.mjs → resource-sharing-B-Pcto7-.mjs} +3 -3
- package/dist/{resource-tagging-C3qtLzCz.mjs → resource-tagging-Bpb6Qq1M.mjs} +1 -1
- package/dist/{rules-BXRADHL5.mjs → rules-B10XWY10.mjs} +1 -1
- package/dist/{rulesets-CBgpeSvJ.mjs → rulesets-lYczEcJp.mjs} +1 -1
- package/dist/{rum-BjPptTUP.mjs → rum-B5GUKa4I.mjs} +3 -3
- package/dist/{schema-D16TgWBg.mjs → schema-hefO-tzo.mjs} +1 -1
- package/dist/{schema-validation-Dgv_opM3.mjs → schema-validation-DTq517Em.mjs} +1 -1
- package/dist/{scim-DdSEr4kZ.mjs → scim-BiLfOQ89.mjs} +1 -1
- package/dist/{secrets-store-7BfyvJLb.mjs → secrets-store-CBX0dvHL.mjs} +1 -1
- package/dist/{security-center-DAy6AKtT.mjs → security-center-AVpTOBK3.mjs} +1 -1
- package/dist/{security-txt-xAMb7K6Y.mjs → security-txt-DVlh8y9l.mjs} +1 -1
- package/dist/{session-COHHdS7A.mjs → session-CsvPYFj8.mjs} +2 -2
- package/dist/shared-0bwWVDLo.mjs +2 -0
- package/dist/{smart-shield-TeWZFnH2.mjs → smart-shield-DblHIce0.mjs} +1 -1
- package/dist/{snippets-CCSsCXVs.mjs → snippets-DrpqSXYC.mjs} +1 -1
- package/dist/{spawn-DcppKGI5.mjs → spawn-DK7pott_.mjs} +1 -1
- package/dist/{spectrum-CTTZID8u.mjs → spectrum-CnrG0jIC.mjs} +2 -2
- package/dist/speed-BzRY3Xlh.mjs +4 -0
- package/dist/{src-BW6vfAwE.mjs → src-D9_Gq68b.mjs} +10 -10
- package/dist/{ssl-BWA2LdwC.mjs → ssl-Cp6tQkZH.mjs} +1 -1
- package/dist/stream-CGTRN4ZN.mjs +14 -0
- package/dist/{tenants-Bd7NGQ_m.mjs → tenants-o_M62Y1n.mjs} +1 -1
- package/dist/{token-validation-DAgtFOvs.mjs → token-validation-Ca5AGEns.mjs} +1 -1
- package/dist/{tools-DXQmfFuE.mjs → tools-DtNNmO6l.mjs} +1 -1
- package/dist/{turnstile-cfdaO4ca.mjs → turnstile-l7mo9BWL.mjs} +2 -2
- package/dist/{ui-D4KtlMh9.mjs → ui-B97lRnOv.mjs} +1 -1
- package/dist/{url-normalization-B5RN4nLD.mjs → url-normalization-D1CogSIG.mjs} +1 -1
- package/dist/{url-scanner-BrZ1L9OC.mjs → url-scanner-BnJHJqcz.mjs} +1 -1
- package/dist/{user-CAo-yCJA.mjs → user-CiyYZ69X.mjs} +2 -2
- package/dist/{vectorize-C7_oQlaI.mjs → vectorize-D3LgMLOn.mjs} +1 -1
- package/dist/{versions-CUwWJWmy.mjs → versions-B6E8WQyA.mjs} +1 -1
- package/dist/{waiting-rooms-Dln5ICg5.mjs → waiting-rooms-Bhy_nuV3.mjs} +1 -1
- package/dist/{web3-HQJRm38W.mjs → web3-DlHE0CZc.mjs} +1 -1
- package/dist/{workers-Dg7ddG2Q.mjs → workers-DRAkU6YR.mjs} +1 -1
- package/dist/{workers-builds-AVfx8IyL.mjs → workers-builds-BmNjiHDZ.mjs} +1 -1
- package/dist/{workflows-VquuSh2J.mjs → workflows-z6oapEJs.mjs} +1 -1
- package/dist/{zaraz-xYSWIV4P.mjs → zaraz-CyzfYOEU.mjs} +1 -1
- package/dist/{zero-trust-CP96wnSh.mjs → zero-trust-fyyIelWx.mjs} +44 -44
- package/dist/zero_trust-BAhlNkjo.mjs +3 -0
- package/dist/{zones-BSgmZ9WC.mjs → zones-MSULnDwW.mjs} +4 -4
- package/package.json +4 -4
- package/dist/ai-search-CQF_Sn7d.mjs +0 -7
- package/dist/auth-SyWhMmPu.mjs +0 -6
- package/dist/auth-ffdf9yR0.mjs +0 -135
- package/dist/autorag-BuGhGTeZ.mjs +0 -2
- package/dist/billing-PoG81XaQ.mjs +0 -2
- package/dist/browser-rendering-xu8F_Rrv.mjs +0 -4
- package/dist/config-DYzlVxcB.mjs +0 -2
- package/dist/content-scanning-r6uzMO1r.mjs +0 -4
- package/dist/data-security-D_EtYBfo.mjs +0 -6
- package/dist/dist-DNBSHor6.mjs +0 -301
- package/dist/images-BO8FbDAa.mjs +0 -5
- package/dist/radar-Bxb0WX8V.mjs +0 -2
- package/dist/shared-AGtpXwwL.mjs +0 -2
- package/dist/speed-CuzTE0AL.mjs +0 -4
- package/dist/stream-GFsIZ-pP.mjs +0 -14
- /package/dist/{body-parser-DKa8Ipg1.mjs → body-parser-CBpeIUns.mjs} +0 -0
- /package/dist/{cli-types-CRIDdDw3.mjs → cli-types-CMNMD1V7.mjs} +0 -0
- /package/dist/{input-validation-zEO81MWN.mjs → input-validation-CTqtyiY9.mjs} +0 -0
- /package/dist/{lib-Eu1wXxuh.mjs → lib-B6xvCJjc.mjs} +0 -0
- /package/dist/{local-VJaJ3BZ1.mjs → local-D8bhHUMK.mjs} +0 -0
- /package/dist/{metadata-5VwHPW6C.mjs → metadata-jh2EIan8.mjs} +0 -0
- /package/dist/{resolve-4-OSeHlK.mjs → resolve-D1mG0REg.mjs} +0 -0
- /package/dist/{theme-BklJDrb2.mjs → theme-CFHr0Dh9.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{C as e,D as t,E as n,_ as r,n as i}from"./auth-
|
|
2
|
+
import{C as e,D as t,E as n,_ as r,n as i}from"./auth-BqDOIrKX.mjs";import{n as a,t as o}from"./body-parser-CBpeIUns.mjs";import{t as s}from"./output-CUxZRM5A.mjs";import{n as c,t as l}from"./progress-Cent9Lsg.mjs";import{n as u}from"./input-validation-CTqtyiY9.mjs";import{t as d}from"./local-D8bhHUMK.mjs";import{t as f}from"./cli-types-CMNMD1V7.mjs";function p(e){return e.positional(`report-param`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
3
3
|
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
4
4
|
`,choices:[`send`,`send-anon`]}).option(`original-work`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
5
5
|
`}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{C as e,D as t,T as n,_ as r,i,n as a}from"./auth-
|
|
2
|
+
import{C as e,D as t,T as n,_ as r,i,n as a}from"./auth-BqDOIrKX.mjs";import{n as o,t as s}from"./body-parser-CBpeIUns.mjs";import{t as c}from"./output-CUxZRM5A.mjs";import{n as l,t as u}from"./progress-Cent9Lsg.mjs";import{n as d}from"./input-validation-CTqtyiY9.mjs";import{t as f}from"./local-D8bhHUMK.mjs";import{t as p}from"./cli-types-CMNMD1V7.mjs";function m(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const ee={command:`create`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:m,handler:async n=>{if(n.dryRun){l({command:`cf accounts account-organizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:n.body===void 0?s({destination_organization_id:d(n[`destination-organization-id`],`destination-organization-id`,`text`)}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Creating`,async()=>i.accounts.accountOrganizations.create({...e,account_id:p})),{successLabel:`Created`});return}n[`destination-organization-id`]===void 0&&(n[`destination-organization-id`]=await t(`destination-organization-id`,`The destination_organization_id field`));let m=s({destination_organization_id:d(n[`destination-organization-id`],`destination-organization-id`,`text`)});c(await u(`Creating`,async()=>i.accounts.accountOrganizations.create({...m,account_id:p})),{successLabel:`Created`})}},te={command:`account-organizations`,describe:`Operations for account-organizations`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:h,handler:async t=>{if(t.dryRun){l({command:`cf accounts account-profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.accountProfile.get({account_id:i})),{successLabel:`Loaded`})}};function _(e){return e.option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:_,handler:async n=>{if(n.dryRun){l({command:`cf accounts account-profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:n.body===void 0?s({business_address:d(n[`business-address`],`business-address`,`text`),business_email:d(n[`business-email`],`business-email`,`text`),business_name:d(n[`business-name`],`business-name`,`text`),business_phone:d(n[`business-phone`],`business-phone`,`text`),external_metadata:d(n[`external-metadata`],`external-metadata`,`text`)}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Updating`,async()=>i.accounts.accountProfile.update({body:e,account_id:p})),{successLabel:`Updated`});return}n[`business-address`]===void 0&&(n[`business-address`]=await t(`business-address`,`The business_address field`)),n[`business-email`]===void 0&&(n[`business-email`]=await t(`business-email`,`The business_email field`)),n[`business-name`]===void 0&&(n[`business-name`]=await t(`business-name`,`The business_name field`)),n[`business-phone`]===void 0&&(n[`business-phone`]=await t(`business-phone`,`The business_phone field`)),n[`external-metadata`]===void 0&&(n[`external-metadata`]=await t(`external-metadata`,`The external_metadata field`));let m=s({business_address:d(n[`business-address`],`business-address`,`text`),business_email:d(n[`business-email`],`business-email`,`text`),business_name:d(n[`business-name`],`business-name`,`text`),business_phone:d(n[`business-phone`],`business-phone`,`text`),external_metadata:d(n[`external-metadata`],`external-metadata`,`text`)});c(await u(`Updating`,async()=>i.accounts.accountProfile.update({body:m,account_id:p})),{successLabel:`Updated`})}},y={command:`account-profile`,describe:`Operations for account-profile`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.option(`filter`,{type:`string`,description:`Filter applications using key:value format. Supported filter keys:
|
|
3
3
|
- name: Filter by application name (e.g., name:HR)
|
|
4
4
|
- id: Filter by application ID (e.g., id:0b63249c-95bf-4cc0-a7cc-d7faaaf1dac0)
|
|
5
5
|
- human_id: Filter by human-readable ID (e.g., human_id:HR)
|
|
@@ -16,7 +16,7 @@ Changing from 'accepted' back to 'pending' will trigger a replacement of the mem
|
|
|
16
16
|
`,choices:[`accepted`,`pending`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`create`,describe:`Add a user to the list of members for this account.`,builder:K,handler:async n=>{if(n.dryRun){l({command:`cf accounts members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/members`,pathParams:{},bodyKind:`json`,body:n.body===void 0?s({email:d(n.email,`email`,`text`),roles:n.roles,status:d(n.status,`status`,`text`)}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Creating`,async()=>i.accounts.members.create({body:e,account_id:p})),{successLabel:`Created`});return}n.email===void 0&&(n.email=await t(`email`,`The contact email address of the user.`));let m=s({email:d(n.email,`email`,`text`),roles:n.roles,status:d(n.status,`status`,`text`)});c(await u(`Creating`,async()=>i.accounts.members.create({body:m,account_id:p})),{successLabel:`Created`})}};function J(e){return e.positional(`member-id`,{type:`string`,description:`Membership 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 Y={command:`delete <member-id>`,describe:`Remove a member from an account.`,builder:J,handler:async t=>{if(t.dryRun){l({command:`cf accounts members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);if(t.accountId=o,!await n({force:!!t.force})){process.stderr.write(`Aborted.
|
|
17
17
|
`);return}c(await u(`Deleting`,async()=>i.accounts.members.delete({account_id:o,member_id:t[`member-id`]})),{successLabel:`Deleted`})}};function X(e){return e.positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <member-id>`,describe:`Get information about a specific member of an account.`,builder:X,handler:async t=>{if(t.dryRun){l({command:`cf accounts members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.members.get({account_id:i,member_id:t[`member-id`]})),{successLabel:`Loaded`})}};function Q(e){return e.option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`user.first_name`,`user.last_name`,`user.email`,`status`]}).option(`status`,{type:`string`,description:`A member's status in the account.`,choices:[`accepted`,`pending`,`rejected`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`list`,describe:`List all members of an account.`,builder:p(Q),handler:async t=>{let n={order:t.order,status:t.status,page:t.page,per_page:t[`per-page`],direction:t.direction};if(t.dryRun){l({command:`cf accounts members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/members`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);t.accountId=o,c(await u(`Loading`,async()=>i.accounts.members.list({account_id:o,...n})),{successLabel:`Loaded`})}};function re(e){return e.positional(`member-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <member-id>`,describe:`Modify an account member.`,builder:re,handler:async t=>{if(t.dryRun){l({command:`cf accounts members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/members/${t[`member-id`]==null?`<member-id>`:encodeURIComponent(String(t[`member-id`]))}`,pathParams:{"member-id":String(t[`member-id`]??``)},bodyKind:`json`,body:t.body===void 0?void 0:o(t.body)});return}let n=await a(t),s=t.local?f:await r(n);if(t.accountId=s,t.body){let e=o(t.body);c(await u(`Updating`,async()=>n.accounts.members.update({body:e,account_id:s,member_id:t[`member-id`]})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>i(n,`PUT`,`/accounts/${s}/members/${encodeURIComponent(String(t[`member-id`]))}`)),{successLabel:`Updated`})}},ae={command:`members`,describe:`Invite, inspect, update, and remove users who have access to this account`,builder:e=>e.command(q).command(Y).command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:oe,handler:async e=>{if(e.dryRun){l({command:`cf accounts move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?s({account_ids:e[`account-ids`],destination_organization_id:d(e[`destination-organization-id`],`destination-organization-id`,`text`)}):o(e.body)});return}let n=await a(e);if(e.body){let t=o(e.body);c(await u(`Creating`,async()=>n.accounts.move({...t})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await t(`destination-organization-id`,`Move accounts to this organization ID.`));let r=s({account_ids:e[`account-ids`],destination_organization_id:d(e[`destination-organization-id`],`destination-organization-id`,`text`)});c(await u(`Creating`,async()=>n.accounts.move({...r})),{successLabel:`Created`})}};function ce(e){return e.positional(`role-id`,{type:`string`,description:`Role identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <role-id>`,describe:`Get information about a specific role for an account.`,builder:ce,handler:async t=>{if(t.dryRun){l({command:`cf accounts roles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/roles/${t[`role-id`]==null?`<role-id>`:encodeURIComponent(String(t[`role-id`]))}`,pathParams:{"role-id":String(t[`role-id`]??``)},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.roles.get({account_id:i,role_id:t[`role-id`]})),{successLabel:`Loaded`})}};function ue(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of roles per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`Get all available roles for an account.`,builder:ue,handler:async t=>{let n={page:t.page,per_page:t[`per-page`]};if(t.dryRun){l({command:`cf accounts roles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/roles`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);t.accountId=o,c(await u(`Loading`,async()=>i.accounts.roles.list({account_id:o,...n})),{successLabel:`Loaded`})}},fe={command:`roles`,describe:`View the roles available for assigning to account members, each defining a set of permissions`,builder:e=>e.command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).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 me={command:`create`,describe:`Creates an account subscription.`,builder:pe,handler:async t=>{if(t.dryRun){l({command:`cf accounts subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/subscriptions`,pathParams:{},bodyKind:`json`,body:t.body===void 0?s({app:{install_id:d(t[`app-install-id`],`app-install-id`,`text`)},frequency:d(t.frequency,`frequency`,`text`),rate_plan:{currency:d(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:d(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:d(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:d(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}):o(t.body)});return}let n=await a(t),i=t.local?f:await r(n);if(t.accountId=i,t.body){let e=o(t.body);c(await u(`Creating`,async()=>n.accounts.subscriptions.create({body:e,account_id:i})),{successLabel:`Created`});return}let p=s({app:{install_id:d(t[`app-install-id`],`app-install-id`,`text`)},frequency:d(t.frequency,`frequency`,`text`),rate_plan:{currency:d(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:d(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:d(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:d(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}});c(await u(`Creating`,async()=>n.accounts.subscriptions.create({body:p,account_id:i})),{successLabel:`Created`})}};function he(e){return e.positional(`subscription-identifier`,{type:`string`,description:`Subscription 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 ge={command:`delete <subscription-identifier>`,describe:`Deletes an account's subscription.`,builder:he,handler:async t=>{if(t.dryRun){l({command:`cf accounts subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);if(t.accountId=o,!await n({force:!!t.force})){process.stderr.write(`Aborted.
|
|
18
18
|
`);return}c(await u(`Deleting`,async()=>i.accounts.subscriptions.delete({account_id:o,subscription_identifier:t[`subscription-identifier`]})),{successLabel:`Deleted`})}};function _e(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`get`,describe:`Lists all of an account's subscriptions.`,builder:_e,handler:async t=>{if(t.dryRun){l({command:`cf accounts subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/subscriptions`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.subscriptions.get({account_id:i})),{successLabel:`Loaded`})}};function ye(e){return e.positional(`subscription-identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).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 be={command:`update <subscription-identifier>`,describe:`Updates an account subscription.`,builder:ye,handler:async t=>{if(t.dryRun){l({command:`cf accounts subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/subscriptions/${t[`subscription-identifier`]==null?`<subscription-identifier>`:encodeURIComponent(String(t[`subscription-identifier`]))}`,pathParams:{"subscription-identifier":String(t[`subscription-identifier`]??``)},bodyKind:`json`,body:t.body===void 0?s({app:{install_id:d(t[`app-install-id`],`app-install-id`,`text`)},frequency:d(t.frequency,`frequency`,`text`),rate_plan:{currency:d(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:d(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:d(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:d(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}}):o(t.body)});return}let n=await a(t),i=t.local?f:await r(n);if(t.accountId=i,t.body){let e=o(t.body);c(await u(`Updating`,async()=>n.accounts.subscriptions.update({body:e,account_id:i,subscription_identifier:t[`subscription-identifier`]})),{successLabel:`Updated`});return}let p=s({app:{install_id:d(t[`app-install-id`],`app-install-id`,`text`)},frequency:d(t.frequency,`frequency`,`text`),rate_plan:{currency:d(t[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:t[`rate-plan-externally-managed`],id:d(t[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:t[`rate-plan-is-contract`],public_name:d(t[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:d(t[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:t[`rate-plan-sets`]}});c(await u(`Updating`,async()=>n.accounts.subscriptions.update({body:p,account_id:i,subscription_identifier:t[`subscription-identifier`]})),{successLabel:`Updated`})}},xe={command:`subscriptions`,describe:`View and manage plan subscriptions attached to this account`,builder:e=>e.command(me).command(ge).command(ve).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).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 Ce={command:`create`,describe:`Create a new Account Owned API token.`,builder:Se,handler:async n=>{if(n.dryRun){l({command:`cf accounts tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens`,pathParams:{},bodyKind:`json`,body:n.body===void 0?s({condition:{request_ip:{in:n[`condition-request-ip-in`],not_in:n[`condition-request-ip-not-in`]}},expires_on:d(n[`expires-on`],`expires-on`,`text`),name:d(n.name,`name`,`text`),not_before:d(n[`not-before`],`not-before`,`text`)}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Creating`,async()=>i.accounts.tokens.create({body:e,account_id:p})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await t(`name`,`Token name.`));let m=s({condition:{request_ip:{in:n[`condition-request-ip-in`],not_in:n[`condition-request-ip-not-in`]}},expires_on:d(n[`expires-on`],`expires-on`,`text`),name:d(n.name,`name`,`text`),not_before:d(n[`not-before`],`not-before`,`text`)});c(await u(`Creating`,async()=>i.accounts.tokens.create({body:m,account_id:p})),{successLabel:`Created`})}};function we(e){return e.positional(`token-id`,{type:`string`,description:`Token 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 Te={command:`delete <token-id>`,describe:`Destroy an Account Owned API token.`,builder:we,handler:async t=>{if(t.dryRun){l({command:`cf accounts tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);if(t.accountId=o,!await n({force:!!t.force})){process.stderr.write(`Aborted.
|
|
19
|
-
`);return}c(await u(`Deleting`,async()=>i.accounts.tokens.delete({account_id:o,token_id:t[`token-id`]})),{successLabel:`Deleted`})}};function Ee(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get <token-id>`,describe:`Get information about a specific Account Owned API token.`,builder:Ee,handler:async t=>{if(t.dryRun){l({command:`cf accounts tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.tokens.get({account_id:i,token_id:t[`token-id`]})),{successLabel:`Loaded`})}};function Oe(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List all Account Owned API tokens created for this account.`,builder:p(Oe),handler:async t=>{let n={page:t.page,per_page:t[`per-page`],direction:t.direction};if(t.dryRun){l({command:`cf accounts tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);t.accountId=o,c(await u(`Loading`,async()=>i.accounts.tokens.list({account_id:o,...n})),{successLabel:`Loaded`})}};function Ae(e){return e.option(`name`,{type:`string`,description:`Filter by the name of the permission group.
|
|
19
|
+
`);return}c(await u(`Deleting`,async()=>i.accounts.tokens.delete({account_id:o,token_id:t[`token-id`]})),{successLabel:`Deleted`})}};function Ee(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get <token-id>`,describe:`Get information about a specific Account Owned API token.`,builder:Ee,handler:async t=>{if(t.dryRun){l({command:`cf accounts tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.tokens.get({account_id:i,token_id:t[`token-id`]})),{successLabel:`Loaded`})}};function Oe(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`include-expired`,{type:`boolean`,description:`When true, includes recently-expired tokens in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List all Account Owned API tokens created for this account. Results include active, disabled, and recently-expired tokens when include_expired is set to true.`,builder:p(Oe),handler:async t=>{let n={page:t.page,per_page:t[`per-page`],direction:t.direction,include_expired:t[`include-expired`]};if(t.dryRun){l({command:`cf accounts tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);t.accountId=o,c(await u(`Loading`,async()=>i.accounts.tokens.list({account_id:o,...n})),{successLabel:`Loaded`})}};function Ae(e){return e.option(`name`,{type:`string`,description:`Filter by the name of the permission group.
|
|
20
20
|
The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
|
|
21
21
|
The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`Find all available permission groups for Account Owned API Tokens`,builder:Ae,handler:async t=>{let n={name:t.name,scope:t.scope};if(t.dryRun){l({command:`cf accounts tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/permission_groups`,pathParams:{},query:n,bodyKind:`none`});return}let i=await a(t),o=t.local?f:await r(i);t.accountId=o,c(await u(`Loading`,async()=>i.accounts.tokens.permissionGroups.list({account_id:o,...n})),{successLabel:`Loaded`})}},Me={command:`permission-groups`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ne(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).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 Pe={command:`update <token-id>`,describe:`Update an existing token.`,builder:Ne,handler:async n=>{if(n.dryRun){l({command:`cf accounts tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/${n[`token-id`]==null?`<token-id>`:encodeURIComponent(String(n[`token-id`]))}`,pathParams:{"token-id":String(n[`token-id`]??``)},bodyKind:`json`,body:n.body===void 0?s({condition:{request_ip:{in:n[`condition-request-ip-in`],not_in:n[`condition-request-ip-not-in`]}},expires_on:d(n[`expires-on`],`expires-on`,`text`),name:d(n.name,`name`,`text`),not_before:d(n[`not-before`],`not-before`,`text`),status:d(n.status,`status`,`text`)}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Updating`,async()=>i.accounts.tokens.update({body:e,account_id:p,token_id:n[`token-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await t(`name`,`Token name.`));let m=s({condition:{request_ip:{in:n[`condition-request-ip-in`],not_in:n[`condition-request-ip-not-in`]}},expires_on:d(n[`expires-on`],`expires-on`,`text`),name:d(n.name,`name`,`text`),not_before:d(n[`not-before`],`not-before`,`text`),status:d(n.status,`status`,`text`)});c(await u(`Updating`,async()=>i.accounts.tokens.update({body:m,account_id:p,token_id:n[`token-id`]})),{successLabel:`Updated`})}};function $(e){return e.positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`update <token-id>`,describe:`Roll the Account Owned API token secret.`,builder:$,handler:async t=>{if(t.dryRun){l({command:`cf accounts tokens value update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}/value`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Updating`,async()=>n.accounts.tokens.value.update({account_id:i,token_id:t[`token-id`]})),{successLabel:`Updated`})}},Ie={command:`value`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`verify`,describe:`Test whether a token works.`,builder:Le,handler:async t=>{if(t.dryRun){l({command:`cf accounts tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/tokens/verify`,pathParams:{},bodyKind:`none`});return}let n=await a(t),i=t.local?f:await r(n);t.accountId=i,c(await u(`Loading`,async()=>n.accounts.tokens.verify({account_id:i})),{successLabel:`Loaded`})}},ze={command:`tokens`,describe:`Create and manage scoped API tokens for programmatic access to the Cloudflare API`,builder:e=>e.command(Ce).command(Te).command(De).command(ke).command(Pe).command(Re).command(Me).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Be(e){return e.option(`id`,{type:`string`,description:`Identifier`}).option(`name`,{type:`string`,description:`Account name`}).option(`settings-abuse-contact-email`,{type:`string`,description:`Sets an abuse contact email to notify for abuse reports.`}).option(`settings-enforce-twofactor`,{type:`boolean`,description:`Indicates whether membership in this account requires that
|
|
22
22
|
Two-Factor Authentication is enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ve={command:`update`,describe:`Update an existing account.`,builder:Be,handler:async n=>{if(n.dryRun){l({command:`cf accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}`,pathParams:{},bodyKind:`json`,body:n.body===void 0?s({id:d(n.id,`id`,`text`),name:d(n.name,`name`,`text`),settings:{abuse_contact_email:d(n[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:n[`settings-enforce-twofactor`]}}):o(n.body)});return}let i=await a(n),p=n.local?f:await r(i);if(n.accountId=p,n.body){let e=o(n.body);c(await u(`Updating`,async()=>i.accounts.update({body:e,account_id:p})),{successLabel:`Updated`});return}n.id===void 0&&(n.id=await t(`id`,`Identifier`)),n.name===void 0&&(n.name=await t(`name`,`Account name`));let m=s({id:d(n.id,`id`,`text`),name:d(n.name,`name`,`text`),settings:{abuse_contact_email:d(n[`settings-abuse-contact-email`],`settings-abuse-contact-email`,`text`),enforce_twofactor:n[`settings-enforce-twofactor`]}});c(await u(`Updating`,async()=>i.accounts.update({body:m,account_id:p})),{successLabel:`Updated`})}},He={command:`accounts`,describe:`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,builder:e=>e.command(F).command(L).command(z).command(V).command(se).command(Ve).command(te).command(y).command(E).command(N).command(G).command(ae).command(fe).command(xe).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{He as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{D as e,S as t,T as n,n as r}from"./auth-
|
|
2
|
+
import{D as e,S as t,T as n,n as r}from"./auth-BqDOIrKX.mjs";import{n as i,t as a}from"./body-parser-CBpeIUns.mjs";import{t as o}from"./output-CUxZRM5A.mjs";import{n as s,t as c}from"./progress-Cent9Lsg.mjs";import{n as l}from"./input-validation-CTqtyiY9.mjs";function u(e){return e.option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const d={command:`create`,describe:`Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`,builder:u,handler:async n=>{if(n.dryRun){s({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`json`,body:n.body===void 0?a({certificate:l(n.certificate,`certificate`,`text`)}):i(n.body)});return}let u=await r(n),d=await t({zone:n.zone},u,{quiet:n.quiet});if(n.zoneId=d,n.body){let e=i(n.body);o(await c(`Creating`,async()=>u.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}n.certificate===void 0&&(n.certificate=await e(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=a({certificate:l(n.certificate,`certificate`,`text`)});o(await c(`Creating`,async()=>u.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})}};function f(e){return e.positional(`custom-origin-trust-store-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 <custom-origin-trust-store-id>`,describe:`Removes a root CA certificate from the custom origin trust store. Origins using certificates signed by this CA will no longer be trusted.`,builder:f,handler:async e=>{if(e.dryRun){s({command:`cf acm custom-trust-store delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store/${e[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(e[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(e[`custom-origin-trust-store-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let i=await r(e),a=await t({zone:e.zone},i,{quiet:e.quiet});if(e.zoneId=a,!await n({force:!!e.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}o(await c(`Deleting`,async()=>i.acm.customTrustStore.delete({zone_id:a,custom_origin_trust_store_id:e[`custom-origin-trust-store-id`]})),{successLabel:`Deleted`})}};function m(e){return e.positional(`custom-origin-trust-store-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <custom-origin-trust-store-id>`,describe:`Retrieves details about a specific root CA certificate in the custom origin trust store, including expiration and subject information.`,builder:m,handler:async e=>{if(e.dryRun){s({command:`cf acm custom-trust-store get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store/${e[`custom-origin-trust-store-id`]==null?`<custom-origin-trust-store-id>`:encodeURIComponent(String(e[`custom-origin-trust-store-id`]))}`,pathParams:{"custom-origin-trust-store-id":String(e[`custom-origin-trust-store-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.acm.customTrustStore.get({zone_id:i,custom_origin_trust_store_id:e[`custom-origin-trust-store-id`]})),{successLabel:`Loaded`})}};function g(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Get Custom Origin Trust Store for a Zone.`,builder:g,handler:async e=>{let n={page:e.page,per_page:e[`per-page`],limit:e.limit,offset:e.offset};if(e.dryRun){s({command:`cf acm custom-trust-store list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let i=await r(e),a=await t({zone:e.zone},i,{quiet:e.quiet});e.zoneId=a,o(await c(`Loading`,async()=>i.acm.customTrustStore.list({zone_id:a,...n})),{successLabel:`Loaded`})}},v={command:`custom-trust-store`,describe:`Operations for custom-trust-store`,builder:e=>e.command(d).command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`certificate-authority`,{type:`string`,description:`The Certificate Authority that Total TLS certificates will be issued through.`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`enabled`,{type:`boolean`,description:`If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`edit`,describe:`Set Total TLS Settings or disable the feature for a Zone.`,builder:y,handler:async e=>{if(e.dryRun){s({command:`cf acm total-tls edit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?a({certificate_authority:l(e[`certificate-authority`],`certificate-authority`,`text`),enabled:e.enabled}):i(e.body)});return}let n=await r(e),u=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=i(e.body);o(await c(`Creating`,async()=>n.acm.totalTls.edit({...t,zone_id:u})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=a({certificate_authority:l(e[`certificate-authority`],`certificate-authority`,`text`),enabled:e.enabled});o(await c(`Creating`,async()=>n.acm.totalTls.edit({...d,zone_id:u})),{successLabel:`Created`})}};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 Total TLS Settings for a Zone.`,builder:x,handler:async e=>{if(e.dryRun){s({command:`cf acm total-tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/total_tls`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await r(e),i=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.acm.totalTls.get({zone_id:i})),{successLabel:`Loaded`})}},C={command:`total-tls`,describe:`Operations for total-tls`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`acm`,describe:`Advanced Certificate Manager — Total TLS auto-issuance and custom origin trust store certificates`,builder:e=>e.command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{C as e,D as t,S as n,T as r,_ as i,i as a,n as o}from"./auth-
|
|
2
|
+
import{C as e,D as t,S as n,T as r,_ as i,i as a,n as o}from"./auth-BqDOIrKX.mjs";import{n as s,t as c}from"./body-parser-CBpeIUns.mjs";import{t as l}from"./output-CUxZRM5A.mjs";import{n as u,t as d}from"./progress-Cent9Lsg.mjs";import{n as f,t as p}from"./input-validation-CTqtyiY9.mjs";import{t as m}from"./local-D8bhHUMK.mjs";import{n as ee,t as te}from"./raw-fetch-DnbAMFBp.mjs";function h(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <address-map-id>`,describe:`Remove an account as a member of a particular address map.`,builder:h,handler:async t=>{if(t.dryRun){let n=e();u({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/accounts/${n??`<account-id>`}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),a=t.local?m:await i(n);if(t.accountId=a,!await r({force:!!t.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}l(await d(`Deleting`,async()=>n.addressing.addressMaps.accounts.delete({account_id:a,address_map_id:t[`address-map-id`],account_id_2:a})),{successLabel:`Deleted`})}};function _(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`update <address-map-id>`,describe:`Add an account as a member of a particular address map.`,builder:_,handler:async t=>{if(t.dryRun){let n=e();u({command:`cf addressing address-maps accounts update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/accounts/${n??`<account-id>`}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Updating`,async()=>n.addressing.addressMaps.accounts.update({account_id:r,address_map_id:t[`address-map-id`],account_id_2:r})),{successLabel:`Updated`})}},y={command:`accounts`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`,default:!1}).option(`ips`,{type:`string`,array:!0,description:`The ips 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 x={command:`create`,describe:`Create a new address map under the account.`,builder:b,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?c({description:f(t.description,`description`,`text`),enabled:t.enabled,ips:t.ips}):s(t.body)});return}let n=await o(t),r=t.local?m:await i(n);if(t.accountId=r,t.body){let e=s(t.body);l(await d(`Creating`,async()=>n.addressing.addressMaps.create({...e,account_id:r})),{successLabel:`Created`});return}let a=c({description:f(t.description,`description`,`text`),enabled:t.enabled,ips:t.ips});l(await d(`Creating`,async()=>n.addressing.addressMaps.create({...a,account_id:r})),{successLabel:`Created`})}};function S(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <address-map-id>`,describe:`Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.`,builder:S,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),a=t.local?m:await i(n);if(t.accountId=a,!await r({force:!!t.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}l(await d(`Deleting`,async()=>n.addressing.addressMaps.delete({account_id:a,address_map_id:t[`address-map-id`]})),{successLabel:`Deleted`})}};function w(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`default-sni`,{type:`string`,description:`If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.`}).option(`description`,{type:`string`,description:`An optional description field which may be used to describe the types of IPs or zones on the map.`}).option(`enabled`,{type:`boolean`,description:`Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`edit <address-map-id>`,describe:`Modify properties of an address map owned by the account.`,builder:w,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`json`,body:t.body===void 0?c({default_sni:f(t[`default-sni`],`default-sni`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled}):s(t.body)});return}let n=await o(t),r=t.local?m:await i(n);if(t.accountId=r,t.body){let e=s(t.body);l(await d(`Updating`,async()=>n.addressing.addressMaps.edit({...e,account_id:r,address_map_id:t[`address-map-id`]})),{successLabel:`Updated`});return}let a=c({default_sni:f(t[`default-sni`],`default-sni`,`text`),description:f(t.description,`description`,`text`),enabled:t.enabled});l(await d(`Updating`,async()=>n.addressing.addressMaps.edit({...a,account_id:r,address_map_id:t[`address-map-id`]})),{successLabel:`Updated`})}};function E(e){return e.positional(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <address-map-id>`,describe:`Show a particular address map owned by the account.`,builder:E,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}`,pathParams:{"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.addressing.addressMaps.get({account_id:r,address_map_id:t[`address-map-id`]})),{successLabel:`Loaded`})}};function O(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <ip-address>`,describe:`Remove an IP from a particular address map.`,builder:O,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps ips delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/ips/${t[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(t[`ip-address`]))}`,pathParams:{"ip-address":String(t[`ip-address`]??``),"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),a=t.local?m:await i(n);if(t.accountId=a,!await r({force:!!t.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}l(await d(`Deleting`,async()=>n.addressing.addressMaps.ips.delete({account_id:a,address_map_id:t[`address-map-id`],ip_address:t[`ip-address`]})),{successLabel:`Deleted`})}};function A(e){return e.positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`update <ip-address>`,describe:`Add an IP from a prefix owned by the account to a particular address map.`,builder:A,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps ips update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/ips/${t[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(t[`ip-address`]))}`,pathParams:{"ip-address":String(t[`ip-address`]??``),"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Updating`,async()=>n.addressing.addressMaps.ips.update({account_id:r,address_map_id:t[`address-map-id`],ip_address:t[`ip-address`]})),{successLabel:`Updated`})}},M={command:`ips`,describe:`Map Cloudflare IPs to specific zones or accounts for custom Anycast addressing`,builder:e=>e.command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List all address maps owned by the account.`,builder:N,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.addressing.addressMaps.list({account_id:r})),{successLabel:`Loaded`})}};function F(e){return e.option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const I={command:`delete`,describe:`Remove a zone as a member of a particular address map.`,builder:F,handler:async t=>{if(t.dryRun){u({command:`cf addressing address-maps zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/addressing/address_maps/${t[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(t[`address-map-id`]))}/zones/${t.zone??t.zoneId??`<zone>`}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"address-map-id":String(t[`address-map-id`]??``)},bodyKind:`none`});return}let a=await o(t),s=t.local?m:await i(a);t.accountId=s;let c=await n({zone:t.zone},a,{quiet:t.quiet});if(t.zoneId=c,!await r({force:!!t.force})){process.stderr.write(`Aborted.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./output-
|
|
2
|
+
import{t as e}from"./output-CUxZRM5A.mjs";import{n as t}from"./metadata-jh2EIan8.mjs";function n(e){return typeof e==`object`&&!!e&&`version`in e&&`products`in e&&`universal`in e&&typeof e.version==`string`&&typeof e.universal==`string`&&typeof e.products==`object`}const r={command:`agent-context [product]`,describe:`Output agent context and skill files`,builder:e=>e.positional(`product`,{describe:`Product name (e.g., d1, dns, zones)`,type:`string`}).option(`list`,{type:`boolean`,describe:`List available products`,default:!1}),handler:async r=>{let i=t(import.meta.url,`agent-context.json`,n);if(i||(console.error("Error: Could not load agent context. Run `pnpm generate` first."),process.exit(1)),r.list){e(Object.keys(i.products));return}if(r.product){let e=i.products[r.product];if(!e){let e=Object.keys(i.products).join(`, `);console.error(`Product "${r.product}" not found. Available: ${e}`),process.exit(1)}console.log(i.universal+`
|
|
3
3
|
|
|
4
4
|
`+e);return}console.log(i.universal+`
|
|
5
5
|
|