cf 0.6.0 → 0.7.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 +78 -41
- package/dist/_meta/commands.json +19888 -21071
- package/dist/_meta/schemas.json +14305 -15328
- package/dist/abuse-reports-BsF9JZPW.mjs +8 -0
- package/dist/account-D8mYiWxQ.mjs +2 -0
- package/dist/accounts-CJci1Oez.mjs +23 -0
- package/dist/acm-CmCd985Q.mjs +3 -0
- package/dist/addressing-R7p6TRBe.mjs +12 -0
- package/dist/{agent-context-CKb6w43K.mjs → agent-context-Bzl5PGW-.mjs} +1 -1
- package/dist/ai-BzJg0RIX.mjs +3 -0
- package/dist/ai-audit-B0vJNOZG.mjs +2 -0
- package/dist/ai-gateway-D3vJR3My.mjs +10 -0
- package/dist/ai-search-CNg7W7U4.mjs +7 -0
- package/dist/alerting-_sdM0B0S.mjs +6 -0
- package/dist/alerts-dpT6Qsdu.mjs +2 -0
- package/dist/{analytics-CwFrx-Dr.mjs → analytics-BFBJhDrP.mjs} +1 -1
- package/dist/analytics_engine-CWhFvyeK.mjs +2 -0
- package/dist/{api-gateway-D9PMVVqL.mjs → api-gateway-D4AIEtUq.mjs} +10 -10
- package/dist/argo-Bjk6nFfs.mjs +2 -0
- package/dist/artifacts-Ba4b3iOa.mjs +4 -0
- package/dist/{audit-logs-BvQ9uwuy.mjs → audit-logs-BE0T5All.mjs} +1 -1
- package/dist/{auth-DX9KnJ0P.mjs → auth-CZ0E51rF.mjs} +3 -3
- package/dist/auth-D_zyQbDR.mjs +5 -0
- package/dist/autorag-Cnpp8PAG.mjs +2 -0
- package/dist/billing-Dz6Zj8Eq.mjs +2 -0
- package/dist/bot-management-pFwIbFi-.mjs +5 -0
- package/dist/botnet-feed-BY9uGChY.mjs +3 -0
- package/dist/brand-protection-DkPAk2Cz.mjs +3 -0
- package/dist/brands-CGpk9nZB.mjs +2 -0
- package/dist/browser-extension-D9P6Yv8i.mjs +3 -0
- package/dist/browser-run-DhHtz4y3.mjs +4 -0
- package/dist/build-CWuStmDi.mjs +2 -0
- package/dist/{cache-CeN5t6_W.mjs → cache-DVhkiIGK.mjs} +4 -4
- package/dist/calls-95zjvIcO.mjs +4 -0
- package/dist/certificate-authorities-BowBqbVq.mjs +2 -0
- package/dist/cf-BLT7uKJF.mjs +18 -0
- package/dist/chunk-2SIGYDH3-qXx_zE6v.mjs +397 -0
- package/dist/clear-DXx8WBAN.mjs +2 -0
- package/dist/client-certificates-D6mE4vJu.mjs +3 -0
- package/dist/cloud-connector-DmwsjeFN.mjs +2 -0
- package/dist/cloudforce-one-CG3TT7IN.mjs +23 -0
- package/dist/{completions-Bvzav4Mj.mjs → completions-DMc_PlIw.mjs} +2 -2
- package/dist/connectivity-DJkE3crz.mjs +3 -0
- package/dist/connector-interrupts-DTgQ7onV.mjs +2 -0
- package/dist/connector-telemetry-events-D0rTHDou.mjs +2 -0
- package/dist/connector-telemetry-snapshots--0QmD3z6.mjs +2 -0
- package/dist/connectors-zWaZTi2A.mjs +3 -0
- package/dist/content-scanning-CGvGf04y.mjs +4 -0
- package/dist/ct-alerting-ebSPSWNC.mjs +3 -0
- package/dist/{custom-certificates-CfRj7QZb.mjs → custom-certificates-CWUrPYLP.mjs} +4 -4
- package/dist/custom-csrs-CRtdrF9R.mjs +4 -0
- package/dist/{custom-hostnames-CcK7_17e.mjs → custom-hostnames-CVQSksqq.mjs} +4 -4
- package/dist/custom-nameservers-BRwbIdsX.mjs +3 -0
- package/dist/custom-pages-Ci8sTQX7.mjs +4 -0
- package/dist/d1-78Ym1P6D.mjs +4 -0
- package/dist/data-security-zmFoMwRU.mjs +6 -0
- package/dist/{dcv-delegation-BYsNl3qc.mjs → dcv-delegation-Dd4FZ2IG.mjs} +1 -1
- package/dist/{deploy-BzlPv3ro.mjs → deploy-CVvkZFjR.mjs} +1 -1
- package/dist/{dev-IOg-_s5_.mjs → dev-DSslyDXx.mjs} +1 -1
- package/dist/diagnostics-B8Ev5m_o.mjs +3 -0
- package/dist/dispatch-namespaces-Dm5vGeEP.mjs +7 -0
- package/dist/dist-BH-4NQOV.mjs +134 -0
- package/dist/dns-D7VAaCyO.mjs +29 -0
- package/dist/dns-firewall-ByLCsf0q.mjs +57 -0
- package/dist/domain-info-CRvKc2Lg.mjs +2 -0
- package/dist/durable-objects-BIpvyu9m.mjs +2 -0
- package/dist/email-auth-Cx--s8W4.mjs +2 -0
- package/dist/email-routing-CiDbivcN.mjs +10 -0
- package/dist/email-security-BYeAuSc6.mjs +12 -0
- package/dist/email-sending-Dg2rSmHH.mjs +4 -0
- package/dist/{filters-DKs-wEzt.mjs → filters-DZ8YnQ90.mjs} +3 -3
- package/dist/firewall-DEd1hs_I.mjs +11 -0
- package/dist/flagship-DVw7xGoP.mjs +4 -0
- package/dist/{fraud-D8WmLKyH.mjs → fraud-BbGS3FZs.mjs} +2 -2
- package/dist/google-tag-gateway-CBnRGYQR.mjs +2 -0
- package/dist/{healthchecks-BBtW8vRh.mjs → healthchecks-Da9N3ix4.mjs} +3 -3
- package/dist/{hostnames-Bh2IFxIw.mjs → hostnames-mimZu2tB.mjs} +2 -2
- package/dist/hyperdrive-BNdvxOos.mjs +21 -0
- package/dist/iam-DGQ-OgRl.mjs +6 -0
- package/dist/images-CI6Iy9ho.mjs +7 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-BDB-aRtU.mjs +3 -0
- package/dist/internal-Czlp5Ekb.mjs +2 -0
- package/dist/{ips-BE7JbAnc.mjs → ips-B9UuPvsY.mjs} +1 -1
- package/dist/keyless-certificates-Ua9uJgPt.mjs +3 -0
- package/dist/kv-BHerx4dZ.mjs +5 -0
- package/dist/leaked-credential-checks-B8Vunj9h.mjs +3 -0
- package/dist/live-Ce7dZW7p.mjs +2 -0
- package/dist/load-balancers-DSjS5WKw.mjs +6 -0
- package/dist/logexplorer-DBIfTlRP.mjs +24 -0
- package/dist/logo-matches-C00iGpzW.mjs +2 -0
- package/dist/logos-CJLhx1go.mjs +3 -0
- package/dist/logpush-Cr1U-eK-.mjs +5 -0
- package/dist/logs-DMvtchc6.mjs +3 -0
- package/dist/magic-cloud-networking-FQfO8QWH.mjs +5 -0
- package/dist/magic-network-monitoring-CDd70fJQ.mjs +4 -0
- package/dist/magic-transit-DiKiPUax.mjs +110 -0
- package/dist/managed-transforms-fPVUTrAv.mjs +3 -0
- package/dist/matches-B0yHbQ2I.mjs +2 -0
- package/dist/moq-UgBawOXe.mjs +13 -0
- package/dist/mtls-certificates-xKUbC5EL.mjs +3 -0
- package/dist/network-interconnects-BJzOE2ny.mjs +41 -0
- package/dist/oauth-DBJ5GSFk.mjs +40 -0
- package/dist/observability-B-1y36QS.mjs +4 -0
- package/dist/organization-Dq3PClZ7.mjs +41 -0
- package/dist/organizations-AhsQkHyX.mjs +2 -0
- package/dist/origin-ca-certificates-CRgF0UyU.mjs +3 -0
- package/dist/origin-post-quantum-encryption-BXTx7DPa.mjs +2 -0
- package/dist/{origin-tls-client-auth-B30_2_dO.mjs → origin-tls-client-auth-BDw5q-6G.mjs} +3 -3
- package/dist/{page-rules-zQJGmTCd.mjs → page-rules-DqYQ23eg.mjs} +5 -5
- package/dist/{page-shield-CxQk5k9X.mjs → page-shield-DKdlZOLO.mjs} +5 -5
- package/dist/pages-BsXF11Kv.mjs +11 -0
- package/dist/pay-per-crawl-BGAwuAP3.mjs +2 -0
- package/dist/pipelines-D_QhSnGW.mjs +6 -0
- package/dist/progress-O88q63Bk.mjs +2 -0
- package/dist/{prompt-q3B7sM2A.mjs → prompt-DTAWiEm2.mjs} +1 -1
- package/dist/queries-CAE95-OH.mjs +3 -0
- package/dist/queues-BBz35Mqd.mjs +6 -0
- package/dist/r2-Zp99S5xF.mjs +21 -0
- package/dist/r2-data-catalog-BeVLZwrE.mjs +16 -0
- package/dist/radar-Cij-XVQJ.mjs +2 -0
- package/dist/rate-limit-analytics-CGviSPnJ.mjs +2 -0
- package/dist/rate-limits-DSdToIWv.mjs +5 -0
- package/dist/raw-fetch-DgezeshQ.mjs +2 -0
- package/dist/ready-DMpJvyaz.mjs +2 -0
- package/dist/realtime-kit-9rJcapfM.mjs +18 -0
- package/dist/recent-submissions-LS5IM-bm.mjs +2 -0
- package/dist/refute-BGTpr5sy.mjs +2 -0
- package/dist/registrar-CXViZlah.mjs +83 -0
- package/dist/registrar-sandbox-CvQyjXLJ.mjs +83 -0
- package/dist/request-tracers-DATfBnE9.mjs +2 -0
- package/dist/{resolve-DGD57PFH.mjs → resolve-Bs2sMRYS.mjs} +1 -1
- package/dist/resource-sharing-Cmhn6ghR.mjs +3 -0
- package/dist/resource-tagging-BTn05AOj.mjs +16 -0
- package/dist/rules-ens3OHme.mjs +4 -0
- package/dist/rulesets-bkreZRao.mjs +8 -0
- package/dist/rum-CpgXFcwl.mjs +4 -0
- package/dist/scan-logo-DUDIZJ2A.mjs +2 -0
- package/dist/scan-page-BqoQTk3R.mjs +2 -0
- package/dist/{schema-D8o6HcCr.mjs → schema-DCF4yEp_.mjs} +1 -1
- package/dist/{schema-validation-BWNDnnIT.mjs → schema-validation-Ca6o94ts.mjs} +5 -5
- package/dist/scim-C4oT8TMc.mjs +4 -0
- package/dist/sdk-pQ5kaGUX.mjs +3 -0
- package/dist/search-C4T5riPh.mjs +2 -0
- package/dist/secrets-store-CWEuiDNo.mjs +7 -0
- package/dist/security-center-BOvm7xy6.mjs +2 -0
- package/dist/{security-txt-CVpmJo29.mjs → security-txt-BCAUBctN.mjs} +2 -2
- package/dist/session-B1ARgLG7.mjs +2 -0
- package/dist/share-DhmVspmL.mjs +5 -0
- package/dist/{shared-DQI8NGja.mjs → shared-Bod3-Exx.mjs} +332 -332
- package/dist/signed-url-DA509wgp.mjs +2 -0
- package/dist/{smart-shield-BreBC1Ap.mjs → smart-shield-DZm4fn6z.mjs} +2 -2
- package/dist/{snippets-BAJoWMSJ.mjs → snippets-oQ0u26-z.mjs} +3 -3
- package/dist/{spawn-pmGERpdB.mjs → spawn-ChG5Xi9Z.mjs} +1 -1
- package/dist/{spectrum-DnIRLY95.mjs → spectrum-Cnkee5Ww.mjs} +6 -6
- package/dist/speed-DqNnvLBD.mjs +4 -0
- package/dist/{src-BQ1dr9xR.mjs → src-By-zTCHz.mjs} +9 -9
- package/dist/ssl-tS3CYZsZ.mjs +15 -0
- package/dist/state-OsdDJvdj.mjs +2 -0
- package/dist/stream-Bud9Os5V.mjs +14 -0
- package/dist/submission-info-DfIXmu-M.mjs +2 -0
- package/dist/submit-BtP8she2.mjs +2 -0
- package/dist/tenant-CMwHa-tU.mjs +2 -0
- package/dist/{token-validation-DUvtXWur.mjs → token-validation-BYC7HTok.mjs} +5 -5
- package/dist/{tools-CQtA5-cr.mjs → tools-Dru4l8yh.mjs} +1 -1
- package/dist/total-queries-DdLBNJzd.mjs +2 -0
- package/dist/tracked-domains-BbaY-IuY.mjs +2 -0
- package/dist/turnstile-CP4nScaL.mjs +23 -0
- package/dist/{ui-BrNwNHX9.mjs → ui-BNoF0KpD.mjs} +2 -2
- package/dist/url-info-Chs9h7Y-.mjs +2 -0
- package/dist/url-normalization-XYxW5Gj0.mjs +3 -0
- package/dist/url-scanner-D4pYNlO-.mjs +2 -0
- package/dist/user-DtefniLc.mjs +11 -0
- package/dist/vectorize-BeAY2g-7.mjs +4 -0
- package/dist/verify-D7J3F_NZ.mjs +2 -0
- package/dist/{versions-NUXxCr0s.mjs → versions-dMW3bLVv.mjs} +1 -1
- package/dist/waiting-rooms-K78HeeTg.mjs +11 -0
- package/dist/{web3-n3GW50u-.mjs → web3-Dhw79l4S.mjs} +3 -3
- package/dist/workers-builds-CuOAB3u4.mjs +7 -0
- package/dist/workers-l3zMNOU6.mjs +20 -0
- package/dist/workflows-rb7RYBKP.mjs +6 -0
- package/dist/{zaraz-9l7KuLqh.mjs → zaraz-CHecMYuo.mjs} +1 -1
- package/dist/zero-trust-DAZoa-Aj.mjs +117 -0
- package/dist/zone-BnnqJwW-.mjs +2 -0
- package/dist/zones-DpI2YikF.mjs +21 -0
- package/package.json +1 -1
- package/dist/abuse-reports-DUs4SKVx.mjs +0 -8
- package/dist/accounts-BIY8wNGA.mjs +0 -22
- package/dist/acm-SqcV8o5o.mjs +0 -3
- package/dist/addressing-CygRm0pN.mjs +0 -12
- package/dist/ai-BAmEAjN3.mjs +0 -2
- package/dist/ai-gateway-BENwPvvB.mjs +0 -8
- package/dist/ai-search-Bv_Whw3E.mjs +0 -7
- package/dist/ai_gateway-C6WP9oBH.mjs +0 -4
- package/dist/alerting-D_qWrsoY.mjs +0 -6
- package/dist/analytics_engine-BjV6XLyG.mjs +0 -2
- package/dist/argo-DwYGbyld.mjs +0 -2
- package/dist/artifacts-DKAjY_n4.mjs +0 -4
- package/dist/auth-TYwGydWg.mjs +0 -5
- package/dist/billing-CRTlRU88.mjs +0 -2
- package/dist/bot-management-DgW--8wM.mjs +0 -5
- package/dist/botnet-feed-CIX6ZORT.mjs +0 -3
- package/dist/brand-protection-ZikBtl0y.mjs +0 -3
- package/dist/browser-rendering-D_ZQVWn8.mjs +0 -4
- package/dist/build-Bgw8TV1p.mjs +0 -134
- package/dist/calls-Cv0ieVg4.mjs +0 -4
- package/dist/certificate-authorities-BzZnWCac.mjs +0 -2
- package/dist/client-certificates-BFuzeBrj.mjs +0 -3
- package/dist/cloud-connector-D5h8Dzzg.mjs +0 -2
- package/dist/cloudforce-one-aqDCIBMp.mjs +0 -21
- package/dist/config-B5k-XbwS.mjs +0 -2
- package/dist/connectivity-CjkXmEhO.mjs +0 -3
- package/dist/connector-interrupts-B7eSface.mjs +0 -2
- package/dist/connector-telemetry-events-F3Co8HUf.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CQY8XMUg.mjs +0 -2
- package/dist/connectors-YYu_Vx3H.mjs +0 -3
- package/dist/content-scanning-BorfRGKT.mjs +0 -4
- package/dist/context-C-WbewL6.mjs +0 -2
- package/dist/custom-nameservers-BkKx0THn.mjs +0 -3
- package/dist/custom-pages-DamGVA75.mjs +0 -4
- package/dist/d1-sK0O5THv.mjs +0 -4
- package/dist/data-security-DsWpoWiS.mjs +0 -6
- package/dist/diagnostics-CH7T2WR3.mjs +0 -3
- package/dist/dispatch-namespaces-Bgj9XCRx.mjs +0 -7
- package/dist/dist-C6zxsVdY.mjs +0 -306
- package/dist/dns-firewall-VmQf3UVP.mjs +0 -57
- package/dist/dns-o7hUPMCG.mjs +0 -29
- package/dist/durable-objects-DgrTbvoF.mjs +0 -2
- package/dist/email-routing-owCvAEpf.mjs +0 -10
- package/dist/email-security-Dng3DVuf.mjs +0 -8
- package/dist/email-sending-bExMH4lu.mjs +0 -3
- package/dist/firewall-BLaTtX3r.mjs +0 -11
- package/dist/google-tag-gateway-DyCY43k0.mjs +0 -2
- package/dist/hyperdrive-DJm1eD-M.mjs +0 -18
- package/dist/iam-apCCcy7R.mjs +0 -6
- package/dist/images-Cxe45OHm.mjs +0 -7
- package/dist/intel-8V4h6H46.mjs +0 -3
- package/dist/keyless-certificates-CfJmXccT.mjs +0 -3
- package/dist/kv-Dz6then8.mjs +0 -5
- package/dist/leaked-credential-checks-BJ-zQMlx.mjs +0 -3
- package/dist/load-balancers-ilsGgudX.mjs +0 -6
- package/dist/logpush-BH14TtuA.mjs +0 -4
- package/dist/logs-B8-mkf_I.mjs +0 -3
- package/dist/magic-cloud-networking-DylCXoG4.mjs +0 -5
- package/dist/magic-network-monitoring-DnyrZy77.mjs +0 -4
- package/dist/magic-transit-B-kU5e3s.mjs +0 -89
- package/dist/managed-transforms-GC9Pq5dg.mjs +0 -3
- package/dist/mtls-certificates-BRlhWw_G.mjs +0 -3
- package/dist/network-interconnects-DuyoFD9_.mjs +0 -36
- package/dist/oauth-B5k80sip.mjs +0 -61
- package/dist/observability-9APhqFHo.mjs +0 -4
- package/dist/organizations-Dy3kiV_z.mjs +0 -41
- package/dist/origin-ca-certificates-2rwPoQdG.mjs +0 -3
- package/dist/origin-post-quantum-encryption-BnBLTvEO.mjs +0 -2
- package/dist/pages-5DKLs7CQ.mjs +0 -11
- package/dist/pipelines-DfGE44xo.mjs +0 -6
- package/dist/progress-CL8I-7YK.mjs +0 -2
- package/dist/queues-BoenUGIw.mjs +0 -6
- package/dist/r2-Cq_JCjK0.mjs +0 -21
- package/dist/r2-data-catalog-eLxltWdO.mjs +0 -14
- package/dist/radar-YNOCio6T.mjs +0 -2
- package/dist/rate-limits-CcAF3tMl.mjs +0 -5
- package/dist/raw-fetch-bIXC9D1m.mjs +0 -2
- package/dist/realtime-kit-4bCGviO5.mjs +0 -18
- package/dist/registrar-CfHlaOOf.mjs +0 -46
- package/dist/request-tracers-DlHawg5l.mjs +0 -2
- package/dist/resource-sharing-7FhuboJE.mjs +0 -5
- package/dist/resource-tagging-divcugVb.mjs +0 -16
- package/dist/rules-CAXkege8.mjs +0 -4
- package/dist/rulesets-CBsdc8IV.mjs +0 -8
- package/dist/rum-D0hHPNl9.mjs +0 -4
- package/dist/scim-CWLli4fi.mjs +0 -3
- package/dist/sdk-DhIhH6GB.mjs +0 -5
- package/dist/secrets-store-B7_HkE8I.mjs +0 -25
- package/dist/security-center-BQT21oiM.mjs +0 -2
- package/dist/session-B8r8LNQN.mjs +0 -93
- package/dist/speed-UYEVue28.mjs +0 -4
- package/dist/ssl-D3Pixs8M.mjs +0 -15
- package/dist/stream-BUsuOfQh.mjs +0 -14
- package/dist/tenants-BdWJTtcg.mjs +0 -2
- package/dist/turnstile-CAKVnS1L.mjs +0 -23
- package/dist/url-normalization-DA-RAxs4.mjs +0 -3
- package/dist/url-scanner-DmYu43f7.mjs +0 -2
- package/dist/user-Bah4wGGN.mjs +0 -10
- package/dist/vectorize-DhvVG2By.mjs +0 -4
- package/dist/waiting-rooms-DoOkT4Mu.mjs +0 -11
- package/dist/workers-D6IaQ_F0.mjs +0 -18
- package/dist/workers-builds-DYi0OMMU.mjs +0 -7
- package/dist/workflows-DrdXUQ2g.mjs +0 -4
- package/dist/zero-trust-D6V9GH2W.mjs +0 -118
- package/dist/zero_trust-BzXKAX_x.mjs +0 -3
- package/dist/zones-0MTkuaFk.mjs +0 -21
- /package/dist/{body-parser-DWSy7uZ8.mjs → body-parser-BO6mfo_W.mjs} +0 -0
- /package/dist/{cli-types-DGgEbf8K.mjs → cli-types-CFw6Xygp.mjs} +0 -0
- /package/dist/{input-validation-_fMCApaH.mjs → input-validation-BwUR9z8e.mjs} +0 -0
- /package/dist/{lib-4PQI6yRW.mjs → lib-Og5sB51C.mjs} +0 -0
- /package/dist/{local-CYc9q7l2.mjs → local-C6TLPAT6.mjs} +0 -0
- /package/dist/{metadata-MPDDi08e.mjs → metadata-Cnyws6iO.mjs} +0 -0
- /package/dist/{open-YWOUIZ5Y-3jqSKAB1.mjs → open-YWOUIZ5Y-CFRcYALi.mjs} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{N as e}from"./oauth-B5k80sip.mjs";import{n as t}from"./auth-DX9KnJ0P.mjs";import{n}from"./body-parser-DWSy7uZ8.mjs";import{t as r}from"./output-B6fBFRqe.mjs";import{n as i,t as a}from"./progress-CL8I-7YK.mjs";import{t as o}from"./prompt-q3B7sM2A.mjs";function s(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 c={command:`delete`,describe:`Disables all Managed Transforms.`,builder:s,handler:async n=>{if(n.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`none`});return}let s=await t(n),c=await e({zone:n.zone},s,{quiet:n.quiet});if(n.zoneId=c,!await o({force:!!n.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}r(await a(`Deleting`,async()=>s.managedTransforms.delete({zone_id:c})),{successLabel:`Deleted`})}};function l(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A Managed Transforms patch object. Both fields are optional; only the sections provided will be updated.`})}const u={command:`edit`,describe:`Updates the status of one or more Managed Transforms.`,builder:l,handler:async o=>{if(o.dryRun){i({command:`cf managed-transforms edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:n(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=n(o.body);r(await a(`Updating`,async()=>s.managedTransforms.edit({...e,zone_id:c})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>s.managedTransforms.edit({zone_id:c})),{successLabel:`Updated`})}};function d(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`Fetches a list of all Managed Transforms.`,builder:d,handler:async n=>{if(n.dryRun){i({command:`cf managed-transforms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${n.zone??n.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(n.zone??n[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(n),s=await e({zone:n.zone},o,{quiet:n.quiet});n.zoneId=s,r(await a(`Loading`,async()=>o.managedTransforms.list({zone_id:s})),{successLabel:`Loaded`})}},p={command:`managed-transforms`,describe:`Cloudflare-managed HTTP header transforms — automatically add security headers, remove server info, etc.`,builder:e=>e.command(c).command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{O as e,P as t}from"./oauth-B5k80sip.mjs";import{n}from"./auth-DX9KnJ0P.mjs";import{n as r,t as i}from"./body-parser-DWSy7uZ8.mjs";import{t as a}from"./output-B6fBFRqe.mjs";import{n as o,t as s}from"./progress-CL8I-7YK.mjs";import{n as c}from"./input-validation-_fMCApaH.mjs";import{t as l}from"./local-CYc9q7l2.mjs";import{r as u,t as d}from"./prompt-q3B7sM2A.mjs";import{t as f}from"./cli-types-DGgEbf8K.mjs";function p(e){return e.positional(`mtls-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 m={command:`get <mtls-certificate-id>`,describe:`Lists all active associations between the certificate and Cloudflare services.`,builder:p,handler:async r=>{if(r.dryRun){o({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/mtls_certificates/${r[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(r[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(r[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.mtlsCertificates.associations.get({account_id:c,mtls_certificate_id:r[`mtls-certificate-id`]})),{successLabel:`Loaded`})}},h={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.option(`ca`,{type:`boolean`,description:`Indicates whether the certificate is a CA or leaf certificate.`}).option(`certificates`,{type:`string`,description:`The uploaded root CA certificate.`}).option(`name`,{type:`string`,description:`Optional unique name for the certificate. Only used for human readability.`}).option(`private-key`,{type:`string`,description:`The private key for the certificate. This field is only needed for specific use cases such as using a custom certificate with Zero Trust's block 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 _={command:`create`,describe:`Upload a certificate that you want to use with mTLS-enabled Cloudflare services, such as Bring Your Own CA (BYO-CA) for mTLS. To create certificates issued by the Cloudflare managed CA, use the [Create Client Certificate endpoint](/api/resources/client_certificates/methods/create/).`,builder:g,handler:async d=>{if(d.dryRun){o({command:`cf mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/mtls_certificates`,pathParams:{},bodyKind:`json`,body:d.body===void 0?i({ca:d.ca,certificates:c(d.certificates,`certificates`,`text`),name:c(d.name,`name`,`text`),private_key:c(d[`private-key`],`private-key`,`text`)}):r(d.body)});return}let f=await n(d),p=d.local?l:await e();if(d.accountId=p,d.body){let e=r(d.body);a(await s(`Creating`,async()=>f.mtlsCertificates.create({...e,account_id:p})),{successLabel:`Created`});return}if(d.ca===void 0)throw Error(`--ca is required (or pass --body with this field set).`);d.certificates===void 0&&(d.certificates=await u(`certificates`,`The uploaded root CA certificate.`));let m=i({ca:d.ca,certificates:c(d.certificates,`certificates`,`text`),name:c(d.name,`name`,`text`),private_key:c(d[`private-key`],`private-key`,`text`)});a(await s(`Creating`,async()=>f.mtlsCertificates.create({...m,account_id:p})),{successLabel:`Created`})}};function v(e){return e.positional(`mtls-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 y={command:`delete <mtls-certificate-id>`,describe:`Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services.`,builder:v,handler:async r=>{if(r.dryRun){o({command:`cf mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/mtls_certificates/${r[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(r[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(r[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();if(r.accountId=c,!await d({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>i.mtlsCertificates.delete({account_id:c,mtls_certificate_id:r[`mtls-certificate-id`]})),{successLabel:`Deleted`})}};function b(e){return e.positional(`mtls-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 x={command:`get <mtls-certificate-id>`,describe:`Fetches a single mTLS certificate uploaded to your account. To get a certificate issued by the Cloudflare managed CA, use the [Client Certificate Details endpoint](/api/resources/client_certificates/methods/get/).`,builder:b,handler:async r=>{if(r.dryRun){o({command:`cf mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/mtls_certificates/${r[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(r[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(r[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.mtlsCertificates.get({account_id:c,mtls_certificate_id:r[`mtls-certificate-id`]})),{successLabel:`Loaded`})}};function S(e){return e.option(`type`,{type:`string`,description:`Filters results by certificate type. Multiple types can be comma-separated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`Lists all mTLS certificates uploaded to your account, such as Bring Your Own CA (BYO-CA) for mTLS. To list certificates issued by the Cloudflare managed CA, use the [List Client Certificates endpoint](/api/resources/client_certificates/methods/list/).`,builder:f(S),handler:async r=>{let i={type:r.type};if(r.dryRun){o({command:`cf mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/mtls_certificates`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.mtlsCertificates.list({account_id:u,...i})),{successLabel:`Loaded`})}},w={command:`mtls-certificates`,describe:`Upload and manage mTLS certificates used by API Shield, Workers, and Gateway for client authentication`,builder:e=>e.command(_).command(y).command(x).command(C).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{O as e,P as t}from"./oauth-B5k80sip.mjs";import{n}from"./auth-DX9KnJ0P.mjs";import{n as r,t as i}from"./body-parser-DWSy7uZ8.mjs";import{t as a}from"./output-B6fBFRqe.mjs";import{n as o,t as s}from"./progress-CL8I-7YK.mjs";import{n as c}from"./input-validation-_fMCApaH.mjs";import{t as l}from"./local-CYc9q7l2.mjs";import{r as u,t as d}from"./prompt-q3B7sM2A.mjs";function f(e){return e.option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
3
|
-
|
|
4
|
-
Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
|
|
5
|
-
key is not treated as a secret value. This is *only* supported for preventing
|
|
6
|
-
misconfiguration, not for defending against malicious attacks.
|
|
7
|
-
|
|
8
|
-
The MD5 key, if set, must be of non-zero length and consist only of the following types of
|
|
9
|
-
character:
|
|
10
|
-
|
|
11
|
-
* ASCII alphanumerics: \`[a-zA-Z0-9]\`
|
|
12
|
-
* Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
|
|
13
|
-
|
|
14
|
-
In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
|
|
15
|
-
quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
|
|
16
|
-
(0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
|
|
17
|
-
these disallowed characters will be rejected.`}).option(`interconnect`,{type:`string`,description:`The interconnect field`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu 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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const p={command:`create`,describe:`Create a new CNI object`,builder:f,handler:async d=>{if(d.dryRun){o({command:`cf network-interconnects cnis create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/cnis`,pathParams:{},bodyKind:`json`,body:d.body===void 0?i({account:c(d.account,`account`,`text`),bgp:{customer_asn:d[`bgp-customer-asn`],extra_prefixes:d[`bgp-extra-prefixes`],md5_key:c(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:c(d.interconnect,`interconnect`,`text`),magic:{conduit_name:c(d[`magic-conduit-name`],`magic-conduit-name`,`text`),description:c(d[`magic-description`],`magic-description`,`text`),mtu:d[`magic-mtu`]}}):r(d.body)});return}let f=await n(d),p=d.local?l:await e();if(d.accountId=p,d.body){let e=r(d.body);a(await s(`Creating`,async()=>f.networkInterconnects.cnis.create({...e,account_id:p})),{successLabel:`Created`});return}if(d.account===void 0&&(d.account=await u(`account`,`Customer account tag`)),d.interconnect===void 0&&(d.interconnect=await u(`interconnect`,`The interconnect field`)),d[`magic-conduit-name`]===void 0&&(d[`magic-conduit-name`]=await u(`magic-conduit-name`,`The magic.conduit_name field`)),d[`magic-description`]===void 0&&(d[`magic-description`]=await u(`magic-description`,`The magic.description field`)),d[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);let m=i({account:c(d.account,`account`,`text`),bgp:{customer_asn:d[`bgp-customer-asn`],extra_prefixes:d[`bgp-extra-prefixes`],md5_key:c(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:c(d.interconnect,`interconnect`,`text`),magic:{conduit_name:c(d[`magic-conduit-name`],`magic-conduit-name`,`text`),description:c(d[`magic-description`],`magic-description`,`text`),mtu:d[`magic-mtu`]}});a(await s(`Creating`,async()=>f.networkInterconnects.cnis.create({...m,account_id:p})),{successLabel:`Created`})}};function m(e){return e.positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,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 <cni>`,describe:`Delete a specified CNI object`,builder:m,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/cnis/${r.cni==null?`<cni>`:encodeURIComponent(String(r.cni))}`,pathParams:{cni:String(r.cni??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();if(r.accountId=c,!await d({force:!!r.force})){process.stderr.write(`Aborted.
|
|
18
|
-
`);return}a(await s(`Deleting`,async()=>i.networkInterconnects.cnis.delete({account_id:c,cni:r.cni})),{successLabel:`Deleted`})}};function g(e){return e.positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <cni>`,describe:`Get information about a CNI object`,builder:g,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/cnis/${r.cni==null?`<cni>`:encodeURIComponent(String(r.cni))}`,pathParams:{cni:String(r.cni??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.cnis.get({account_id:c,cni:r.cni})),{successLabel:`Loaded`})}};function v(e){return e.option(`slot`,{type:`string`,description:`If specified, only show CNIs associated with the specified slot`}).option(`tunnel-id`,{type:`string`,description:`If specified, only show cnis associated with the specified tunnel id`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List existing CNI objects`,builder:v,handler:async r=>{let i={slot:r.slot,tunnel_id:r[`tunnel-id`],cursor:r.cursor,limit:r.limit};if(r.dryRun){o({command:`cf network-interconnects cnis list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/cnis`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.networkInterconnects.cnis.list({account_id:u,...i})),{successLabel:`Loaded`})}};function b(e){return e.positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
19
|
-
|
|
20
|
-
Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
|
|
21
|
-
key is not treated as a secret value. This is *only* supported for preventing
|
|
22
|
-
misconfiguration, not for defending against malicious attacks.
|
|
23
|
-
|
|
24
|
-
The MD5 key, if set, must be of non-zero length and consist only of the following types of
|
|
25
|
-
character:
|
|
26
|
-
|
|
27
|
-
* ASCII alphanumerics: \`[a-zA-Z0-9]\`
|
|
28
|
-
* Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
|
|
29
|
-
|
|
30
|
-
In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
|
|
31
|
-
quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
|
|
32
|
-
(0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
|
|
33
|
-
these disallowed characters will be rejected.`}).option(`cust-ip`,{type:`string`,description:`Customer end of the point-to-point link
|
|
34
|
-
|
|
35
|
-
This should always be inside the same prefix as \`p2p_ip\`.`}).option(`id`,{type:`string`,description:`The id field`}).option(`interconnect`,{type:`string`,description:`Interconnect identifier hosting this CNI`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu field`}).option(`p2p-ip`,{type:`string`,description:`Cloudflare end of the point-to-point link`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const x={command:`update <cni>`,describe:`Modify stored information about a CNI object`,builder:b,handler:async d=>{if(d.dryRun){o({command:`cf network-interconnects cnis update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/cnis/${d.cni==null?`<cni>`:encodeURIComponent(String(d.cni))}`,pathParams:{cni:String(d.cni??``)},bodyKind:`json`,body:d.body===void 0?i({account:c(d.account,`account`,`text`),bgp:{customer_asn:d[`bgp-customer-asn`],extra_prefixes:d[`bgp-extra-prefixes`],md5_key:c(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cust_ip:c(d[`cust-ip`],`cust-ip`,`text`),id:c(d.id,`id`,`text`),interconnect:c(d.interconnect,`interconnect`,`text`),magic:{conduit_name:c(d[`magic-conduit-name`],`magic-conduit-name`,`text`),description:c(d[`magic-description`],`magic-description`,`text`),mtu:d[`magic-mtu`]},p2p_ip:c(d[`p2p-ip`],`p2p-ip`,`text`)}):r(d.body)});return}let f=await n(d),p=d.local?l:await e();if(d.accountId=p,d.body){let e=r(d.body);a(await s(`Updating`,async()=>f.networkInterconnects.cnis.update({body:e,account_id:p,cni:d.cni})),{successLabel:`Updated`});return}if(d.account===void 0&&(d.account=await u(`account`,`Customer account tag`)),d[`cust-ip`]===void 0&&(d[`cust-ip`]=await u(`cust-ip`,"Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`.")),d.id===void 0&&(d.id=await u(`id`,`The id field`)),d.interconnect===void 0&&(d.interconnect=await u(`interconnect`,`Interconnect identifier hosting this CNI`)),d[`magic-conduit-name`]===void 0&&(d[`magic-conduit-name`]=await u(`magic-conduit-name`,`The magic.conduit_name field`)),d[`magic-description`]===void 0&&(d[`magic-description`]=await u(`magic-description`,`The magic.description field`)),d[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);d[`p2p-ip`]===void 0&&(d[`p2p-ip`]=await u(`p2p-ip`,`Cloudflare end of the point-to-point link`));let m=i({account:c(d.account,`account`,`text`),bgp:{customer_asn:d[`bgp-customer-asn`],extra_prefixes:d[`bgp-extra-prefixes`],md5_key:c(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cust_ip:c(d[`cust-ip`],`cust-ip`,`text`),id:c(d.id,`id`,`text`),interconnect:c(d.interconnect,`interconnect`,`text`),magic:{conduit_name:c(d[`magic-conduit-name`],`magic-conduit-name`,`text`),description:c(d[`magic-description`],`magic-description`,`text`),mtu:d[`magic-mtu`]},p2p_ip:c(d[`p2p-ip`],`p2p-ip`,`text`)});a(await s(`Updating`,async()=>f.networkInterconnects.cnis.update({body:m,account_id:p,cni:d.cni})),{successLabel:`Updated`})}},S={command:`cnis`,describe:`Cloud Network Interconnect (CNI) connections — private links from cloud providers to Cloudflare`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`account`,{type:`string`,description:`The account field`}).option(`type`,{type:`string`,description:`The type field`}).option(`slot-id`,{type:`string`,description:`The slot_id field`}).option(`speed`,{type:`string`,description:`The speed field`}).option(`bandwidth`,{type:`string`,description:`Bandwidth structure as visible through the customer-facing API.`,choices:[`50M`,`100M`,`200M`,`300M`,`400M`,`500M`,`1G`,`2G`,`5G`,`10G`,`20G`,`50G`]}).option(`pairing-key`,{type:`string`,description:`Pairing key provided by GCP`}).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)`}).conflicts(`slot-id`,[`bandwidth`,`pairing-key`]).conflicts(`speed`,[`bandwidth`,`pairing-key`]).conflicts(`bandwidth`,[`slot-id`,`speed`]).implies(`bandwidth`,[`pairing-key`]).conflicts(`pairing-key`,[`slot-id`,`speed`]).implies(`pairing-key`,[`bandwidth`])}const w={command:`create`,describe:`Create a new interconnect`,builder:C,handler:async d=>{if(d.dryRun){o({command:`cf network-interconnects interconnects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects`,pathParams:{},bodyKind:`json`,body:d.body===void 0?i({account:c(d.account,`account`,`text`),type:c(d.type,`type`,`text`),slot_id:c(d[`slot-id`],`slot-id`,`text`),speed:c(d.speed,`speed`,`text`),bandwidth:c(d.bandwidth,`bandwidth`,`text`),pairing_key:c(d[`pairing-key`],`pairing-key`,`text`)}):r(d.body)});return}let f=await n(d),p=d.local?l:await e();if(d.accountId=p,d.body){let e=r(d.body);a(await s(`Creating`,async()=>f.networkInterconnects.interconnects.create({body:e,account_id:p})),{successLabel:`Created`});return}d.account===void 0&&(d.account=await u(`account`,`The account field`)),d.type===void 0&&(d.type=await u(`type`,`The type field`));let m=i({account:c(d.account,`account`,`text`),type:c(d.type,`type`,`text`),slot_id:c(d[`slot-id`],`slot-id`,`text`),speed:c(d.speed,`speed`,`text`),bandwidth:c(d.bandwidth,`bandwidth`,`text`),pairing_key:c(d[`pairing-key`],`pairing-key`,`text`)});a(await s(`Creating`,async()=>f.networkInterconnects.interconnects.create({body:m,account_id:p})),{successLabel:`Created`})}};function T(e){return e.positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,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:`delete <icon>`,describe:`Delete an interconnect object`,builder:T,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects/${r.icon==null?`<icon>`:encodeURIComponent(String(r.icon))}`,pathParams:{icon:String(r.icon??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();if(r.accountId=c,!await d({force:!!r.force})){process.stderr.write(`Aborted.
|
|
36
|
-
`);return}a(await s(`Deleting`,async()=>i.networkInterconnects.interconnects.delete({account_id:c,icon:r.icon})),{successLabel:`Deleted`})}};function D(e){return e.positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <icon>`,describe:`Get information about an interconnect object`,builder:D,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects/${r.icon==null?`<icon>`:encodeURIComponent(String(r.icon))}`,pathParams:{icon:String(r.icon??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.interconnects.get({account_id:c,icon:r.icon})),{successLabel:`Loaded`})}};function k(e){return e.option(`site`,{type:`string`,description:`If specified, only show interconnects located at the given site`}).option(`type`,{type:`string`,description:`If specified, only show interconnects of the given type`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List existing interconnects`,builder:k,handler:async r=>{let i={site:r.site,type:r.type,cursor:r.cursor,limit:r.limit};if(r.dryRun){o({command:`cf network-interconnects interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.networkInterconnects.interconnects.list({account_id:u,...i})),{successLabel:`Loaded`})}};function j(e){return e.positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`loa <icon>`,describe:`Generate the Letter of Authorization (LOA) for a given interconnect`,builder:j,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects interconnects loa`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects/${r.icon==null?`<icon>`:encodeURIComponent(String(r.icon))}/loa`,pathParams:{icon:String(r.icon??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.interconnects.loa({account_id:c,icon:r.icon})),{successLabel:`Loaded`})}};function N(e){return e.positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`status <icon>`,describe:`Get the current status of an interconnect object`,builder:N,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects interconnects status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/interconnects/${r.icon==null?`<icon>`:encodeURIComponent(String(r.icon))}/status`,pathParams:{icon:String(r.icon??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.interconnects.status({account_id:c,icon:r.icon})),{successLabel:`Loaded`})}},F={command:`interconnects`,describe:`Physical cross-connect and partner interconnect sessions with LOA and status tracking`,builder:e=>e.command(w).command(E).command(O).command(A).command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`Get the current settings for the active account`,builder:I,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.settings.get({account_id:c})),{successLabel:`Loaded`})}};function R(e){return e.option(`default-asn`,{type:`number`,description:`The default_asn 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 z={command:`update`,describe:`Update the current settings for the active account`,builder:R,handler:async c=>{if(c.dryRun){o({command:`cf network-interconnects settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`json`,body:c.body===void 0?i({default_asn:c[`default-asn`]}):r(c.body)});return}let u=await n(c),d=c.local?l:await e();if(c.accountId=d,c.body){let e=r(c.body);a(await s(`Updating`,async()=>u.networkInterconnects.settings.update({...e,account_id:d})),{successLabel:`Updated`});return}let f=i({default_asn:c[`default-asn`]});a(await s(`Updating`,async()=>u.networkInterconnects.settings.update({...f,account_id:d})),{successLabel:`Updated`})}},B={command:`settings`,describe:`Account-level interconnect settings and default configurations`,builder:e=>e.command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.positional(`slot`,{type:`string`,description:`Slot`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <slot>`,describe:`Get information about the specified slot`,builder:V,handler:async r=>{if(r.dryRun){o({command:`cf network-interconnects slots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/slots/${r.slot==null?`<slot>`:encodeURIComponent(String(r.slot))}`,pathParams:{slot:String(r.slot??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.networkInterconnects.slots.get({account_id:c,slot:r.slot})),{successLabel:`Loaded`})}};function U(e){return e.option(`address-contains`,{type:`string`,description:`If specified, only show slots with the given text in their address field`}).option(`site`,{type:`string`,description:`If specified, only show slots located at the given site`}).option(`speed`,{type:`string`,description:`If specified, only show slots that support the given speed`}).option(`occupied`,{type:`boolean`,description:`If specified, only show slots with a specific occupied/unoccupied state`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`Retrieve a list of all slots matching the specified parameters`,builder:U,handler:async r=>{let i={address_contains:r[`address-contains`],site:r.site,speed:r.speed,occupied:r.occupied,cursor:r.cursor,limit:r.limit};if(r.dryRun){o({command:`cf network-interconnects slots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/cni/slots`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.networkInterconnects.slots.list({account_id:u,...i})),{successLabel:`Loaded`})}},G={command:`slots`,describe:`Available interconnect facility slots showing port capacity at Cloudflare data centers`,builder:e=>e.command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`network-interconnects`,describe:`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,builder:e=>e.command(S).command(F).command(B).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|
package/dist/oauth-B5k80sip.mjs
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{i as e,o as t,r as n,t as r}from"./chunk-DH-VkVmc.mjs";import{_ as i,a,b as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,m,o as h,p as g,s as _,t as v,u as y,v as b,x,y as S}from"./session-B8r8LNQN.mjs";import{$ as C,A as w,I as ee,M as te,P as ne,S as re,W as T,_ as E,a as ie,et as ae,j as oe,s as se,v as ce}from"./dist-C6zxsVdY.mjs";import{i as le,n as ue,r as D}from"./config-B5k-XbwS.mjs";import{n as de,t as O}from"./resolve-DGD57PFH.mjs";import{i as fe,o as pe,s as me}from"./dist-B7hsuvbF.mjs";import{chmodSync as he,existsSync as k,mkdirSync as A,readFileSync as ge,readdirSync as _e,rmSync as ve,unlinkSync as ye,writeFileSync as be}from"node:fs";import xe from"node:os";import j,{dirname as Se,join as M}from"node:path";import{styleText as Ce}from"node:util";import{URLSearchParams as we}from"node:url";import N,{stdin as Te,stdout as Ee}from"node:process";import De from"node:tty";import Oe from"node:readline";const P=`.cfrc`;function ke(e){let t=e||process.cwd(),n=Se(t);for(;t!==n;){let e=M(t,P);if(k(e))try{let t=ge(e,`utf-8`).replace(/^\s*\/\/.*$/gm,``);return{config:JSON.parse(t),path:e}}catch{}t=Se(t)}let r=M(t,P);if(k(r))try{let e=ge(r,`utf-8`).replace(/^\s*\/\/.*$/gm,``);return{config:JSON.parse(e),path:r}}catch{}return null}function Ae(e,t){be(M(t||process.cwd(),P),JSON.stringify(e,null,2)+`
|
|
3
|
-
`,{mode:384})}function je(e){let t=M(e||process.cwd(),P);return k(t)?(ye(t),!0):!1}async function Me(e){let t={},n=F(`accountId`,`CLOUDFLARE_ACCOUNT_ID`);n&&(t.accountId=n);let r=F(`zone`,`CLOUDFLARE_ZONE_ID`,e?.zone);r&&(t.zone=r);let i=F(`complianceRegion`,`CLOUDFLARE_COMPLIANCE_REGION`);return i&&(t.complianceRegion=i),t}function F(e,t,n){if(n)return{value:n,source:`flag`};let r=process.env[t];if(r)return{value:r,source:`env`};let i=ke(),a=i?.config[e];if(a)return{value:a,source:`project`,path:i.path};let o=D().defaults?.[e];if(o)return{value:o,source:`config`,path:ue()}}function Ne(){return F(`accountId`,`CLOUDFLARE_ACCOUNT_ID`)?.value}async function Pe(){let e=F(`accountId`,`CLOUDFLARE_ACCOUNT_ID`);e&&Fe(e.value,We(e,`accountId`));let{getOrSelectAccountId:t}=await Promise.resolve().then(()=>mi);return t(e?.value)}function Fe(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function Ie(e,t,n){if(e?.zoneId)return Le(e.zoneId,t);let r=F(`zone`,`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=We(r);console.error(`Using zone: ${r.value} (from ${e})`)}return Le(r.value,t)}throw Error(`No zone specified.
|
|
4
|
-
|
|
5
|
-
Please provide one of the following:
|
|
6
|
-
1. Zone as a positional argument: cf dns records list <zone>
|
|
7
|
-
2. --zone flag (or -z): cf dns records list --zone example.com
|
|
8
|
-
3. CLOUDFLARE_ZONE_ID environment variable
|
|
9
|
-
4. Run 'cf context set zone <zone>' to set a default
|
|
10
|
-
5. Create a .cfrc file in your project with {"zone": "example.com"}`)}async function Le(e,t){if(O(e)||!t)return e;let{resolveZoneId:n}=await import(`./resolve-DGD57PFH.mjs`).then(e=>e.r);return n(t,await Pe(),e)}function Re(e){if(e?.scriptName)return e.scriptName;throw Error("Required Worker name missing. Please specify the Worker name with `--worker <name>`.")}const ze=[`public`,`fedramp_high`],Be={"account-id":`accountId`,zone:`zone`,"compliance-region":`complianceRegion`},Ve=Object.keys(Be);function He(e){return ze.includes(e)}function Ue(){let e=F(`complianceRegion`,`CLOUDFLARE_COMPLIANCE_REGION`);if(!e)return`public`;if(!He(e.value))throw Error(`Invalid compliance region "${e.value}". Must be one of: ${ze.join(`, `)}`);return e.value}function We(e,t=`zone`){switch(e.source){case`flag`:return t===`zone`?`--zone flag`:`(flag)`;case`env`:return{accountId:`CLOUDFLARE_ACCOUNT_ID`,zone:`CLOUDFLARE_ZONE_ID`,complianceRegion:`CLOUDFLARE_COMPLIANCE_REGION`}[t];case`project`:return`.cfrc`;case`config`:return`~/.config/cf/config.json`}}async function Ge(e,t,n,r){let i=t,a=t;if(e===`accountId`){if(!r)throw Error(`Authentication required to validate account ID`);let{id:e,name:n}=await Je(t,r);i=e,a=n?`${e.slice(0,12)}... (${n})`:e}else if(e===`zone`){if(!r)throw Error(`Authentication required to validate zone`);let e=await Ye(t,r);i=t,a=e.name}else e===`complianceRegion`&&(i=t,a=t);if(n===`project`){let t=ke()?.config||{};t[e]=i,Ae(t)}else{let t=D();t.defaults||={},t.defaults[e]=i,le(t)}return{resolvedValue:i,displayName:a}}function Ke(e,t){if(t===`project`)if(e===`all`)je();else{let t=ke();t&&(delete t.config[e],Object.keys(t.config).length===0?je(Se(t.path)):Ae(t.config,Se(t.path)))}else{let t=D();t.defaults&&(e===`all`?delete t.defaults:(delete t.defaults[e],Object.keys(t.defaults).length===0&&delete t.defaults),le(t))}}async function qe(e){return(await e.accounts.list({})).result}async function Je(e,t){let n=await qe(t),r=n.find(t=>t.id===e);if(r)return{id:r.id,name:r.name};let i=n.find(t=>t.name.toLowerCase()===e.toLowerCase());if(i)return{id:i.id,name:i.name};if(O(e))return{id:e};throw Error(`Account not found: "${e}"
|
|
11
|
-
|
|
12
|
-
Available accounts:
|
|
13
|
-
${n.map(e=>` ${e.id.slice(0,12)}... ${e.name}`).join(`
|
|
14
|
-
`)}`)}async function Ye(e,t){let n=(await t.zones.list({})).result,r=n.find(t=>t.id===e);if(r)return{id:r.id,name:r.name};let i=n.find(t=>t.name.toLowerCase()===e.toLowerCase());if(i)return{id:i.id,name:i.name};throw de(e)?Error(`Zone not found: "${e}"
|
|
15
|
-
|
|
16
|
-
This zone either doesn't exist or you don't have access to it.
|
|
17
|
-
Run 'cf zones list' to see available zones.`):Error(`Invalid zone: "${e}"
|
|
18
|
-
|
|
19
|
-
Please provide a zone ID or domain name.
|
|
20
|
-
Run 'cf zones list' to see available zones.`)}function Xe(){return M(process.cwd(),P)}const Ze=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,Qe=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,$e=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,tt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,nt=/\t{1,1000}/y,rt=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,it=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,at=/\p{M}+/gu,ot={limit:1/0,ellipsis:``},st=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?st(i,ot,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(at,``)){let t=e.codePointAt(0)||0;if(w=Qe(t)?d:$e(t)?p:l!==f&&Ze(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(it.lastIndex=h,it.test(e)){if(_=it.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=it.lastIndex;continue}if(et.lastIndex=h,et.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=et.lastIndex;continue}if(tt.lastIndex=h,tt.test(e)){if(_=tt.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=tt.lastIndex;continue}if(nt.lastIndex=h,nt.test(e)){if(_=nt.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=nt.lastIndex;continue}if(rt.lastIndex=h,rt.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=rt.lastIndex;continue}h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},ct={limit:1/0,ellipsis:``,ellipsisWidth:0},I=(e,t={})=>st(e,ct,t).width,lt=`]8;;`,ut=RegExp(`(?:\\[(?<code>\\d+)m|\\${lt}(?<uri>.*))`,`y`),dt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ft=e=>`[${e}m`,pt=e=>`${lt}${e}`,mt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:I(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=I(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(lt,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},ht=e=>{let t=e.split(` `),n=t.length;for(;n&&!I(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},gt=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=I(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=I(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),mt(s,r,t),c=I(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){mt(s,r,t),c=I(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){mt(s,r,t),c=I(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>ht(e)));let l=s.join(`
|
|
21
|
-
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===``){ut.lastIndex=e+1;let t=ut.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
22
|
-
`){a&&(r+=pt(``));let e=i?dt(i):void 0;i&&e&&(r+=ft(e))}else t===`
|
|
23
|
-
`&&(i&&dt(i)&&(r+=ft(i)),a&&(r+=pt(a)))}return r},_t=/\r?\n/;function vt(e,t,n){return String(e).normalize().split(_t).map(e=>gt(e,t,n)).join(`
|
|
24
|
-
`)}var L=me();function R(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a].disabled?R(a,t<0?-1:1,n):a}const yt={actions:new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,date:{monthNames:[...[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function bt(e,t){if(typeof e==`string`)return yt.aliases.get(e)===t;for(let n of e)if(n!==void 0&&bt(n,t))return!0;return!1}function xt(e,t){if(e===t)return;let n=e.split(`
|
|
25
|
-
`),r=t.split(`
|
|
26
|
-
`),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}globalThis.process.platform.startsWith(`win`);const St=Symbol(`clack:cancel`);function Ct(e){return e===St}function wt(e,t){let n=e;n.isTTY&&n.setRawMode(t)}const Tt=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;let z=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=Te,output:r=Ee,render:i,signal:a,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=a,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(St);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=Oe.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),wt(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(L.cursor.show),this.output.off(`resize`,this.render),wt(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(L.cursor.show),this.output.off(`resize`,this.render),wt(this.input,!1),e(St)})})}_isActionKey(e,t){return e===` `}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}onKeypress(e,t){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&yt.aliases.has(t.name)&&this.emit(`cursor`,yt.aliases.get(t.name)),yt.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e?.toLowerCase(),t),t?.name===`return`){if(this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}bt([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
|
|
27
|
-
`),wt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=vt(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
28
|
-
`).length-1;this.output.write(L.cursor.move(-999,e*-1))}render(){let e=vt(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(L.cursor.hide);else{let t=xt(this._prevFrame,e),n=Tt(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(L.cursor.move(0,a-i)),this.output.write(L.erase.lines(1));let t=e.split(`
|
|
29
|
-
`);this.output.write(t[a]),this._prevFrame=e,this.output.write(L.cursor.move(0,t.length-a-1));return}else if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(L.cursor.move(0,e))}this.output.write(L.erase.down());let t=e.split(`
|
|
30
|
-
`).slice(a);this.output.write(t.join(`
|
|
31
|
-
`)),this._prevFrame=e;return}}this.output.write(L.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};var Et=class extends z{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(L.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let Dt=class extends z{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(e=>e.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(t=>!e.includes(t.value));this.value=t.map(e=>e.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(e=>e!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0);this.cursor=this.options[t].disabled?R(t,1,this.options):t,this.on(`key`,e=>{e===`a`&&this.toggleAll(),e===`i`&&this.toggleInvert()}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=R(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=R(this.cursor,1,this.options);break;case`space`:this.toggleValue();break}})}};var Ot=class extends z{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n].disabled?R(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=R(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=R(this.cursor,1,this.options);break}this.changeValue()})}},kt=class extends z{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),[n,...r]=e.slice(this.cursor);return`${t}${Ce(`inverse`,n)}${r.join(``)}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}};function At(e){function t(){return j.resolve(e(),`preferences.json`)}i(t,`getUserPreferencesPath`);function n(){try{let e=ge(t(),`utf8`),n=JSON.parse(e);return typeof n==`object`&&n?n:{}}catch{return{}}}i(n,`readUserPreferences`);function r(e){let r={...n(),...e},i=t();A(j.dirname(i),{recursive:!0}),be(i,JSON.stringify(r,null,` `),{encoding:`utf-8`})}return i(r,`updateUserPreferences`),{readUserPreferences:n,updateUserPreferences:r}}i(At,`createPreferences`);var jt=6e4,Mt=525600,Nt=43200,Pt=1440,Ft=Symbol.for(`constructDateFrom`);function It(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Ft in e?e[Ft](t):e instanceof Date?new e.constructor(t):new Date(t)}i(It,`constructFrom`);function Lt(e,t){return It(t||e,e)}i(Lt,`toDate`);var Rt={};function zt(){return Rt}i(zt,`getDefaultOptions`);function Bt(e){let t=Lt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}i(Bt,`getTimezoneOffsetInMilliseconds`);function Vt(e,...t){let n=It.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}i(Vt,`normalizeDates`);function Ht(e,t){let n=Lt(e)-+Lt(t);return n<0?-1:n>0?1:n}i(Ht,`compareAsc`);function Ut(e){return It(e,Date.now())}i(Ut,`constructNow`);function Wt(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}i(Wt,`getRoundingMethod`);var Gt={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},Kt=i((e,t,n)=>{let r,i=Gt[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},`formatDistance`);function qt(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}i(qt,`buildFormatLongFn`);var Jt={date:qt({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:qt({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:qt({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},Yt={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},Xt=i((e,t,n,r)=>Yt[e],`formatRelative`);function B(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}i(B,`buildLocalizeFn`);var Zt={ordinalNumber:i((e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},`ordinalNumber`),era:B({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:B({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:i(e=>e-1,`argumentCallback`)}),month:B({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:B({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:B({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function V(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?$t(s,e=>e.test(o)):Qt(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}i(V,`buildMatchFn`);function Qt(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}i(Qt,`findKey`);function $t(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}i($t,`findIndex`);function en(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}i(en,`buildMatchPatternFn`);var tn={code:`en-US`,formatDistance:Kt,formatLong:Jt,formatRelative:Xt,localize:Zt,match:{ordinalNumber:en({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:i(e=>parseInt(e,10),`valueCallback`)}),era:V({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:V({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:i(e=>e+1,`valueCallback`)}),month:V({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:V({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:V({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function nn(e,t,n){let r=zt(),i=n?.locale??r.locale??tn,a=Ht(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=Vt(n?.in,...a>0?[t,e]:[e,t]),l=Wt(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/jt,f=(u-(Bt(c)-Bt(s)))/jt,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<Pt?`hour`:f<Nt?`day`:f<Mt?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}else if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}else if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}else if(m===`day`){let e=l(f/Pt);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/Nt);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/Mt);return i.formatDistance(`xYears`,e,o)}}i(nn,`formatDistanceStrict`);function rn(e,t){return nn(e,Ut(e),t)}i(rn,`formatDistanceToNowStrict`);function H(e,t){return{read:i(()=>{let n=t();if(!k(n))return;let r=C(n);try{return g(e,r)}catch{return}},`read`),write(n){let r=t();A(j.dirname(r),{recursive:!0}),be(r,d(e,n),{encoding:`utf-8`,mode:384}),he(r,384)},clear(){let e=t(),n=k(e);return ve(e,{force:!0}),n},path:t}}i(H,`createFileStorage`);function an(e){let{logger:t,prompt:n}=e;return i(async function(e,r){if(te())return t.log(r),!0;let i=await n(e);return typeof i==`string`&&i.trim().toLowerCase()===`yes`},`ensureTemporaryTermsAccepted`)}i(an,`createTemporaryTermsPrompt`);var on=[9106,1e4];function sn(e){return e?.code}i(sn,`getErrorCode`);function cn(e){let t=sn(e);return t!==void 0&&on.includes(t)}i(cn,`isMembershipsInaccessible`);function ln(e){return{"no-credentials-non-interactive":`Could not authenticate because no credentials were found and the environment is non-interactive. Set a CLOUDFLARE_API_TOKEN environment variable or run \`${e}\` in an interactive terminal first.`,"no-credentials-login-failed":`No credentials were found and the login attempt was unsuccessful. Run \`${e}\` to try again.`,"token-expired-non-interactive":`Your auth token has expired and could not be refreshed, and the environment is non-interactive. Run \`${e}\` in an interactive terminal or set a CLOUDFLARE_API_TOKEN.`,"token-expired-login-failed":`Your auth token has expired and could not be refreshed, and the login attempt was unsuccessful. Run \`${e}\` to try again.`}}i(ln,`notLoggedInErrorBodies`);function un(e,t,n){let r=new Date(t.claim.expiresAt);e.log(_`
|
|
32
|
-
Temporary account ready:
|
|
33
|
-
Account: ${t.account.name} (${n?`reused`:`created`})
|
|
34
|
-
Claim within: ${rn(r)}
|
|
35
|
-
Claim URL: ${t.claim.url}
|
|
36
|
-
`)}i(un,`logTemporaryPreviewAccount`);function dn(e,t){let{logger:n}=t,r=e.cliName,o=ln(e.commands.login),s=`
|
|
37
|
-
Run \`${e.commands.whoami}\` to check your current authentication status.`,c=At(e.getConfigPath),l=ie(n,e.cacheNamespace?{namespace:e.cacheNamespace}:void 0),u=f({serviceName:e.keyringServiceName,getConfigPath:e.getConfigPath,isKeyringEnabled:i(()=>c.readUserPreferences().keyring_enabled===!0,`isKeyringEnabled`),logger:n,isNonInteractiveOrCI:te,loginCommand:e.commands.login,format:e.fileFormat}),d=e.allowGlobalAuthKey??!0,m=a({logger:n,isNonInteractiveOrCI:te,openInBrowser:i(e=>ne(e,n),`openInBrowser`),hasEnvCredentials:i(()=>p({allowGlobalAuthKey:d})!==void 0,`hasEnvCredentials`),purgeOnLoginOrLogout:l.purgeConfigCaches,clientId:e.clientId,consent:e.consent,redirectUri:e.redirectUri,storageFactory:u.storageFactory,allowGlobalAuthKey:d,temporary:{storage:H(e.fileFormat,e.getTemporaryAccountConfigPath),prompt:an({logger:n,prompt:t.prompt})}});function h(e){m.setProfile(e)}i(h,`setProfile`);function g(){return m.getActiveProfile()}i(g,`getActiveProfile`);function _(){return u.getActiveStore(m.getActiveProfile())}i(_,`getCredentialStore`);function v(e){m.setTemporaryAllowed(e)}i(v,`setTemporaryAllowed`);function b(){return m.getAPIToken()}i(b,`getAPIToken`);function x(){return m.requireApiToken()}i(x,`requireApiToken`);function S(t,n){return{complianceConfig:t,scopes:n?.scopes??e.getDefaultScopeKeys(),browser:n?.browser??!0,callbackHost:n?.callbackHost,callbackPort:n?.callbackPort,profile:n?.profile}}i(S,`withDefaultScopes`);async function C(e,t){return m.login(S(e,t))}i(C,`login`);async function re(e){return m.logout(e)}i(re,`logout`);async function E(e,t){return m.getActiveTemporaryAccount()?{loggedIn:!0}:m.loginOrRefreshIfRequired(S(e,t))}i(E,`loginOrRefreshIfRequired`);async function ae(){return m.getOAuthTokenFromLocalState()}i(ae,`getOAuthTokenFromLocalState`);function le(){return m.getScopes()}i(le,`getScopes`);function ue(){return u.storageFactory(g()).read()}i(ue,`readAuthCredentials`);function D(e){u.storageFactory(g()).write(e)}i(D,`writeAuthCredentials`);function de(){let t=m.getActiveProfile();return t===`default`?`${e.accountCachePrefix}.json`:`${e.accountCachePrefix}-${t}.json`}i(de,`getAccountCacheFileName`);function O(e){l.saveToConfigCache(de(),{account:e})}i(O,`saveAccountToCache`);function fe(){return l.getConfigCache(de()).account}i(fe,`getAccountFromCache`);async function pe(e,r){let i=await E(e);if(!i.loggedIn)throw new T(`Not logged in. ${o[i.reason]}${s}`,{telemetryMessage:`cfetch auth login required`});let a=x(),c=[],l=!0,u=1,d;for(;l;){d=new we(d),d.set(`page`,String(u));let{response:i,status:o}=await se(e,r,{},t.userAgent,n,d,void 0,a);i.success?(c.push(...i.result),w(i.result_info)?u+=1:l=!1):ee(r,i,o)}return c}i(pe,`fetchAccountsPaged`);async function me(t,n={}){let{throwOnEmpty:r=!0}=n,[i,a]=await Promise.allSettled([pe(t,`/accounts`),pe(t,`/memberships`)]);if(i.status===`rejected`)throw i.reason;if(a.status===`rejected`)if(cn(a.reason)){if(i.status===`fulfilled`&&i.value.length>0)return i.value;throw sn(a.reason)===9106?new T(`Failed to automatically retrieve account IDs for the logged in user.
|
|
38
|
-
You may have incorrect permissions on your API token, or an environment variable such as CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_KEY, or CLOUDFLARE_EMAIL may be set to an invalid value.
|
|
39
|
-
Check your environment and unset or correct any Cloudflare credential variables, or run \`${e.commands.login}\` to re-authenticate.
|
|
40
|
-
You can also skip this account check by adding an \`account_id\` in your ${e.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`}):new T(`Failed to automatically retrieve account IDs for the logged in user.
|
|
41
|
-
You may have incorrect permissions on your API token, or your authentication may have expired. Try running \`${e.commands.login}\` to re-authenticate. You can also skip this account check by adding an \`account_id\` in your ${e.getConfigFileLabel()} file, or by setting the value of CLOUDFLARE_ACCOUNT_ID`,{telemetryMessage:`user account fetch permission denied`})}else throw a.reason;let o=new Set(a.value.map(e=>e.account.id)),s=i.value.filter(e=>o.has(e.id));if(s.length===0&&r)throw new T(`Failed to automatically retrieve account IDs for the logged in user.
|
|
42
|
-
In a non-interactive environment, it is mandatory to specify an account ID, either by assigning its value to CLOUDFLARE_ACCOUNT_ID, or as \`account_id\` in your ${e.getConfigFileLabel()} file.
|
|
43
|
-
Alternatively, try running \`${e.commands.login}\` to re-authenticate.`,{telemetryMessage:`user account fetch empty`});return s}i(me,`fetchAllAccounts`);function he(e){let t=m.getActiveTemporaryAccount();return t?t.account.id:e.account_id?e.account_id:y()||fe()?.id}i(he,`getActiveAccountId`);async function k(n){let r=he(n);if(r)return r;let i=await me(n);if(i.length===1)return O({id:i[0].id,name:i[0].name}),i[0].id;try{let e=await t.select(`Select an account`,{choices:i.map(e=>({title:e.name,value:e.id}))}),n=i.find(t=>t.id===e);if(!n)throw Error(`Selected account not found in accounts list`);return O({id:n.id,name:n.name}),e}catch(n){if(t.isNoDefaultValueProvidedError(n)){let t=oe();throw new T(`More than one account available but unable to select one in non-interactive mode.
|
|
44
|
-
Please set the appropriate \`account_id\` in your ${e.getConfigFileLabel()} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
|
|
45
|
-
Available accounts are (\`<name>\`: \`<account_id>\`):
|
|
46
|
-
${i.map(e=>` \`${t?`(redacted)`:e.name}\`: \`${e.id}\``).join(`
|
|
47
|
-
`)}`,{telemetryMessage:`user account selection unavailable`})}throw n}}i(k,`getOrSelectAccountId`);async function A(e){if(m.isTemporaryAllowed()){if(ce(e)!==`public`)throw new T(`Temporary accounts aren't available when the compliance region is not set to public.`,{telemetryMessage:`user temporary account unavailable in compliance region`});if(b())throw new T("You're already authenticated with Cloudflare, so `--temporary` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove `--temporary` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.",{telemetryMessage:`user temporary account already authenticated`});let{account:t,cached:r}=await m.activateTemporaryAccount();return un(n,t,r),t.account.id}let t=await E(e);if(!t.loggedIn)throw t.reason===`no-credentials-non-interactive`||t.reason===`token-expired-non-interactive`?new T(`In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for ${r} to work. Please go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ for instructions on how to create an api token, and assign its value to CLOUDFLARE_API_TOKEN.`,{telemetryMessage:`user auth missing api token non interactive`}):new T(`Did not login, quitting...`,{telemetryMessage:`user login cancelled`});let i=await k(e);if(!i)throw new T(`No account id found, quitting...`,{telemetryMessage:`user auth missing account id`});return i}return i(A,`requireAuth`),{setProfile:h,getActiveProfile:g,getCredentialStore:_,setTemporaryAllowed:v,getAPIToken:b,requireApiToken:x,login:C,logout:re,loginOrRefreshIfRequired:E,getOAuthTokenFromLocalState:ae,getScopes:le,readAuthCredentials:ue,writeAuthCredentials:D,getActiveAccountId:he,getOrSelectAccountId:k,getAccountFromCache:fe,fetchAllAccounts:me,requireAuth:A}}i(dn,`createCloudflareAuth`);var fn=`profiles/directory-bindings.json`,pn=`.enc`;function mn(e){let{logger:t,getConfigPath:n,keyringServiceName:r,format:a}=e,o=`.${a}`;function c(e){return s(n(),e,a)}i(c,`plaintextPath`);function u(e){return l(n(),e)}i(u,`encryptedPath`);function d(){return j.dirname(c(`default`))}i(d,`getProfileConfigDirectory`);let f={exists(e){return k(c(e))||k(u(e))},list(){let e=d();if(!k(e))return[];let t=new Set;for(let n of _e(e))n.endsWith(o)?t.add(n.slice(0,-o.length)):n.endsWith(pn)&&t.add(n.slice(0,-pn.length));return[...t]},delete(e){let{backendAvailable:i,encryptedFileExisted:o}=m({serviceName:r,configPath:n(),profile:e,format:a});H(a,()=>c(e)).clear(),o&&!i&&t.warn(`Removed the credential files for profile "${e}", but the keyring backend was not reachable on this host so its keyring entry could not be cleared. Clear it manually if it persists.`)}};function p(){return j.join(n(),fn)}return i(p,`getDirectoryBindingsPath`),h({configs:f,bindings:{read(){try{let e=ge(p(),`utf-8`);return JSON.parse(e)}catch{return{}}},write(e){let t=p();A(j.dirname(t),{recursive:!0}),be(t,JSON.stringify(e,null,` `),`utf-8`)}}})}i(mn,`createCloudflareProfileStore`);function hn(e){let{loginCommand:t,createProfileCommand:n,keyringServiceName:r,getConfigPath:a,format:o,preferences:s}=e,{readUserPreferences:d,updateUserPreferences:f}=s;function p(e){return e??`default`}i(p,`describeProfile`);function h(e){let t=[];k(l(a()))&&t.push(void 0);let n=mn({logger:e,getConfigPath:a,keyringServiceName:r,format:o});for(let e of n.configs.list()){try{u(e)}catch{continue}k(l(a(),e))&&t.push(e)}return t}i(h,`listEncryptedProfiles`);function g(e){let i=h(e);if(i.length===0)return;let s=[],c=[];for(let t of i)try{let{backendAvailable:e}=m({serviceName:r,configPath:a(),profile:t,format:o});s.push(p(t)),e||c.push(p(t))}catch(n){e.warn(`Failed to remove encrypted credentials for profile "${p(t)}": ${n instanceof Error?n.message:String(n)}. You may need to clear them manually.`)}if(s.length>0){let r=n?`Re-authenticate with \`${t}\` (default profile) or \`${n} <name>\` (named profiles).`:`Re-authenticate with \`${t}\`.`;e.log(`Removed encrypted credentials for ${s.map(e=>`"${e}"`).join(`, `)}. ${r}`)}c.length>0&&e.warn(`The keyring backend was not reachable on this host, so the keyring entry for ${c.map(e=>`"${e}"`).join(`, `)} could not be cleared. Clear it manually if it persists.`)}i(g,`scrubAllEncryptedProfiles`);function _(e,t){let{logger:n,getCredentialStore:r}=t,i=d().keyring_enabled===!0,a=c();if(a!==void 0&&a!==e&&n.warn(`CLOUDFLARE_AUTH_USE_KEYRING=${a} overrides ${e?`enabling`:`disabling`} keyring storage for this command.`),!e&&a!==!0&&g(n),f({keyring_enabled:e}),e&&a!==!1)try{r().kind!==`encrypted-file`&&(f({keyring_enabled:i}),n.warn(`Keyring storage isn't available on this host (see warning above), so it was not enabled. Try again once the keyring backend is reachable.`))}catch(e){throw f({keyring_enabled:i}),e}return{enabled:d().keyring_enabled===!0}}return i(_,`setKeyringPreference`),{setKeyringPreference:_}}i(hn,`createKeyringPreference`);function gn(e){let{getConfigPath:t,format:n}=e;function r(e){return s(t(),e,n)}i(r,`getAuthConfigFilePath`);function a(e){return l(t(),e)}i(a,`getEncryptedAuthConfigFilePath`);function o(e){return H(n,()=>r(e))}i(o,`defaultAuthConfigStorage`);function c(e,t){o(t).write(e)}i(c,`writeAuthConfigFile`);function u(e){return o(e).read()}return i(u,`readAuthConfigFile`),{getAuthConfigFilePath:r,getEncryptedAuthConfigFilePath:a,defaultAuthConfigStorage:o,readAuthConfigFile:u,writeAuthConfigFile:c}}i(gn,`createAuthConfigFileHelpers`);var _n=`cloudflare`,vn=`cf`,yn=`http://localhost:8877/oauth/callback`,bn={granted:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-granted`},denied:{url:`https://welcome.developers.workers.dev/cf-oauth-consent-denied`,error:"Error: Consent denied. You must grant consent to cf in order to login.\nIf you don't want to do this consider passing an API token via the `CLOUDFLARE_API_TOKEN` environment variable"}},xn=re({variableName:`CLOUDFLARE_CLIENT_ID`,defaultValue:i(()=>`cbca97e7-c331-4cdd-8fd8-e25a451b98bf`,`defaultValue`)});function U(){return ae({appName:`cloudflare`,leadingDot:!1,useLegacyHomeDir:!1})}i(U,`getCfConfigPath`);var Sn=`openid.offline.user:read.account:read.access:read.access:write.agw:read.agw:run.agw:write.ai:read.ai:write.ai-search:read.ai-search:run.ai-search:write.aiaudit:read.aiaudit:write.aig:read.aig:write.auditlogs:read.browser:read.browser:write.cfone:read.cfone:write.cloudchamber:write.connectivity:admin.connectivity:bind.connectivity:read.constellation:write.containers:write.d1:write.dex:read.dex:write.dns_analytics:read.dns_records:edit.dns_records:read.dns_settings:read.firstpartytags:write.images:read.images:write.lb:edit.lb:read.logpush:read.logpush:write.mcp_portals:read.mcp_portals:write.notebook-examples:read.notification:read.notification:write.pages:read.pages:write.pipelines:read.pipelines:setup.pipelines:write.query_cache:write.queues:write.r2_catalog:write.radar:read.rag:read.rag:write.registrar:read.registrar:write.secrets_store:read.secrets_store:write.sso-connector:read.sso-connector:write.ssl_certs:write.teams:pii.teams:read.teams:secure_location.teams:write.url_scanner:read.url_scanner:write.vectorize:write.workers:read.workers:write.workers_builds:read.workers_builds:write.workers_deployments:read.workers_kv:write.workers_observability:read.workers_observability:write.workers_observability_telemetry:write.workers_routes:write.workers_scripts:write.workers_tail:read.zone:read`.split(`.`),Cn=[...Sn];function wn(e){Cn=e}i(wn,`setLoginScopeKeys`);var Tn=new Set(Sn);function En(e){return e.every(e=>Tn.has(e))}i(En,`validateScopeKeys`);function Dn(){let e=E();return e===`production`?`cloudflare-temporary-account.json`:`cloudflare-temporary-account.${e}.json`}i(Dn,`getTemporaryAccountConfigFile`);function On(){return j.join(U(),Dn())}i(On,`getCfTemporaryAccountConfigPath`);function kn(e){return H(`json`,e)}i(kn,`createJsonFileStorage`);var{getAuthConfigFilePath:An,getEncryptedAuthConfigFilePath:jn,defaultAuthConfigStorage:Mn,readAuthConfigFile:Nn,writeAuthConfigFile:Pn}=gn({getConfigPath:U,format:`json`}),Fn={cliName:vn,commands:{login:`cf auth login`,whoami:`cf auth whoami`},keyringServiceName:_n,clientId:xn,consent:bn,redirectUri:yn,allowGlobalAuthKey:!1,getConfigPath:U,getTemporaryAccountConfigPath:On,fileFormat:`json`,accountCachePrefix:`cloudflare-account`,cacheNamespace:`cloudflare`,getConfigFileLabel:i(()=>`cf config`,`getConfigFileLabel`),getDefaultScopeKeys:i(()=>Cn,`getDefaultScopeKeys`)},In=At(U),{readUserPreferences:Ln,updateUserPreferences:Rn}=In;function zn(e){return dn(Fn,e)}i(zn,`createCfAuth`);function Bn(e){return mn({logger:e.logger,getConfigPath:U,keyringServiceName:_n,format:`json`})}i(Bn,`createCfProfileStore`);var Vn=hn({loginCommand:Fn.commands.login,createProfileCommand:Fn.commands.createProfile,keyringServiceName:_n,getConfigPath:U,format:`json`,preferences:In});function Hn(e,t){return Vn.setKeyringPreference(e,t)}i(Hn,`setKeyringPreference`);const Un=(e=0)=>t=>`\u001B[${t+e}m`,Wn=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,Gn=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,W={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(W.modifier);const Kn=Object.keys(W.color),qn=Object.keys(W.bgColor);[...Kn,...qn];function Jn(){let e=new Map;for(let[t,n]of Object.entries(W)){for(let[t,r]of Object.entries(n))W[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=W[t],e.set(r[0],r[1]);Object.defineProperty(W,t,{value:n,enumerable:!1})}return Object.defineProperty(W,`codes`,{value:e,enumerable:!1}),W.color.close=`\x1B[39m`,W.bgColor.close=`\x1B[49m`,W.color.ansi=Un(),W.color.ansi256=Wn(),W.color.ansi16m=Gn(),W.bgColor.ansi=Un(10),W.bgColor.ansi256=Wn(10),W.bgColor.ansi16m=Gn(10),Object.defineProperties(W,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>W.rgbToAnsi256(...W.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>W.ansi256ToAnsi(W.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>W.ansi256ToAnsi(W.hexToAnsi256(e)),enumerable:!1}}),W}const G=Jn();function K(e,t=globalThis.Deno?globalThis.Deno.args:N.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:q}=N;let Yn;K(`no-color`)||K(`no-colors`)||K(`color=false`)||K(`color=never`)?Yn=0:(K(`color`)||K(`colors`)||K(`color=true`)||K(`color=always`))&&(Yn=1);function Xn(){if(`FORCE_COLOR`in q)return q.FORCE_COLOR===`true`?1:q.FORCE_COLOR===`false`?0:q.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(q.FORCE_COLOR,10),3)}function Zn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Qn(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=Xn();r!==void 0&&(Yn=r);let i=n?Yn:r;if(i===0)return 0;if(n){if(K(`color=16m`)||K(`color=full`)||K(`color=truecolor`))return 3;if(K(`color=256`))return 2}if(`TF_BUILD`in q&&`AGENT_NAME`in q)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(q.TERM===`dumb`)return a;if(N.platform===`win32`){let e=xe.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in q)return`GITHUB_ACTIONS`in q||`GITEA_ACTIONS`in q?3:[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in q)||q.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in q)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(q.TEAMCITY_VERSION);if(q.COLORTERM===`truecolor`||q.TERM===`xterm-kitty`)return 3;if(`TERM_PROGRAM`in q){let e=Number.parseInt((q.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(q.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(q.TERM)||`COLORTERM`in q?1:a}function $n(e,t={}){return Zn(Qn(e,{streamIsTTY:e&&e.isTTY,...t}))}const er={stdout:$n({isTTY:De.isatty(1)}),stderr:$n({isTTY:De.isatty(2)})};function tr(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function nr(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
|
|
48
|
-
`:`
|
|
49
|
-
`)+n,i=r+1,r=e.indexOf(`
|
|
50
|
-
`,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:rr,stderr:ir}=er,ar=Symbol(`GENERATOR`),J=Symbol(`STYLER`),or=Symbol(`IS_EMPTY`),sr=[`ansi`,`ansi`,`ansi256`,`ansi16m`],Y=Object.create(null),cr=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=rr?rr.level:0;e.level=t.level===void 0?n:t.level},lr=e=>{let t=(...e)=>e.join(` `);return cr(t,e),Object.setPrototypeOf(t,ur.prototype),t};function ur(e){return lr(e)}Object.setPrototypeOf(ur.prototype,Function.prototype);for(let[e,t]of Object.entries(G))Y[e]={get(){let n=mr(this,pr(t.open,t.close,this[J]),this[or]);return Object.defineProperty(this,e,{value:n}),n}};Y.visible={get(){let e=mr(this,this[J],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const dr=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?G[n].ansi16m(...r):t===`ansi256`?G[n].ansi256(G.rgbToAnsi256(...r)):G[n].ansi(G.rgbToAnsi(...r)):e===`hex`?dr(`rgb`,t,n,...G.hexToRgb(...r)):G[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){Y[e]={get(){let{level:t}=this;return function(...n){let r=pr(dr(e,sr[t],`color`,...n),G.color.close,this[J]);return mr(this,r,this[or])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);Y[t]={get(){let{level:t}=this;return function(...n){let r=pr(dr(e,sr[t],`bgColor`,...n),G.bgColor.close,this[J]);return mr(this,r,this[or])}}}}const fr=Object.defineProperties(()=>{},{...Y,level:{enumerable:!0,get(){return this[ar].level},set(e){this[ar].level=e}}}),pr=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},mr=(e,t,n)=>{let r=(...e)=>hr(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,fr),r[ar]=e,r[J]=t,r[or]=n,r},hr=(e,t)=>{if(e.level<=0||!t)return e[or]?``:t;let n=e[J];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=tr(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
|
|
51
|
-
`);return a!==-1&&(t=nr(t,i,r,a)),r+t+i};Object.defineProperties(ur.prototype,Y);const X=ur();ur({level:ir?ir.level:0});const{white:gr,gray:_r,dim:vr,hidden:yr,bold:br,cyanBright:xr,bgCyan:Sr}=X;X.hex(`#BD5B08`);const Cr=X.hex(`#111`);X.hex(`#0E838F`);const wr=Cr.bgHex(`#0E838F`);X.hex(`#AB2526`);const Tr=Cr.bgHex(`#AB2526`);X.hex(`#218529`);const Er=Cr.bgHex(`#218529`);X.hex(`#7F7322`);const Dr=Cr.bgHex(`#7F7322`),Or=process.stdout;process.stderr;var kr=r(((e,t)=>{t.exports=[{name:`Agola CI`,constant:`AGOLA`,env:`AGOLA_GIT_REF`,pr:`AGOLA_PULL_REQUEST_ID`},{name:`Alpic`,constant:`ALPIC`,env:`ALPIC_HOST`},{name:`Appcircle`,constant:`APPCIRCLE`,env:`AC_APPCIRCLE`,pr:{env:`AC_GIT_PR`,ne:`false`}},{name:`AppVeyor`,constant:`APPVEYOR`,env:`APPVEYOR`,pr:`APPVEYOR_PULL_REQUEST_NUMBER`},{name:`AWS CodeBuild`,constant:`CODEBUILD`,env:`CODEBUILD_BUILD_ARN`,pr:{env:`CODEBUILD_WEBHOOK_EVENT`,any:[`PULL_REQUEST_CREATED`,`PULL_REQUEST_UPDATED`,`PULL_REQUEST_REOPENED`]}},{name:`Azure Pipelines`,constant:`AZURE_PIPELINES`,env:`TF_BUILD`,pr:{BUILD_REASON:`PullRequest`}},{name:`Bamboo`,constant:`BAMBOO`,env:`bamboo_planKey`},{name:`Bitbucket Pipelines`,constant:`BITBUCKET`,env:`BITBUCKET_COMMIT`,pr:`BITBUCKET_PR_ID`},{name:`Bitrise`,constant:`BITRISE`,env:`BITRISE_IO`,pr:`BITRISE_PULL_REQUEST`},{name:`Buddy`,constant:`BUDDY`,env:`BUDDY_WORKSPACE_ID`,pr:`BUDDY_EXECUTION_PULL_REQUEST_ID`},{name:`Buildkite`,constant:`BUILDKITE`,env:`BUILDKITE`,pr:{env:`BUILDKITE_PULL_REQUEST`,ne:`false`}},{name:`CircleCI`,constant:`CIRCLE`,env:`CIRCLECI`,pr:`CIRCLE_PULL_REQUEST`},{name:`Cirrus CI`,constant:`CIRRUS`,env:`CIRRUS_CI`,pr:`CIRRUS_PR`},{name:`Cloudflare Pages`,constant:`CLOUDFLARE_PAGES`,env:`CF_PAGES`},{name:`Cloudflare Workers`,constant:`CLOUDFLARE_WORKERS`,env:`WORKERS_CI`},{name:`Codefresh`,constant:`CODEFRESH`,env:`CF_BUILD_ID`,pr:{any:[`CF_PULL_REQUEST_NUMBER`,`CF_PULL_REQUEST_ID`]}},{name:`Codemagic`,constant:`CODEMAGIC`,env:`CM_BUILD_ID`,pr:`CM_PULL_REQUEST`},{name:`Codeship`,constant:`CODESHIP`,env:{CI_NAME:`codeship`}},{name:`Drone`,constant:`DRONE`,env:`DRONE`,pr:{DRONE_BUILD_EVENT:`pull_request`}},{name:`dsari`,constant:`DSARI`,env:`DSARI`},{name:`Earthly`,constant:`EARTHLY`,env:`EARTHLY_CI`},{name:`Expo Application Services`,constant:`EAS`,env:`EAS_BUILD`},{name:`Gerrit`,constant:`GERRIT`,env:`GERRIT_PROJECT`},{name:`Gitea Actions`,constant:`GITEA_ACTIONS`,env:`GITEA_ACTIONS`},{name:`GitHub Actions`,constant:`GITHUB_ACTIONS`,env:`GITHUB_ACTIONS`,pr:{GITHUB_EVENT_NAME:`pull_request`}},{name:`GitLab CI`,constant:`GITLAB`,env:`GITLAB_CI`,pr:`CI_MERGE_REQUEST_ID`},{name:`GoCD`,constant:`GOCD`,env:`GO_PIPELINE_LABEL`},{name:`Google Cloud Build`,constant:`GOOGLE_CLOUD_BUILD`,env:`BUILDER_OUTPUT`},{name:`Harness CI`,constant:`HARNESS`,env:`HARNESS_BUILD_ID`},{name:`Heroku`,constant:`HEROKU`,env:{env:`NODE`,includes:`/app/.heroku/node/bin/node`}},{name:`Hudson`,constant:`HUDSON`,env:`HUDSON_URL`},{name:`Jenkins`,constant:`JENKINS`,env:[`JENKINS_URL`,`BUILD_ID`],pr:{any:[`ghprbPullId`,`CHANGE_ID`]}},{name:`LayerCI`,constant:`LAYERCI`,env:`LAYERCI`,pr:`LAYERCI_PULL_REQUEST`},{name:`Magnum CI`,constant:`MAGNUM`,env:`MAGNUM`},{name:`Netlify CI`,constant:`NETLIFY`,env:`NETLIFY`,pr:{env:`PULL_REQUEST`,ne:`false`}},{name:`Nevercode`,constant:`NEVERCODE`,env:`NEVERCODE`,pr:{env:`NEVERCODE_PULL_REQUEST`,ne:`false`}},{name:`Prow`,constant:`PROW`,env:`PROW_JOB_ID`},{name:`ReleaseHub`,constant:`RELEASEHUB`,env:`RELEASE_BUILD_ID`},{name:`Render`,constant:`RENDER`,env:`RENDER`,pr:{IS_PULL_REQUEST:`true`}},{name:`Sail CI`,constant:`SAIL`,env:`SAILCI`,pr:`SAIL_PULL_REQUEST_NUMBER`},{name:`Screwdriver`,constant:`SCREWDRIVER`,env:`SCREWDRIVER`,pr:{env:`SD_PULL_REQUEST`,ne:`false`}},{name:`Semaphore`,constant:`SEMAPHORE`,env:`SEMAPHORE`,pr:`PULL_REQUEST_NUMBER`},{name:`Sourcehut`,constant:`SOURCEHUT`,env:{CI_NAME:`sourcehut`}},{name:`Strider CD`,constant:`STRIDER`,env:`STRIDER`},{name:`TaskCluster`,constant:`TASKCLUSTER`,env:[`TASK_ID`,`RUN_ID`]},{name:`TeamCity`,constant:`TEAMCITY`,env:`TEAMCITY_VERSION`},{name:`Travis CI`,constant:`TRAVIS`,env:`TRAVIS`,pr:{env:`TRAVIS_PULL_REQUEST`,ne:`false`}},{name:`Vela`,constant:`VELA`,env:`VELA`,pr:{VELA_PULL_REQUEST:`1`}},{name:`Vercel`,constant:`VERCEL`,env:{any:[`NOW_BUILDER`,`VERCEL`]},pr:`VERCEL_GIT_PULL_REQUEST_ID`},{name:`Visual Studio App Center`,constant:`APPCENTER`,env:`APPCENTER_BUILD_ID`},{name:`Woodpecker`,constant:`WOODPECKER`,env:{CI:`woodpecker`},pr:{CI_BUILD_EVENT:`pull_request`}},{name:`Xcode Cloud`,constant:`XCODE_CLOUD`,env:`CI_XCODE_PROJECT`,pr:`CI_PULL_REQUEST_NUMBER`},{name:`Xcode Server`,constant:`XCODE_SERVER`,env:`XCS`}]})),Ar=r((e=>{let t=kr(),n=process.env;Object.defineProperty(e,`_vendors`,{value:t.map(function(e){return e.constant})}),e.name=null,e.isPR=null,e.id=null,n.CI!==`false`&&t.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){return r(e)});e[t.constant]=n,n&&(e.name=t.name,e.isPR=i(t),e.id=t.constant)}),e.isCI=!!(n.CI!==`false`&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name));function r(e){return typeof e==`string`?!!n[e]:`env`in e?n[e.env]&&n[e.env].includes(e.includes):`any`in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}function i(e){switch(typeof e.pr){case`string`:return!!n[e.pr];case`object`:return`env`in e.pr?`any`in e.pr?e.pr.any.some(function(t){return n[e.pr.env]===t}):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:`any`in e.pr?e.pr.any.some(function(e){return!!n[e]}):r(e.pr);default:return null}}})),jr=t(Ar(),1);const Mr={diamond:`◇`,dash:`─`,radioInactive:`○`,radioActive:`●`,backActive:`◀`,backInactive:`◁`,bar:`│`,leftT:`├`,rigthT:`┤`,arrows:{left:`‹`,right:`›`},corners:{tl:`╭`,bl:`╰`,tr:`╮`,br:`╯`}};Tr(` ERROR `),Dr(` WARNING `),wr(` INFO `),Er(` SUCCESS `),gr.bgRed(` X `);const Nr=process.env.TERM_PROGRAM===`Apple_Terminal`,Z={};Z.cursorTo=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");return typeof t==`number`?`\x1B[`+(t+1)+`;`+(e+1)+`H`:`\x1B[`+(e+1)+`G`},Z.cursorMove=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");let n=``;return e<0?n+=`\x1B[`+-e+`D`:e>0&&(n+=`\x1B[`+e+`C`),t<0?n+=`\x1B[`+-t+`A`:t>0&&(n+=`\x1B[`+t+`B`),n},Z.cursorUp=(e=1)=>`\x1B[`+e+`A`,Z.cursorDown=(e=1)=>`\x1B[`+e+`B`,Z.cursorForward=(e=1)=>`\x1B[`+e+`C`,Z.cursorBackward=(e=1)=>`\x1B[`+e+`D`,Z.cursorLeft=`\x1B[G`,Z.cursorSavePosition=Nr?`\x1B7`:`\x1B[s`,Z.cursorRestorePosition=Nr?`\x1B8`:`\x1B[u`,Z.cursorGetPosition=`\x1B[6n`,Z.cursorNextLine=`\x1B[E`,Z.cursorPrevLine=`\x1B[F`,Z.cursorHide=`\x1B[?25l`,Z.cursorShow=`\x1B[?25h`,Z.eraseLines=e=>{let t=``;for(let n=0;n<e;n++)t+=Z.eraseLine+(n<e-1?Z.cursorUp():``);return e&&(t+=Z.cursorLeft),t},Z.eraseEndLine=`\x1B[K`,Z.eraseStartLine=`\x1B[1K`,Z.eraseLine=`\x1B[2K`,Z.eraseDown=`\x1B[J`,Z.eraseUp=`\x1B[1J`,Z.eraseScreen=`\x1B[2J`,Z.scrollUp=`\x1B[S`,Z.scrollDown=`\x1B[T`,Z.clearScreen=`\x1Bc`,Z.clearTerminal=process.platform===`win32`?`${Z.eraseScreen}[0f`:`${Z.eraseScreen}[3J[H`,Z.beep=`\x07`,Z.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),Z.image=(e,t={})=>{let n=`\x1B]1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=`;preserveAspectRatio=0`),n+`:`+e.toString(`base64`)+`\x07`},Z.iTerm={setCwd:(e=process.cwd())=>`]50;CurrentDir=${e}`,annotation:(e,t={})=>{let n=`\x1B]1337;`,r=t.x!==void 0,i=t.y!==void 0;if((r||i)&&!(r&&i&&t.length!==void 0))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,``),n+=t.isHidden?`AddHiddenAnnotation=`:`AddAnnotation=`,t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join(`|`):n+=e,n+`\x07`}};var Pr=r(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n})),Fr=r(((e,t)=>{let n=Pr(),r=new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})),Ir=r(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),Lr=r(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=Ir(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}else return _.apply(this,arguments)}}})),Rr=t(Fr(),1),zr=t(Lr(),1);const Br=(0,Rr.default)(()=>{(0,zr.default)(()=>{N.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let Vr=!1;const Q={};Q.show=(e=N.stderr)=>{e.isTTY&&(Vr=!1,e.write(`\x1B[?25h`))},Q.hide=(e=N.stderr)=>{e.isTTY&&(Br(),Vr=!0,e.write(`\x1B[?25l`))},Q.toggle=(e,t)=>{e!==void 0&&(Vr=e),Vr?Q.show(t):Q.hide(t)};var Hr=r(((e,t)=>{var n={};t===void 0?window.eastasianwidth=n:t.exports=n,n.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},n.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function r(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}n.length=function(e){for(var t=r(e),n=0,i=0;i<t.length;i++)n+=this.characterLength(t[i]);return n},n.slice=function(e,t,i){textLen=n.length(e),t||=0,i||=1,t<0&&(t=textLen+t),i<0&&(i=textLen+i);for(var a=``,o=0,s=r(e),c=0;c<s.length;c++){var l=s[c],u=n.length(l);if(o>=t-+(u==2))if(o+u<=i)a+=l;else break;o+=u}return a}})),Ur=r(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),Wr=t(Hr(),1),Gr=t(Ur(),1);function Kr(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=x(e),e.length===0))return 0;e=e.replace((0,Gr.default)(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(Wr.default.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}const qr=new Set([`\x1B`,``]),Jr=`]8;;`,Yr=e=>`${qr.values().next().value}[${e}m`,Xr=e=>`${qr.values().next().value}${Jr}${e}`,Zr=e=>e.split(` `).map(e=>Kr(e)),Qr=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=Kr(x(e[e.length-1]));for(let[t,s]of r.entries()){let c=Kr(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),qr.has(s)&&(i=!0,a=r.slice(t+1).join(``).startsWith(Jr)),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},$r=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(Kr(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},ei=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,s=Zr(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let e=Kr(c[c.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),Qr(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){Qr(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){Qr(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>$r(e)));let l=[...c.join(`
|
|
52
|
-
`)];for(let[e,t]of l.entries()){if(r+=t,qr.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${Jr}(?<uri>.*))`).exec(l.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}let n=o.codes.get(Number(i));l[e+1]===`
|
|
53
|
-
`?(a&&(r+=Xr(``)),i&&n&&(r+=Yr(n))):t===`
|
|
54
|
-
`&&(i&&n&&(r+=Yr(i)),a&&(r+=Xr(a)))}return r};function ti(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
55
|
-
`).split(`
|
|
56
|
-
`).map(e=>ei(e,t,n)).join(`
|
|
57
|
-
`)}function ni(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const ri=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,ii=[`\x1B`,``],ai=e=>`${ii[0]}[${e}m`,oi=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let a=o.codes.get(Number.parseInt(n,10));if(a){let n=e.indexOf(a.toString());n===-1?r.push(ai(t?a:i)):e.splice(n,1)}else if(t){r.push(ai(0));break}else r.push(ai(i))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=ai(o.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function si(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(ii.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!ri.test(d)&&ni(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=oi(i);else if(c>=a){l+=oi(i,!0,s);break}}return l}const ci=e=>{let{columns:t}=e;return t||80},li=(e,t)=>{let n=e.rows||24,r=t.split(`
|
|
58
|
-
`),i=r.length-n;return i<=0?t:si(t,x(r.slice(0,i).join(`
|
|
59
|
-
`)).length+1)};function ui(e,{showCursor:t=!1}={}){let n=0,r=ci(e),i=``,a=(...a)=>{t||Q.hide();let o=a.join(` `)+`
|
|
60
|
-
`;o=li(e,o);let s=ci(e);o===i&&r===s||(i=o,r=s,o=ti(o,s,{trim:!1,hard:!0,wordWrap:!1}),e.write(Z.eraseLines(n)+o),n=o.split(`
|
|
61
|
-
`).length)};return a.clear=()=>{e.write(Z.eraseLines(n)),i=``,r=ci(e),n=0},a.done=()=>{i=``,r=ci(e),n=0,t||Q.show()},a}ui(N.stdout),ui(N.stderr),ui(Or),_r(Mr.bar),_r(Mr.corners.bl),_r(Mr.leftT);function di(){try{return!!(process.stdin.isTTY&&process.stdout.isTTY)}catch{return!1}}function fi(){return!di()||jr.isCI}const pi=jr.isCI;var mi=n({getActiveProfile:()=>Ci,getConfigPath:()=>ki,getOrSelectAccountId:()=>yi,getProfileStore:()=>wi,getValidToken:()=>Ei,isOAuthLoggedIn:()=>Di,login:()=>bi,logout:()=>xi,readAuthCredentials:()=>Oi,resolveProfile:()=>Ti,setProfile:()=>Si});const hi={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var gi=class extends Error{};async function _i(e){if(fi())throw new gi;v(S);let t=await pe({message:e});return(Ct(t)||typeof t!=`string`)&&process.exit(130),t}async function vi(e,t){if(fi())throw new gi;v(S);let n=await fe({message:e,options:t.choices.map(({title:e,value:t})=>({label:e,value:t}))});return(Ct(n)||typeof n!=`string`)&&process.exit(130),n}const $=zn({logger:hi,userAgent:b,prompt:_i,select:vi,isNoDefaultValueProvidedError:e=>e instanceof gi});function yi(e){return $.getOrSelectAccountId({account_id:e,compliance_region:Ue()})}function bi(e){if(e?.scopes&&!En(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return $.login({compliance_region:Ue()},{browser:e?.browser??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function xi(e){return $.logout(e)}function Si(e){$.setProfile(e)}function Ci(){return $.getActiveProfile()}function wi(){return Bn({logger:hi})}function Ti(e,t=process.cwd()){let n=wi().resolve({profile:e,cwd:t});return Si(n),n}function Ei(){return $.getOAuthTokenFromLocalState()}function Di(){return $.readAuthCredentials()?.oauth_token!==void 0}function Oi(){return $.readAuthCredentials()}function ki(){return $.getCredentialStore().path()}export{Me as A,Ve as C,ke as D,Ke as E,Ge as F,Re as M,Ie as N,Pe as O,Ne as P,Ct as S,ze as T,Et as _,Di as a,Ot as b,mi as c,pi as d,fi as f,X as g,Ar as h,Ei as i,Xe as j,Ue as k,Oi as l,ui as m,ki as n,bi as o,di as p,wi as r,xi as s,Ci as t,Si as u,kt as v,Be as w,z as x,Dt as y};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{O as e,P as t}from"./oauth-B5k80sip.mjs";import{n}from"./auth-DX9KnJ0P.mjs";import{n as r,t as i}from"./body-parser-DWSy7uZ8.mjs";import{t as a}from"./output-B6fBFRqe.mjs";import{n as o,t as s}from"./progress-CL8I-7YK.mjs";import{n as c}from"./input-validation-_fMCApaH.mjs";import{t as l}from"./local-CYc9q7l2.mjs";import{n as u,r as d,t as f}from"./prompt-q3B7sM2A.mjs";import{t as p}from"./cli-types-DGgEbf8K.mjs";function m(e){return e.option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 h={command:`create`,describe:`Create a new Workers Observability Telemetry Destination.`,builder:m,handler:async f=>{if(f.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:f.body===void 0?i({configuration:{type:c(f[`configuration-type`],`configuration-type`,`text`),url:c(f[`configuration-url`],`configuration-url`,`text`)},enabled:f.enabled,name:c(f.name,`name`,`text`),skipPreflightCheck:f[`skip-preflight-check`]}):r(f.body)});return}let p=await n(f),m=f.local?l:await e();if(f.accountId=m,f.body){let e=r(f.body);a(await s(`Creating`,async()=>p.observability.destinations.create({...e,account_id:m})),{successLabel:`Created`});return}if(f[`configuration-type`]===void 0&&(f[`configuration-type`]=await u(`configuration-type`,`The configuration.type field`,[`logpush`])),f[`configuration-url`]===void 0&&(f[`configuration-url`]=await d(`configuration-url`,`The configuration.url field`)),f.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);f.name===void 0&&(f.name=await d(`name`,`The name field`));let h=i({configuration:{type:c(f[`configuration-type`],`configuration-type`,`text`),url:c(f[`configuration-url`],`configuration-url`,`text`)},enabled:f.enabled,name:c(f.name,`name`,`text`),skipPreflightCheck:f[`skip-preflight-check`]});a(await s(`Creating`,async()=>p.observability.destinations.create({...h,account_id:m})),{successLabel:`Created`})}};function g(e){return e.positional(`slug`,{type:`string`,description:`Slug`,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 <slug>`,describe:`Delete a Workers Observability Telemetry Destination.`,builder:g,handler:async r=>{if(r.dryRun){o({command:`cf observability destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/destinations/${r.slug==null?`<slug>`:encodeURIComponent(String(r.slug))}`,pathParams:{slug:String(r.slug??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();if(r.accountId=c,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>i.observability.destinations.delete({account_id:c,slug:r.slug})),{successLabel:`Deleted`})}};function v(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List your Workers Observability Telemetry Destinations.`,builder:p(v),handler:async r=>{let i={page:r.page,perPage:r[`per-page`],order:r.order,orderBy:r[`order-by`]};if(r.dryRun){o({command:`cf observability destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.observability.destinations.list({account_id:u,...i})),{successLabel:`Loaded`})}};function b(e){return e.positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled 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:`update <slug>`,describe:`Update an existing Workers Observability Telemetry Destination.`,builder:b,handler:async f=>{if(f.dryRun){o({command:`cf observability destinations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/destinations/${f.slug==null?`<slug>`:encodeURIComponent(String(f.slug))}`,pathParams:{slug:String(f.slug??``)},bodyKind:`json`,body:f.body===void 0?i({configuration:{type:c(f[`configuration-type`],`configuration-type`,`text`),url:c(f[`configuration-url`],`configuration-url`,`text`)},enabled:f.enabled}):r(f.body)});return}let p=await n(f),m=f.local?l:await e();if(f.accountId=m,f.body){let e=r(f.body);a(await s(`Updating`,async()=>p.observability.destinations.update({...e,account_id:m,slug:f.slug})),{successLabel:`Updated`});return}if(f[`configuration-type`]===void 0&&(f[`configuration-type`]=await u(`configuration-type`,`The configuration.type field`,[`logpush`])),f[`configuration-url`]===void 0&&(f[`configuration-url`]=await d(`configuration-url`,`The configuration.url field`)),f.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let h=i({configuration:{type:c(f[`configuration-type`],`configuration-type`,`text`),url:c(f[`configuration-url`],`configuration-url`,`text`)},enabled:f.enabled});a(await s(`Updating`,async()=>p.observability.destinations.update({...h,account_id:m,slug:f.slug})),{successLabel:`Updated`})}},S={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const w={command:`create`,describe:`Persist query for later use.`,builder:C,handler:async u=>{if(u.dryRun){o({command:`cf observability queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:u.body===void 0?i({description:c(u.description,`description`,`text`),name:c(u.name,`name`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):r(u.body)});return}let f=await n(u),p=u.local?l:await e();if(u.accountId=p,u.body){let e=r(u.body);a(await s(`Creating`,async()=>f.observability.queries.create({...e,account_id:p})),{successLabel:`Created`});return}u.description===void 0&&(u.description=await d(`description`,`The description field`)),u.name===void 0&&(u.name=await d(`name`,`Query name`)),u[`parameters-order-by-value`]===void 0&&(u[`parameters-order-by-value`]=await d(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let m=i({description:c(u.description,`description`,`text`),name:c(u.name,`name`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}});a(await s(`Creating`,async()=>f.observability.queries.create({...m,account_id:p})),{successLabel:`Created`})}};function T(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,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:`delete <queryId>`,describe:`Delete a saved query.`,builder:T,handler:async r=>{if(r.dryRun){o({command:`cf observability queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();if(r.accountId=c,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
4
|
-
`);return}a(await s(`Deleting`,async()=>i.observability.queries.delete({account_id:c,queryId:r[`query-id`]})),{successLabel:`Deleted`})}};function D(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const O={command:`edit <queryId>`,describe:`Update saved query.`,builder:D,handler:async u=>{if(u.dryRun){o({command:`cf observability queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/queries/${u[`query-id`]==null?`<query-id>`:encodeURIComponent(String(u[`query-id`]))}`,pathParams:{"query-id":String(u[`query-id`]??``)},bodyKind:`json`,body:u.body===void 0?i({description:c(u.description,`description`,`text`),name:c(u.name,`name`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):r(u.body)});return}let f=await n(u),p=u.local?l:await e();if(u.accountId=p,u.body){let e=r(u.body);a(await s(`Updating`,async()=>f.observability.queries.edit({...e,account_id:p,queryId:u[`query-id`]})),{successLabel:`Updated`});return}u.description===void 0&&(u.description=await d(`description`,`The description field`)),u.name===void 0&&(u.name=await d(`name`,`Query name`)),u[`parameters-order-by-value`]===void 0&&(u[`parameters-order-by-value`]=await d(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let m=i({description:c(u.description,`description`,`text`),name:c(u.name,`name`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}});a(await s(`Updating`,async()=>f.observability.queries.edit({...m,account_id:p,queryId:u[`query-id`]})),{successLabel:`Updated`})}};function k(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <queryId>`,describe:`Retrieve a saved query.`,builder:k,handler:async r=>{if(r.dryRun){o({command:`cf observability queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let i=await n(r),c=r.local?l:await e();r.accountId=c,a(await s(`Loading`,async()=>i.observability.queries.get({account_id:c,queryId:r[`query-id`]})),{successLabel:`Loaded`})}};function j(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List saved queries.`,builder:p(j),handler:async r=>{let i={page:r.page,perPage:r[`per-page`],order:r.order,orderBy:r[`order-by`]};if(r.dryRun){o({command:`cf observability queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/queries`,pathParams:{},query:i,bodyKind:`none`});return}let c=await n(r),u=r.local?l:await e();r.accountId=u,a(await s(`Loading`,async()=>c.observability.queries.list({account_id:u,...i})),{successLabel:`Loaded`})}},N={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(w).command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`from`,{type:`number`,description:`The from field`}).option(`key-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`key-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`limit`,{type:`number`,description:`Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.`}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`to`,{type:`number`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Find keys in your telemetry events matching a specific filter or needle.`})}const F={command:`keys`,describe:`List all the keys in your telemetry events.`,builder:P,handler:async c=>{if(c.dryRun){o({command:`cf observability telemetry keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/telemetry/keys`,pathParams:{},bodyKind:`json`,body:c.body===void 0?i({datasets:c.datasets,from:c.from,keyNeedle:{isRegex:c[`key-needle-is-regex`],matchCase:c[`key-needle-match-case`]},limit:c.limit,needle:{isRegex:c[`needle-is-regex`],matchCase:c[`needle-match-case`]},to:c.to}):r(c.body)});return}let u=await n(c),d=c.local?l:await e();if(c.accountId=d,c.body){let e=r(c.body);a(await s(`Creating`,async()=>u.observability.telemetry.keys({...e,account_id:d})),{successLabel:`Created`});return}let f=i({datasets:c.datasets,from:c.from,keyNeedle:{isRegex:c[`key-needle-is-regex`],matchCase:c[`key-needle-match-case`]},limit:c.limit,needle:{isRegex:c[`needle-is-regex`],matchCase:c[`needle-match-case`]},to:c.to});a(await s(`Creating`,async()=>u.observability.telemetry.keys({...f,account_id:d})),{successLabel:`Created`})}};function I(e){return e.option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`dry`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, and invocation views. Pass the $metadata.id of the last returned item to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe (Unix timestamp in milliseconds)`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe (Unix timestamp in milliseconds)`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': Durable Object agent summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const L={command:`query`,describe:`Run a temporary or saved query.`,builder:I,handler:async u=>{if(u.dryRun){o({command:`cf observability telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:u.body===void 0?i({chart:u.chart,compare:u.compare,dry:u.dry,granularity:u.granularity,ignoreSeries:u[`ignore-series`],limit:u.limit,offset:c(u.offset,`offset`,`text`),offsetBy:u[`offset-by`],offsetDirection:c(u[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:c(u[`query-id`],`query-id`,`text`),timeframe:{from:u[`timeframe-from`],to:u[`timeframe-to`]},view:c(u.view,`view`,`text`)}):r(u.body)});return}let f=await n(u),p=u.local?l:await e();if(u.accountId=p,u.body){let e=r(u.body);a(await s(`Loading`,async()=>f.observability.telemetry.query({...e,account_id:p})),{successLabel:`Loaded`});return}if(u[`query-id`]===void 0&&(u[`query-id`]=await d(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),u[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(u[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let m=i({chart:u.chart,compare:u.compare,dry:u.dry,granularity:u.granularity,ignoreSeries:u[`ignore-series`],limit:u.limit,offset:c(u.offset,`offset`,`text`),offsetBy:u[`offset-by`],offsetDirection:c(u[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:u[`parameters-datasets`],filterCombination:c(u[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:u[`parameters-limit`],needle:{isRegex:u[`parameters-needle-is-regex`],matchCase:u[`parameters-needle-match-case`]},orderBy:{order:c(u[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:c(u[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:c(u[`query-id`],`query-id`,`text`),timeframe:{from:u[`timeframe-from`],to:u[`timeframe-to`]},view:c(u.view,`view`,`text`)});a(await s(`Loading`,async()=>f.observability.telemetry.query({...m,account_id:p})),{successLabel:`Loaded`})}};function R(e){return e.option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`key`,{type:`string`,description:`The key field`}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`timeframe-from`,{type:`number`,description:`The timeframe.from field`}).option(`timeframe-to`,{type:`number`,description:`The timeframe.to field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`string`,`boolean`,`number`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Retrieve values from your telemetry events.`})}const z={command:`values`,describe:`List unique values found in your events.`,builder:R,handler:async f=>{if(f.dryRun){o({command:`cf observability telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t()??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:f.body===void 0?i({datasets:f.datasets,key:c(f.key,`key`,`text`),limit:f.limit,needle:{isRegex:f[`needle-is-regex`],matchCase:f[`needle-match-case`]},timeframe:{from:f[`timeframe-from`],to:f[`timeframe-to`]},type:c(f.type,`type`,`text`)}):r(f.body)});return}let p=await n(f),m=f.local?l:await e();if(f.accountId=m,f.body){let e=r(f.body);a(await s(`Creating`,async()=>p.observability.telemetry.values({...e,account_id:m})),{successLabel:`Created`});return}if(f.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(f.key===void 0&&(f.key=await d(`key`,`The key field`)),f[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(f[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);f.type===void 0&&(f.type=await u(`type`,`The type field`,[`string`,`boolean`,`number`]));let h=i({datasets:f.datasets,key:c(f.key,`key`,`text`),limit:f.limit,needle:{isRegex:f[`needle-is-regex`],matchCase:f[`needle-match-case`]},timeframe:{from:f[`timeframe-from`],to:f[`timeframe-to`]},type:c(f.type,`type`,`text`)});a(await s(`Creating`,async()=>p.observability.telemetry.values({...h,account_id:m})),{successLabel:`Created`})}},B={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`observability`,describe:`observability`,builder:e=>e.command(S).command(N).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|