cf 1.0.0-beta.11 → 1.0.0-beta.12
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/bin/cf +1 -1
- package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
- package/dist/{access-DuHs0Mii.mjs → access-DwJm1qet.mjs} +1 -1
- package/dist/account-tags-d0RkEw6s.mjs +15 -0
- package/dist/{accounts-DfXSHrkF.mjs → accounts-BSd4b-1j.mjs} +63 -63
- package/dist/{acm-BgSr3Ig4.mjs → acm-BfI0p2sX.mjs} +7 -7
- package/dist/addressing-lfeJf7YB.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-CP1qpn-y.mjs +34 -0
- package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-B_tSl78A.mjs} +3 -3
- package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
- package/dist/ai-jFzFBANM.mjs +29 -0
- package/dist/{ai-search-C4YWVTCa.mjs → ai-search-PTlpY1T9.mjs} +42 -42
- package/dist/ai-security-CKGE547U.mjs +10 -0
- package/dist/alerting-CuxoqG3S.mjs +56 -0
- package/dist/analytics-NPND7aHB.mjs +20 -0
- package/dist/analytics_engine-BoapM9wd.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-gB1FHrHq.mjs → api-security-Nk_bg-Kg.mjs} +57 -57
- package/dist/{argo-wFCAsYx7.mjs → argo-DYfLQhd2.mjs} +5 -5
- package/dist/artifacts-BS6cEqCB.mjs +43 -0
- package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
- package/dist/auth-AobvBmz4.mjs +2 -0
- package/dist/auth-CBtzZ3Sw.mjs +2 -0
- package/dist/{auth-7Fk7PVIC.mjs → auth-CKotxfap.mjs} +1 -1
- package/dist/{auth-token-DeG33BMQ.mjs → auth-token-CtguMdmF.mjs} +1 -1
- package/dist/autoconfig-PfnbLuEO.mjs +532 -0
- package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
- package/dist/billing-CDMc4tvX.mjs +23 -0
- package/dist/bot-management-UrCM3P8K.mjs +9 -0
- package/dist/botnet-feed-CVwRm42k.mjs +11 -0
- package/dist/brand-protection-DfNf5REj.mjs +27 -0
- package/dist/browser-run-DVaiBLYX.mjs +46 -0
- package/dist/build-BKPVP5ip.mjs +2 -0
- package/dist/build-C4giET85.mjs +2 -0
- package/dist/builds-BG5DHqU3.mjs +71 -0
- package/dist/cache-C05hHXUp.mjs +45 -0
- package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
- package/dist/cf-B9aqZZKD.mjs +18 -0
- package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
- package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-aChy8ou_.mjs → cli-D9qlPB-6.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-B-m8rfM9.mjs} +6 -6
- package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-M4oIUqID.mjs} +14 -14
- package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-B63Dwn6n.mjs} +3 -3
- package/dist/cloudflared-B48cfu95.mjs +2 -0
- package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
- package/dist/{command-07vhr56i.mjs → command-BQpXcGKV.mjs} +1 -1
- package/dist/{command-Cdx___59.mjs → command-BWlpCtHe.mjs} +1 -1
- package/dist/{command-CrtDkZNs.mjs → command-BlGILcTA.mjs} +1 -1
- package/dist/{command-eM48o0J6.mjs → command-CKQlxypn.mjs} +1 -1
- package/dist/{command-D0MKPucK.mjs → command-CRl00uA2.mjs} +1 -1
- package/dist/{command-Ds5OVat3.mjs → command-CUkXxZsc.mjs} +1 -1
- package/dist/command-CXxh5Hce.mjs +2 -0
- package/dist/{command-BWC9CbE7.mjs → command-CzvlHvov.mjs} +1 -1
- package/dist/{command-B6TpINoN.mjs → command-DBaNgfA4.mjs} +1 -1
- package/dist/{command-C2pNxAeL.mjs → command-DEQSv-S1.mjs} +1 -1
- package/dist/{command-Dv6YavZa.mjs → command-DyE8v4sd.mjs} +1 -1
- package/dist/command-Rv2MR-eh.mjs +2 -0
- package/dist/{command-BsmF3J_l.mjs → command-SS1z_t68.mjs} +1 -1
- package/dist/{command-maDJWJgu.mjs → command-VuxpEvmH.mjs} +1 -1
- package/dist/{command-dAYWrB5y.mjs → command-ZBQ1WITj.mjs} +1 -1
- package/dist/{completions-D0280hul.mjs → completions-lf50FBGm.mjs} +2 -2
- package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
- package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
- package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
- package/dist/connectors-0UwPUav-.mjs +15 -0
- package/dist/containers-DRzgE46U.mjs +375 -0
- package/dist/containers-DuIsM7lM.mjs +78 -0
- package/dist/{content-scan-BCtWBCqd.mjs → content-scan-COyTz0Wb.mjs} +7 -7
- package/dist/{context-CquYYyS3.mjs → context-Bwkz4Lm_.mjs} +2 -2
- package/dist/{cps-C8BbnbuD.mjs → cps-B7_BJaAU.mjs} +3 -3
- package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-jez2EYXC.mjs} +3 -3
- package/dist/ct-alerting-CACDrY0E.mjs +5 -0
- package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-BBd92YlF.mjs} +7 -7
- package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-DTwBiNMX.mjs} +5 -5
- package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-DIWlqvN9.mjs} +12 -12
- package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-DISy8v8u.mjs} +5 -5
- package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-BHXO_NFv.mjs} +10 -10
- package/dist/d1-MvAQMvvo.mjs +89 -0
- package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BdWBEbLj.mjs → deploy-BS47vZvJ.mjs} +1 -1
- package/dist/deploy-context-Cfushp8j.mjs +56 -0
- package/dist/{deploy-input-LmLfj6kI.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
- package/dist/{dev-BHkVwAea.mjs → dev-D8FGPKRt.mjs} +2 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
- package/dist/{dialog-Dpi-UVbz.mjs → dialog-CL1Zy4pn.mjs} +1 -1
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/{dist-Cpb7_h4N.mjs → dist-8rP3V95o.mjs} +5 -5
- package/dist/dist-CYFkGHYv.mjs +487 -0
- package/dist/dls-8D00tqvC.mjs +17 -0
- package/dist/{dns-BLNa0GrP.mjs → dns-C-A5pwf3.mjs} +63 -63
- package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DmsbOMF1.mjs +2 -0
- package/dist/durable-objects-CnIqbj84.mjs +6 -0
- package/dist/{email-auth-C28s03aI.mjs → email-auth-v97Md32E.mjs} +3 -3
- package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-I29RG4hb.mjs} +22 -22
- package/dist/{email-security-DPU6xvI9.mjs → email-security-BCarmbky.mjs} +86 -86
- package/dist/{email-sending-kTVAlVKO.mjs → email-sending-CsHk2HAJ.mjs} +22 -22
- package/dist/error-sanitization-BWnGnB73.mjs +2 -0
- package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
- package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
- package/dist/{firewall-BND3qSY2.mjs → firewall-DpgFqJr3.mjs} +16 -16
- package/dist/flagship-BVaXXlsX.mjs +28 -0
- package/dist/{fraud-DgyYv_CC.mjs → fraud-B5GQdEF2.mjs} +3 -3
- package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-BwYMnKSF.mjs} +10 -10
- package/dist/{hostnames-3CqeMF5g.mjs → hostnames-DhrGRFeI.mjs} +5 -5
- package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
- package/dist/iam-sRKDU2Z3.mjs +52 -0
- package/dist/images-DXdekLVs.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-j47MT4Qe.mjs +39 -0
- package/dist/intel-CnVeSjIS.mjs +76 -0
- package/dist/interactive-Dqv0RWVU.mjs +42 -0
- package/dist/interactive-Wpd3FcDc.mjs +2 -0
- package/dist/{ips-WWvPwSBc.mjs → ips-COCUG8mk.mjs} +2 -2
- package/dist/k2-CmHkArHL.mjs +13 -0
- package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-l2_S__h3.mjs} +6 -6
- package/dist/keys-CDZreums.mjs +4 -0
- package/dist/kv-DkpKVimq.mjs +15 -0
- package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
- package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-edbapECI.mjs} +8 -8
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
- package/dist/{local-rYpzEQb-.mjs → local-C0lQ9sTg.mjs} +1 -1
- package/dist/local-D5L5Bwju.mjs +2 -0
- package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
- package/dist/{login-bnylLTit.mjs → login-BrjOuHKu.mjs} +1 -1
- package/dist/login-DeOM4v0L.mjs +2 -0
- package/dist/logo-matches-CF8321pb.mjs +6 -0
- package/dist/logos-Bd8xNRKW.mjs +7 -0
- package/dist/logpush-BYk3qqwY.mjs +46 -0
- package/dist/{logs-c3b3USyS.mjs → logs-Jcj2NN8H.mjs} +11 -11
- package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
- package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
- package/dist/magic-transit-KDyfUgTv.mjs +383 -0
- package/dist/managed-defense-CxaDeNUd.mjs +18 -0
- package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-C7rT5E-x.mjs} +4 -4
- package/dist/{matches-hnU16rSJ.mjs → matches-BtKqG8T9.mjs} +3 -3
- package/dist/{mcp-kZX4irfN.mjs → mcp-QDd1Iyc0.mjs} +17 -17
- package/dist/mesh-DtrIzl5z.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BNvUWrjy.mjs → migrate-DHlfR_gZ.mjs} +1 -1
- package/dist/{monetization-Dsqj9DCA.mjs → monetization-pLalYYMI.mjs} +9 -9
- package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
- package/dist/network-DrJxPWXQ.mjs +50 -0
- package/dist/{network-interconnects-osO_vAPu.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
- package/dist/{oauth-CeZ3d_dB.mjs → oauth-B08YQ4xq.mjs} +1 -1
- package/dist/{oauth-w0fWmrwU.mjs → oauth-TGbM1Q0V.mjs} +1 -1
- package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
- package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
- package/dist/{observability-BxL2RqWZ.mjs → observability-CvN9oxAo.mjs} +42 -42
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-DNieJ1xJ.mjs → organization-DIwqRBBV.mjs} +16 -16
- package/dist/{organizations-BIXPmTy5.mjs → organizations-Dk0D9ukm.mjs} +2 -2
- package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
- package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +14 -14
- package/dist/output-BGqhvqe2.mjs +2 -0
- package/dist/{page-rules-DA552Ra4.mjs → page-rules-BKaU37cM.mjs} +7 -7
- package/dist/pages-2Xg-lrMf.mjs +54 -0
- package/dist/{pay-per-crawl-DoTg9VP7.mjs → pay-per-crawl-5-KTQXRr.mjs} +33 -33
- package/dist/pay-per-use-sGebKzNK.mjs +6 -0
- package/dist/pipelines-BM-T7mMK.mjs +44 -0
- package/dist/precursor-DmQ32-Sp.mjs +4 -0
- package/dist/previews-DDQ9ACDJ.mjs +4 -0
- package/dist/{progress-TLUEIYE6.mjs → progress-BYVZuEcG.mjs} +1 -1
- package/dist/{prompt-Ck_1PCHm.mjs → prompt-F5wxc8zq.mjs} +1 -1
- package/dist/queries-DPBkVynK.mjs +9 -0
- package/dist/queues-CCXRs98q.mjs +57 -0
- package/dist/r2-BKuBSW8h.mjs +125 -0
- package/dist/{radar-Bez6k9Dw.mjs → radar-Gv1yFoRX.mjs} +150 -150
- package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-DyYWa923.mjs} +1 -1
- package/dist/realtime-CVl-rvgx.mjs +172 -0
- package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
- package/dist/registrar-swlnh22i.mjs +43 -0
- package/dist/{registry-CsSLAAOE.mjs → registry-C20J1MW0.mjs} +1 -1
- package/dist/reporting-Bgwsvol1.mjs +14 -0
- package/dist/request-headers-CUee83pa.mjs +2 -0
- package/dist/request-tracers-BBiJvVDz.mjs +4 -0
- package/dist/resolve-DvxgnWjL.mjs +2 -0
- package/dist/resolve-qwL1LmKN.mjs +2 -0
- package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
- package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
- package/dist/rules-BDunCGMj.mjs +18 -0
- package/dist/{rulesets-RJ6yBefy.mjs → rulesets-BMGxrnv9.mjs} +17 -17
- package/dist/rum-B7XiECe9.mjs +30 -0
- package/dist/run-CrZgB8L_.mjs +2 -0
- package/dist/run-nNxXb_Cv.mjs +2 -0
- package/dist/schema-DC0kdqgV.mjs +2 -0
- package/dist/schema-flags-BUZR9SLd.mjs +5 -0
- package/dist/scim-CORcs2wK.mjs +18 -0
- package/dist/secrets-store-BoZQaFey.mjs +24 -0
- package/dist/{security-insights-DVAqroY5.mjs → security-insights-DblK_6sg.mjs} +20 -20
- package/dist/{security-txt-rfrrdiZV.mjs → security-txt-Dl7RPnRb.mjs} +4 -4
- package/dist/{session-B6mFkaVZ.mjs → session-BWe9et4K.mjs} +1 -1
- package/dist/shared-0N31BXkY.mjs +2 -0
- package/dist/{smart-shield-_HA814Im.mjs → smart-shield-DX0-8ruu.mjs} +11 -11
- package/dist/{snippets-mRelEw0p.mjs → snippets-BFN-Lg3K.mjs} +8 -8
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-DZ9A-xXb.mjs +10 -0
- package/dist/{spectrum-BwtOiaDw.mjs → spectrum-HYWLWB0X.mjs} +11 -11
- package/dist/{speed-DmqsZtiJ.mjs → speed-Dj0YhfRe.mjs} +11 -11
- package/dist/src-CAiZlihY.mjs +117 -0
- package/dist/{ssl-DCvfveJB.mjs → ssl-BQL1fNtD.mjs} +16 -16
- package/dist/startup-profile-0X5ebbng.mjs +29 -0
- package/dist/startup-profile-CXnsF4c7.mjs +2 -0
- package/dist/state-BA2CanJ_.mjs +2 -0
- package/dist/{state-BPwdiNO_.mjs → state-Dy6-rKNd.mjs} +1 -1
- package/dist/stream-DKv2TtZN.mjs +102 -0
- package/dist/submit-Byt2KBGI.mjs +4 -0
- package/dist/{tags-Djw0e-4j.mjs → tags-BIBsdG68.mjs} +2 -2
- package/dist/telemetry-DBXOMuLh.mjs +2 -0
- package/dist/{telemetry-DrFNujdx.mjs → telemetry-bu3txnIR.mjs} +1 -1
- package/dist/{tenant-tc1wb_ym.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-CB4NleeJ.mjs → tools-BbTX7rlM.mjs} +1 -1
- package/dist/tunnels-DWcrz9Sf.mjs +29 -0
- package/dist/turnstile-2MIGp2ce.mjs +33 -0
- package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-B-CvDAUz.mjs +2 -0
- package/dist/update-check-CfB0PNTY.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-B8udoxlx.mjs +4 -0
- package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-C6AdWtaE.mjs} +4 -4
- package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
- package/dist/{user-3uwLMH78.mjs → user-BLZ-0Bgv.mjs} +51 -51
- package/dist/values-BUK-m0Jg.mjs +4 -0
- package/dist/vectorize-DEUSEQXY.mjs +32 -0
- package/dist/version-BZNc7Y3t.mjs +2 -0
- package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
- package/dist/{web-assets-BfEprX1S.mjs → web-assets-CLZdWOmN.mjs} +30 -30
- package/dist/{web3-DNbp5sZw.mjs → web3-DjeavuLg.mjs} +13 -13
- package/dist/workers-C_SfyU-v.mjs +38 -0
- package/dist/workers-builds-COn5Ne5G.mjs +14 -0
- package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
- package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
- package/dist/workflows-BibtWuOx.mjs +43 -0
- package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
- package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BvQZB0YY.mjs} +11 -11
- package/dist/{zero-trust-CQNohO7_.mjs → zero-trust-FStq4uhn.mjs} +411 -411
- package/dist/{zone-BVDW2UGd.mjs → zone-tymlghWb.mjs} +2 -2
- package/dist/{zones-CcZL0YQp.mjs → zones-Bz6dgT9_.mjs} +43 -43
- package/package.json +20 -21
- package/dist/abuse-reports-DX5xgeka.mjs +0 -24
- package/dist/account-tags-CiKwgOWd.mjs +0 -15
- package/dist/addressing-B70NFnrX.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-DJRquHeq.mjs +0 -34
- package/dist/ai-CP2oIS-I.mjs +0 -29
- package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
- package/dist/ai-security-Bt_fG65f.mjs +0 -10
- package/dist/alerting-CRr88fVR.mjs +0 -56
- package/dist/analytics-XqS9OP5B.mjs +0 -20
- package/dist/analytics_engine-CzmYem4f.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/artifacts-qFjlNRqb.mjs +0 -43
- package/dist/auth-BmJ946bE.mjs +0 -2
- package/dist/auth-Br-t8vL_.mjs +0 -2
- package/dist/autoconfig-D-copdZG.mjs +0 -511
- package/dist/basin-catalog-CshcpsAH.mjs +0 -46
- package/dist/billing-B-xNxxiP.mjs +0 -23
- package/dist/bot-management-DhafeA2J.mjs +0 -9
- package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
- package/dist/brand-protection-c3WiHbYn.mjs +0 -27
- package/dist/browser-run-D9_cwaSD.mjs +0 -46
- package/dist/build-9ihDp-Gy.mjs +0 -2
- package/dist/build-DrG6TqMw.mjs +0 -2
- package/dist/builds-Dl8if-2k.mjs +0 -71
- package/dist/cache-CIZokBjd.mjs +0 -45
- package/dist/cf-DfQfIu3q.mjs +0 -18
- package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
- package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloudflared-CEfZhSQH.mjs +0 -2
- package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
- package/dist/command-C65Ed0o9.mjs +0 -2
- package/dist/command-DHdWKtqx.mjs +0 -2
- package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
- package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
- package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
- package/dist/connectors-DGtx-rPI.mjs +0 -15
- package/dist/containers-CzNbBrYE.mjs +0 -239
- package/dist/containers-DEFrbNgO.mjs +0 -78
- package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
- package/dist/d1-B2duXfH2.mjs +0 -41
- package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
- package/dist/discover-BYkHr5Ja.mjs +0 -2
- package/dist/discover-t6E9lpf3.mjs +0 -2
- package/dist/dist-D1iG7guo.mjs +0 -366
- package/dist/dist-zep5OXGt.mjs +0 -48
- package/dist/dls-Caya7FZc.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
- package/dist/durable-objects-DuRbdp7N.mjs +0 -6
- package/dist/error-sanitization-BbEw--0B.mjs +0 -2
- package/dist/error-sanitization-p5rmb53x.mjs +0 -2
- package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
- package/dist/flagship-DfxbNzgx.mjs +0 -28
- package/dist/generate-9P8Q_RiO.mjs +0 -2
- package/dist/gt-KlYHH-UC.mjs +0 -2
- package/dist/iam-CV_M681j.mjs +0 -52
- package/dist/images-DaLPjskW.mjs +0 -71
- package/dist/init-CBKifk5L.mjs +0 -39
- package/dist/intel-MpftjuPB.mjs +0 -76
- package/dist/interactive-D80kbTap.mjs +0 -32
- package/dist/interactive-mJQ_IrGd.mjs +0 -2
- package/dist/k2-D0QYUFqT.mjs +0 -13
- package/dist/keys-DhX4AcqF.mjs +0 -4
- package/dist/kv-DLUfUL0_.mjs +0 -15
- package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
- package/dist/local-DkYQiSQQ.mjs +0 -2
- package/dist/login-CnE2Ii_F.mjs +0 -2
- package/dist/logo-matches-DFZybI0C.mjs +0 -6
- package/dist/logos-Da2YtqSN.mjs +0 -7
- package/dist/logpush-Q7WIEHS1.mjs +0 -46
- package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
- package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
- package/dist/magic-transit-4-THD45G.mjs +0 -383
- package/dist/managed-defense-CTMqSp6z.mjs +0 -18
- package/dist/mesh-Dxzvvso6.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
- package/dist/network-mEnXTEiG.mjs +0 -50
- package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
- package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
- package/dist/output-ClYel9WX.mjs +0 -2
- package/dist/pages-B0x7tidm.mjs +0 -54
- package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
- package/dist/pipelines-CQxrm9ao.mjs +0 -44
- package/dist/precursor-FiGYDRV9.mjs +0 -4
- package/dist/previews-BthBa50j.mjs +0 -4
- package/dist/queries-C0RRdol7.mjs +0 -9
- package/dist/queues-sLgvjsRP.mjs +0 -57
- package/dist/r2-C2PllL6i.mjs +0 -125
- package/dist/realtime-D-HSXznX.mjs +0 -172
- package/dist/registrar-DwHrG9QR.mjs +0 -43
- package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
- package/dist/reporting-DolhAb10.mjs +0 -14
- package/dist/request-headers-Lhj314mk.mjs +0 -2
- package/dist/request-tracers-w72hKc33.mjs +0 -4
- package/dist/resolve-CGKqk7q8.mjs +0 -2
- package/dist/resolve-Djf2xgBx.mjs +0 -2
- package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
- package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
- package/dist/rules-C8a7cV-W.mjs +0 -18
- package/dist/rum-Bk1dPW4p.mjs +0 -30
- package/dist/run-BJOAPmsz.mjs +0 -2
- package/dist/run-iFM5TxtQ.mjs +0 -2
- package/dist/schema-flags-PagOq-G2.mjs +0 -5
- package/dist/schema-v7mOxMdx.mjs +0 -2
- package/dist/scim-C0FmjkkV.mjs +0 -18
- package/dist/secrets-store-cG_5RMzK.mjs +0 -24
- package/dist/shared-BqsWoApw.mjs +0 -2
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-BzPhcLJI.mjs +0 -10
- package/dist/src--KDGqL5N.mjs +0 -109
- package/dist/startup-profile-BCe9k9sR.mjs +0 -17
- package/dist/startup-profile-WrwRyMwH.mjs +0 -2
- package/dist/state-a1tTOGjm.mjs +0 -2
- package/dist/stream-aroClJeD.mjs +0 -102
- package/dist/submit-BBKhoKT8.mjs +0 -4
- package/dist/telemetry-DoBQOGRk.mjs +0 -2
- package/dist/tunnels-C2FTswb6.mjs +0 -29
- package/dist/turnstile-BV4Mdd-j.mjs +0 -33
- package/dist/update-check-CFt6cMOi.mjs +0 -2
- package/dist/update-check-Dtj9fzNe.mjs +0 -2
- package/dist/url-info-CeegsDK7.mjs +0 -4
- package/dist/url-scanner-BFXMrpJF.mjs +0 -16
- package/dist/values-BTncDc3U.mjs +0 -4
- package/dist/vectorize-CtMAtx8r.mjs +0 -32
- package/dist/version-oN1bmOgM.mjs +0 -2
- package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
- package/dist/workers-DK_JgS4Y.mjs +0 -38
- package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
- package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
- package/dist/workflows-CA5K8FFb.mjs +0 -43
- /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
- /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{B as e,G as t,K as n,V as r,k as i,q as a,rt as o,tt as s}from"./dist-CYFkGHYv.mjs";import{E as c,M as l,N as u,O as d}from"./chunk-AUSY7DKT-BJX6Fdc4.mjs";import{createRequire as f}from"node:module";import{chmodSync as p,existsSync as m,mkdirSync as h,rmSync as g,writeFileSync as _}from"node:fs";import v from"node:path";import ee from"node:url";import y from"node:assert";import{TextEncoder as te}from"node:util";import ne from"node:http";import{createCipheriv as re,createDecipheriv as ie,createHash as b,randomBytes as x,webcrypto as S}from"node:crypto";import{spawn as ae,spawnSync as C}from"node:child_process";f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var oe=Object.defineProperty,w=(e,t)=>oe(e,`name`,{value:t,configurable:!0}),T=e();f(import.meta.url||(typeof __filename==`string`?__filename:`/`));var se=!1;function E(e){let{configOverride:t,warningLogger:n,storage:r}=e,{oauth_token:i,refresh_token:a,expiration_time:o,scopes:s,api_token:c}=t??r.read()??{};return i?{accessToken:{value:i,expiry:o??`2000-01-01:00:00:00+00:00`},refreshToken:{value:a??``},scopes:s}:c?(!se&&n&&(se=!0,n.warn(`It looks like you have used Wrangler v1's \`config\` command to login with an API token
|
|
3
|
+
from ${t===void 0?r.path():`in-memory config`}.
|
|
4
|
+
This is no longer supported in the current version of Wrangler.
|
|
5
|
+
If you wish to authenticate via an API token then please set the \`CLOUDFLARE_API_TOKEN\` environment variable.`)),{deprecatedApiToken:c}):{}}w(E,`readStoredAuthState`);var ce=o({variableName:`CLOUDFLARE_API_TOKEN`,deprecatedName:`CF_API_TOKEN`}),le=o({variableName:`CLOUDFLARE_API_KEY`,deprecatedName:`CF_API_KEY`}),ue=o({variableName:`CLOUDFLARE_EMAIL`,deprecatedName:`CF_EMAIL`});function de(e){if(e?.allowGlobalAuthKey??!0){let e=le(),t=ue();if(e&&t)return{authKey:e,authEmail:t}}let t=ce();if(t)return{apiToken:t}}w(de,`getAuthFromEnv`);function fe(e){let t=de(e);if(t)return t;let n=E({storage:e.storage,warningLogger:e.warningLogger});if(n.deprecatedApiToken)return{apiToken:n.deprecatedApiToken};if(n.accessToken?.value)return{apiToken:n.accessToken.value}}w(fe,`getAPIToken`);function pe(e){let t=fe(e);if(!t)throw new u(`No API token found.`,{telemetryMessage:`user auth missing api token`});return t}w(pe,`requireApiToken`);var me=/^[A-Za-z0-9_-]+$/;function he(e,t){if(!me.test(e))throw new u(`Invalid account ID "${e}" ${t}. Account IDs may only contain alphanumeric characters, hyphens, and underscores.`,{telemetryMessage:`user account id invalid characters`});return e}w(he,`validateAccountId`);var D=o({variableName:`WRANGLER_AUTH_DOMAIN`,defaultValue:/* @__PURE__ */ w(()=>n()===`staging`?`dash.staging.cloudflare.com`:`dash.cloudflare.com`,`defaultValue`)}),ge=o({variableName:`WRANGLER_AUTH_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/auth`,`defaultValue`)}),_e=o({variableName:`WRANGLER_TOKEN_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/token`,`defaultValue`)}),ve=o({variableName:`WRANGLER_REVOKE_URL`,defaultValue:/* @__PURE__ */ w(()=>`https://${D()}/oauth2/revoke`,`defaultValue`)}),ye=o({variableName:`CLOUDFLARE_ACCOUNT_ID`,deprecatedName:`CF_ACCOUNT_ID`});function be(){let e=ye();if(e)return he(e,"set in the `CLOUDFLARE_ACCOUNT_ID` environment variable")}w(be,`getCloudflareAccountIdFromEnv`);var xe=`/oauth2/device/auth`;function Se(){return`https://${D()}${xe}`}w(Se,`getDeviceAuthUrl`);var Ce=o({variableName:`CLOUDFLARE_ACCESS_CLIENT_ID`}),we=o({variableName:`CLOUDFLARE_ACCESS_CLIENT_SECRET`}),Te=o({variableName:`WRANGLER_CF_AUTHORIZATION_TOKEN`}),Ee=s({variableName:`CLOUDFLARE_AUTH_USE_KEYRING`}),O={},k=/* @__PURE__ */ new Map;function De(e,t){let n=new URL(`https://${e}`);return t&&n.searchParams.set(`cf_workers_preview_token`,t),n.toString()}w(De,`buildProbeUrl`);function Oe(){for(let e of Object.keys(O))delete O[e];k.clear()}w(Oe,`clearAccessCaches`);async function ke(e,t,n){t.debug(`Checking if domain has Access enabled:`,e);let r=JSON.stringify([e,!!n]);if(k.has(r))return t.debug(`Using cached Access switch for:`,e,k.get(r)),k.get(r)??!1;t.debug(`Access switch not cached for:`,e);try{let i=new AbortController,a=setTimeout(()=>{i.abort()},1e3),o=await(0,T.fetch)(De(e,n),{redirect:`manual`,signal:i.signal});clearTimeout(a);let s=!!(o.status===302&&o.headers.get(`location`)?.includes(`cloudflareaccess.com`));return(s||!n)&&(t.debug(`Caching access switch for:`,e),k.set(r,s)),s}catch{return t.debug(`Access probe failed for:`,e),!1}}w(ke,`domainUsesAccess`);async function Ae(e,t){let n=t.logger,r=Ce(),a=we();if(r&&a)return n.debug(`Using Access Service Token headers for domain:`,e),{"CF-Access-Client-Id":r,"CF-Access-Client-Secret":a};if((r!==void 0||a!==void 0)&&n.warn(`Both CLOUDFLARE_ACCESS_CLIENT_ID and CLOUDFLARE_ACCESS_CLIENT_SECRET must be set to use Access Service Token authentication. Only ${r===void 0?`CLOUDFLARE_ACCESS_CLIENT_SECRET`:`CLOUDFLARE_ACCESS_CLIENT_ID`} was found.`),!await ke(e,n,t.previewToken))return{};if(n.debug(`Getting Access headers for domain:`,e),O[e])return n.debug(`Using cached Access headers for domain:`,e),O[e];if((t.isNonInteractiveOrCI??i)())throw new u(`The domain "${e}" is behind Cloudflare Access, but no Access Service Token credentials were found and the current environment is non-interactive.
|
|
6
|
+
Set the CLOUDFLARE_ACCESS_CLIENT_ID and CLOUDFLARE_ACCESS_CLIENT_SECRET environment variables to authenticate with an Access Service Token.
|
|
7
|
+
See https://developers.cloudflare.com/cloudflare-one/access-controls/service-credentials/service-tokens/`,{telemetryMessage:`user access missing service token non interactive`});n.debug(`Spawning cloudflared to get Access token for domain:`);let o=await je(De(e,t.previewToken),t.signal);if(o.error)throw new u("To use Wrangler with Cloudflare Access, please install `cloudflared` from https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation",{telemetryMessage:`user access missing cloudflared`});let s=o.stdout;n.debug(`cloudflared output:`,s);let c=s.match(/fetched your token:\n\n(.*)/m);if(c&&c.length>=2){let t={Cookie:`CF_Authorization=${c[1]}`};return O[e]=t,n.debug(`Caching Access headers for domain:`,e),t}throw Error(`Failed to authenticate with Cloudflare Access`)}w(Ae,`getAccessHeaders`);function je(e,t){return new Promise((n,r)=>{let i=ae(`cloudflared`,[`access`,`login`,e],{signal:t}),a=[];i.stdout.on(`data`,e=>a.push(e)),i.stderr.resume();let o=/* @__PURE__ */ w(()=>i.kill(),`killChild`);process.once(`exit`,o),i.on(`error`,e=>{if(process.removeListener(`exit`,o),t?.aborted){r(e);return}n({error:e,stdout:``})}),i.on(`close`,()=>{if(process.removeListener(`exit`,o),t?.aborted){r(t.reason??/* @__PURE__ */ Error(`The operation was aborted`));return}n({stdout:Buffer.concat(a).toString()})})})}w(je,`spawnCloudflaredAccessLogin`);async function Me(e){let t=Te();return t===void 0?Ae(D(),e):(e.logger.debug(`Using WRANGLER_CF_AUTHORIZATION_TOKEN from environment`),{Cookie:`CF_Authorization=${t}`})}w(Me,`getCloudflareAccessHeaders`);var Ne=96,Pe=32,Fe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`;function Ie(e){let t=btoa(e);return t=t.replace(/\+/g,`-`),t=t.replace(/\//g,`_`),t=t.replace(/=/g,``),t}w(Ie,`base64urlEncode`);async function Le(){let e=new Uint32Array(Ne);S.getRandomValues(e);let t=Ie(Array.from(e).map(e=>Fe[e%Fe.length]).join(``)),n=await S.subtle.digest(`SHA-256`,new te().encode(t)),r=new Uint8Array(n),i=``,a=r.byteLength;for(let e=0;e<a;e++)i+=String.fromCharCode(r[e]);return{codeChallenge:Ie(i),codeVerifier:t}}w(Le,`generatePKCECodes`);var Re=/* @__PURE__ */ w(({verificationUri:e,userCode:t})=>{let n=new URL(e);return n.searchParams.set(`user_code`,t),n.toString()},`generateVerificationUrl`);function ze(e){try{return new URL(e)}catch{return}}w(ze,`parseUrl`);function Be(e,t){let n=ze(e),r=ze(`https://${t.authDomain}`);if(n===void 0||r===void 0||n.protocol!==`https:`||n.username!==``||n.password!==``||n.host!==r.host)throw new u(`The authorization server returned an untrusted \`${t.field}\`: ${e}
|
|
8
|
+
Expected an \`https\` URL on \`${t.authDomain}\`. Refusing to display or open it.`,{telemetryMessage:`user device-flow untrusted verification url`})}w(Be,`assertTrustedVerificationUrl`);var Ve=/* @__PURE__ */ w(({authUrl:e,clientId:t,scopes:n,stateQueryParam:r,codeChallenge:i,redirectUri:a})=>e+`?response_type=code&client_id=${encodeURIComponent(t)}&redirect_uri=${encodeURIComponent(a)}&scope=${encodeURIComponent([...n,`offline_access`].join(` `))}&state=${r}&code_challenge=${encodeURIComponent(i)}&code_challenge_method=S256`,`generateAuthUrl`);function He(e){let t=new Uint32Array(e);return S.getRandomValues(t),Array.from(t).map(e=>Fe[e%Fe.length]).join(``)}w(He,`generateRandomState`);var Ue=64e6;function We(e,t,n){let r=Array(t+1),i=b(`sha256`).update(e).digest();r[0]=i;for(let e=0;e<t;e++){for(let e=0;e<n;e++)i=b(`sha256`).update(i).digest();r[e+1]=i}return r}w(We,`solvePow`);function Ge(e){return Buffer.concat(e).toString(`base64`)}w(Ge,`encodeCheckpoints`);function Ke(e){let t=We(Buffer.from(e.seed,`base64url`),e.k,e.g);return{challengeToken:e.challengeToken,solution:{checkpoints:Ge(t)}}}w(Ke,`solveChallenge`);var A={termsOfService:`https://www.cloudflare.com/terms/`,privacyPolicy:`https://www.cloudflare.com/privacypolicy/`},qe=`You must accept Cloudflare's Terms of Service (${A.termsOfService}) and Privacy Policy (${A.privacyPolicy}) in order to continue. By typing "yes", you agree to these terms. Type "yes" to continue.`,Je=`Continuing means you accept Cloudflare's Terms of Service (${A.termsOfService}) and Privacy Policy (${A.privacyPolicy}).`,Ye=`You must accept Cloudflare's Terms of Service (${A.termsOfService}) and Privacy Policy (${A.privacyPolicy}) to use --temporary.`,Xe=/* @__PURE__ */ new Map([[1035,{message:`The event code is malformed. Check it and try again.`,telemetryMessage:`deploy temporary event code invalid`}],[1036,{message:`The event code was not found. Check it and try again.`,telemetryMessage:`deploy temporary event not found`}],[1037,{message:`This event has not started yet.`,telemetryMessage:`deploy temporary event not started`}],[1038,{message:`This event has ended.`,telemetryMessage:`deploy temporary event expired`}],[1039,{message:`This event is disabled. Contact the event organizer.`,telemetryMessage:`deploy temporary event disabled`}],[1040,{message:`This event has no temporary accounts remaining.`,telemetryMessage:`deploy temporary event exhausted`}],[1041,{message:`The event account could not be prepared. Try again later or contact the event organizer.`,telemetryMessage:`deploy temporary event provisioning unavailable`,fatal:!0}]]);function Ze(e){if(typeof e!=`object`||!e||!(`errors`in e))return;let{errors:t}=e;if(!Array.isArray(t)||t.length===0)return;let[n]=t;if(typeof n==`object`&&n&&`code`in n)return typeof n.code==`number`?n.code:void 0}w(Ze,`getResponseErrorCode`);async function Qe(e){let t;try{t=await e.json()}catch{return}let n=Ze(t);if(n===void 0)return;let r=Xe.get(n);if(!r)return;let i={telemetryMessage:r.telemetryMessage};return r.fatal?new l(r.message,i):new u(r.message,i)}w(Qe,`getEventAccountError`);function $e(){return`${t(r)}/provisioning/previews`}w($e,`getTemporaryPreviewUrl`);function et(){return`${$e()}/challenge`}w(et,`getTemporaryPreviewChallengeUrl`);function tt(e){let t=Date.parse(e);return!Number.isNaN(t)&&t>Date.now()}w(tt,`isFutureTimestamp`);function nt(e){let t=e.read();if(t&&t.account?.id&&t.account?.apiToken&&t.account?.name&&t.claim?.url&&tt(t.account?.expiresAt??``)&&tt(t.claim?.expiresAt??``))return t}w(nt,`getCachedTemporaryPreviewAccount`);async function rt(e){let t=await(0,T.fetch)(et(),{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(!t.ok)throw new l(`Failed to request a proof-of-work challenge (${t.status} ${t.statusText}).`,{telemetryMessage:`deploy temporary account challenge failed`});let n;try{n=await t.json()}catch{throw new l(`Failed to request a proof-of-work challenge. Received an invalid response (${t.status} ${t.statusText}).`,{telemetryMessage:`deploy temporary account challenge invalid response`})}let{challengeToken:r,seed:i,k:a,g:o}=n.result??{};if(r===void 0||i===void 0||a===void 0||o===void 0)throw new l(`Failed to request a proof-of-work challenge because the response was missing required fields.`,{telemetryMessage:`deploy temporary account challenge incomplete`});if(!Number.isInteger(a)||!Number.isInteger(o)||a<=0||o<=0||a*o>Ue||Buffer.from(i,`base64url`).length!==32)throw new l(`The proof-of-work challenge is not supported by this version of Wrangler.`,{telemetryMessage:`deploy temporary account challenge difficulty unsupported`});return e.log(`Solving proof-of-work challenge…`),Ke({challengeToken:r,seed:i,k:a,g:o})}w(rt,`requestPowSolution`);async function it(e,t){let n=await rt(e),r=await(0,T.fetch)($e(),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({termsOfService:A.termsOfService,privacyPolicy:A.privacyPolicy,acceptTermsOfService:`yes`,challengeToken:n.challengeToken,solution:n.solution,...t?.eventCode?{eventCode:t.eventCode}:{}})});if(!r.ok){if(t?.eventCode){let e=await Qe(r);if(e)throw e}throw new l(`Failed to create a temporary preview account (${r.status} ${r.statusText}).`,{telemetryMessage:`deploy temporary account create failed`})}let i;try{i=await r.json()}catch{throw new l(`Failed to create a temporary preview account. Received an invalid response (${r.status} ${r.statusText}).`,{telemetryMessage:`deploy temporary account invalid response`})}let a=i.result,o=a?.account?.id,s=a?.account?.name,c=a?.account?.apiToken,u=a?.account?.expiresAt,d=a?.claim?.url,f=a?.claim?.expiresAt,p=a?.eventCodeAccepted;if(o===void 0||s===void 0||c===void 0||u===void 0||d===void 0||f===void 0)throw new l(`Failed to create a temporary preview account because the response was missing required fields.`,{telemetryMessage:`deploy temporary account response incomplete`});if(t?.eventCode&&p!==!0)throw new l(`Failed to create a temporary preview account because the response did not acknowledge the event code.`,{telemetryMessage:`deploy temporary event acknowledgement missing`});return{account:{id:o,name:s,apiToken:c,expiresAt:u},claim:{url:d,expiresAt:f}}}w(it,`createTemporaryPreviewAccount`);async function at(e){let t=nt(e.storage);if(t){if(e.request?.eventCode)throw new u("A temporary account is already cached. Rerun without --event-code to reuse it, or run `wrangler logout` and retry to create an account for this event.",{telemetryMessage:`deploy temporary event cache conflict`});return{account:t,cached:!0}}if(!await e.prompt(qe,Je))throw new u(Ye,{telemetryMessage:`user temporary terms not accepted`});let n=await it(e.logger,e.request);return e.storage.write(n),{account:n,cached:!1}}w(at,`getOrCreateTemporaryPreviewAccount`);function ot(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
|
|
9
|
+
[ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
|
|
10
|
+
`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
|
|
11
|
+
`)&&(o=String(e).split(`
|
|
12
|
+
`).map(function(e,t){return t===0?e:``+i+e}).join(`
|
|
13
|
+
`)),a+=o+n[t+1]}),a}w(ot,`dedent`);var st=ot,j=class extends u{static{w(this,`ErrorOAuth2`)}code;description;uri;toString(){return`ErrorOAuth2`}},ct=class extends j{static{w(this,`ErrorUnknown`)}toString(){return`ErrorUnknown`}},lt=class extends j{static{w(this,`ErrorAuthServerUnreachable`)}toString(){return`ErrorAuthServerUnreachable`}},ut=class extends j{static{w(this,`ErrorNoAuthCode`)}toString(){return`ErrorNoAuthCode`}},dt=class extends j{static{w(this,`ErrorInvalidReturnedStateParam`)}toString(){return`ErrorInvalidReturnedStateParam`}},ft=class extends j{static{w(this,`ErrorInvalidJson`)}toString(){return`ErrorInvalidJson`}},pt=class extends j{static{w(this,`ErrorInvalidScope`)}toString(){return`ErrorInvalidScope`}},mt=class extends j{static{w(this,`ErrorInvalidRequest`)}toString(){return`ErrorInvalidRequest`}},ht=class extends j{static{w(this,`ErrorInvalidToken`)}toString(){return`ErrorInvalidToken`}},M=class extends j{static{w(this,`ErrorAuthenticationGrant`)}toString(){return`ErrorAuthenticationGrant`}},gt=class extends M{static{w(this,`ErrorUnauthorizedClient`)}toString(){return`ErrorUnauthorizedClient`}},_t=class extends M{static{w(this,`ErrorAccessDenied`)}toString(){return`ErrorAccessDenied`}},vt=class extends M{static{w(this,`ErrorUnsupportedResponseType`)}toString(){return`ErrorUnsupportedResponseType`}},yt=class extends M{static{w(this,`ErrorServerError`)}toString(){return`ErrorServerError`}},bt=class extends M{static{w(this,`ErrorTemporarilyUnavailable`)}toString(){return`ErrorTemporarilyUnavailable`}},xt=class extends j{static{w(this,`ErrorAccessTokenResponse`)}toString(){return`ErrorAccessTokenResponse`}},St=class extends xt{static{w(this,`ErrorInvalidClient`)}toString(){return`ErrorInvalidClient`}},Ct=class extends xt{static{w(this,`ErrorInvalidGrant`)}toString(){return`ErrorInvalidGrant`}},wt=class extends xt{static{w(this,`ErrorUnsupportedGrantType`)}toString(){return`ErrorUnsupportedGrantType`}};function Tt(e,t,n){let r=`OAuth error: ${e}`;return t&&(r+=`
|
|
14
|
+
${t}`),n&&(r+=`
|
|
15
|
+
See: ${n}`),r}w(Tt,`formatOAuthErrorMessage`);function N(e,t,n){let r=Tt(e,t,n),i;switch(e){case`invalid_request`:i=new mt(r,{telemetryMessage:`user oauth invalid request`});break;case`invalid_grant`:i=new Ct(r,{telemetryMessage:`user oauth invalid grant`});break;case`unauthorized_client`:i=new gt(r,{telemetryMessage:`user oauth unauthorized client`});break;case`access_denied`:i=new _t(r,{telemetryMessage:`user oauth access denied`});break;case`unsupported_response_type`:i=new vt(r,{telemetryMessage:`user oauth unsupported response type`});break;case`invalid_scope`:i=new pt(r,{telemetryMessage:`user oauth invalid scope`});break;case`server_error`:i=new yt(r,{telemetryMessage:`user oauth server error`});break;case`temporarily_unavailable`:i=new bt(r,{telemetryMessage:`user oauth temporarily unavailable`});break;case`invalid_client`:i=new St(r,{telemetryMessage:`user oauth invalid client`});break;case`unsupported_grant_type`:i=new wt(r,{telemetryMessage:`user oauth unsupported grant type`});break;case`invalid_json`:i=new ft(r,{telemetryMessage:`user oauth invalid json`});break;case`invalid_token`:i=new ht(r,{telemetryMessage:`user oauth invalid token`});break;default:i=new ct(r,{telemetryMessage:`user oauth unknown error`})}return i.code=e,i.description=t,i.uri=n,i}w(N,`toErrorClass`);function Et(e,t,n){if(e.error)throw N(Array.isArray(e.error)?e.error[0]:e.error,Array.isArray(e.error_description)?e.error_description[0]:e.error_description,Array.isArray(e.error_uri)?e.error_uri[0]:e.error_uri);let r=e.code;if(!r)return!1;if(e.state!==t.stateQueryParam)throw n.warn(`Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.`),new dt(``,{telemetryMessage:`user oauth invalid returned state`});return y(!Array.isArray(r)),t.authorizationCode=r,t.hasAuthCodeBeenExchangedForAccessToken=!1,!0}w(Et,`isReturningFromAuthServer`);async function Dt(e,t,n,r,i){let{codeChallenge:a,codeVerifier:o}=await Le(),s=i.generateRandomState(Pe);return Object.assign(r,{codeChallenge:a,codeVerifier:o,stateQueryParam:s}),i.generateAuthUrl({authUrl:ge(),clientId:t,scopes:e,stateQueryParam:s,codeChallenge:a,redirectUri:n})}w(Dt,`getAuthURL`);async function Ot(e,t,n,r){let i=E({warningLogger:e,storage:r}).refreshToken;i||e.warn(`No refresh token is present.`);let a=await At(new URLSearchParams({grant_type:`refresh_token`,refresh_token:i?.value??``,client_id:n}),e,t);if(a.status>=400){let t;try{t=await P(a,e)}catch(t){e.error(t)}throw t===void 0?new ct(`Failed to parse Error from exchangeRefreshTokenForAccessToken`,{telemetryMessage:`user oauth refresh token exchange parse error`}):typeof t==`string`?Error(t):t}try{let t=await P(a,e);if(`error`in t)throw t.error;let{access_token:n,expires_in:r,refresh_token:o,scope:s}=t;return{token:{value:n,expiry:new Date(Date.now()+r*1e3).toISOString()},scopes:s?s.split(` `):[],refreshToken:o?{value:o}:i}}catch(e){throw typeof e==`string`?N(e):e}}w(Ot,`exchangeRefreshTokenForAccessToken`);async function kt(e,t,n,r,i){let{authorizationCode:a,codeVerifier:o=``}=e;o?a||t.warn(`No authorization grant code is being passed.`):t.warn(`No code verifier is being sent.`);let s=await At(new URLSearchParams({grant_type:`authorization_code`,code:a??``,redirect_uri:i,client_id:r,code_verifier:o}),t,n);if(!s.ok){let{error:e}=await P(s,t);throw e===`invalid_grant`&&t.log(`Expired! Auth code or refresh token needs to be renewed.`),N(e)}let c=await P(s,t);if(`error`in c)throw N(c.error);let{access_token:l,expires_in:u,refresh_token:d,scope:f}=c;return e.hasAuthCodeBeenExchangedForAccessToken=!0,{token:{value:l,expiry:new Date(Date.now()+u*1e3).toISOString()},scopes:f?f.split(` `):[],refreshToken:d?{value:d}:void 0}}w(kt,`exchangeAuthCodeForAccessToken`);async function At(e,t,n){let r={"Content-Type":`application/x-www-form-urlencoded`};if(t.debug(`fetching auth token`,`grant_type=${e.get(`grant_type`)??`<unknown>`}`),await ke(D(),t)){t.debug(`Using Cloudflare Access to get an access token for the auth request`);let e=await Me({logger:t,isNonInteractiveOrCI:n});Object.assign(r,e)}t.debug(`Fetching auth token from`,_e());try{let n=await(0,T.fetch)(_e(),{method:`POST`,body:e.toString(),headers:r});return n.ok||t.debug(`Failed to fetch auth token:`,n.status,n.statusText),n}catch(e){t.debug(`Failed to fetch auth token:`,e);let n=e?.cause,r=typeof n?.code==`string`?` (${n.code})`:``;throw new lt(`Could not reach the Cloudflare auth server at ${_e()}${r}.`,{cause:e,telemetryMessage:`user oauth token endpoint unreachable`})}}w(At,`fetchAuthToken`);async function P(e,t){let n=await e.text();try{return JSON.parse(n)}catch(r){throw n.match(/<!DOCTYPE html>/)&&(t.error(`The body of the response was HTML rather than JSON. Check the debug logs to see the full body of the response.`),n.match(/challenge-platform/)&&t.error(`It looks like you might have hit a bot challenge page. This may be transient but if not, please contact Cloudflare to find out what can be done. When you contact Cloudflare, please provide your Ray ID: ${e.headers.get(`cf-ray`)}`)),t.debug(`Full body of response
|
|
16
|
+
|
|
17
|
+
`,n),Error(`Invalid JSON in response: status: ${e.status} ${e.statusText}`,{cause:r})}}w(P,`getJSONFromResponse`);async function jt(e,t,n,r){let i=await Dt(e.scopes,e.clientId,e.redirectUri,t,r),a=new URL(e.redirectUri).pathname,o,s,c=new Promise((e,t)=>{s=setTimeout(()=>{o.close(),clearTimeout(s),t(new u(`Timed out waiting for authorization code, please try again.`,{telemetryMessage:`user oauth authorization timeout`}))},12e4)}),l=new Promise((r,i)=>{o=ne.createServer(async(c,l)=>{function d(e,t){clearTimeout(s),l.writableEnded||l.end(),o.close(n=>{t||n?i(t||n):(y(e),r(e))})}w(d,`finish`);function f(e){let t=/* @__PURE__ */ w(e=>e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]),`escape`),n=`<!doctype html>
|
|
18
|
+
<html lang="en">
|
|
19
|
+
<head>
|
|
20
|
+
<meta charset="utf-8" />
|
|
21
|
+
<title>Wrangler login failed</title>
|
|
22
|
+
<style>
|
|
23
|
+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; max-width: 720px; margin: 4rem auto; padding: 0 1rem; color: #1f2933; line-height: 1.5; }
|
|
24
|
+
h1 { color: #c12d3f; }
|
|
25
|
+
code { background: #f5f7fa; padding: 0.15em 0.3em; border-radius: 3px; }
|
|
26
|
+
p.detail { background: #f5f7fa; padding: 1rem; border-radius: 4px; white-space: pre-wrap; }
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<h1>Wrangler login failed</h1>
|
|
31
|
+
<p>The Cloudflare OAuth provider returned an error.</p>
|
|
32
|
+
${e.code?`<p>Code: <code>${t(e.code)}</code></p>`:``}
|
|
33
|
+
${e.description?`<p class="detail">${t(e.description)}</p>`:``}
|
|
34
|
+
<p>You can close this tab and return to your terminal for more details.</p>
|
|
35
|
+
</body>
|
|
36
|
+
</html>`;l.writeHead(400,{"Content-Type":`text/html; charset=utf-8`}),l.end(n)}w(f,`renderErrorPage`),y(c.url,`This request doesn't have a URL`);let{pathname:p,query:m}=ee.parse(c.url,!0);if(c.method!==`GET`)return l.end(`OK`);switch(p){case a:{let r=!1;try{r=Et(m,t,n.logger)}catch(t){if(t instanceof _t){l.writeHead(307,{Location:e.denied.url}),l.end(()=>{d(null,new u(e.denied.error,{telemetryMessage:`user oauth consent denied`}))});return}let n=t;f({code:n.code,description:n.description??n.message}),d(null,n);return}if(!r){let e=`The Cloudflare OAuth provider did not return an authorisation code.`;f({description:e}),d(null,new ut(e,{telemetryMessage:`user oauth missing auth code`}));return}try{let r=await kt(t,n.logger,n.isNonInteractiveOrCI,e.clientId,e.redirectUri);l.writeHead(307,{Location:e.granted.url}),l.end(()=>{d(r)})}catch(e){let t=e,n=t instanceof j;f({code:n?t.code:void 0,description:(n?t.description:void 0)??t.message??`Failed to exchange the authorisation code for an access token.`}),d(null,t)}return}}});let c=new URL(e.redirectUri),l=Number(c.port||(c.protocol===`https:`?443:80));(c.hostname!==e.callbackHost||l!==e.callbackPort)&&(n.logger.log(`Temporary login server listening on ${e.callbackHost}:${e.callbackPort}`),n.logger.log(`Note that the OAuth login page will always redirect to \`${e.redirectUri}\`.
|
|
37
|
+
If you have changed the callback host or port because you are running in a container, then ensure that you have port forwarding set up correctly.`)),o.once(`error`,t=>{clearTimeout(s),t.code===`EADDRINUSE`?i(new u(`The OAuth callback server could not bind to ${e.callbackHost}:${e.callbackPort} because the port is already in use. Stop the process using that port or pass a different \`--callback-port\`.`,{telemetryMessage:`user oauth callback port in use`})):i(t)}),o.listen(e.callbackPort,e.callbackHost)});return e.browser?(n.logger.log(`Opening a link in your default browser: ${i}`),await n.openInBrowser(i)):n.logger.log(`Visit this link to authenticate: ${i}`),Promise.race([c,l])}w(jt,`getOauthToken`);var Mt=300,Nt=1;function F(e,t){if(typeof e!=`object`||!e)return;let n=e[t];return typeof n==`string`&&n!==``?n:void 0}w(F,`getStringMember`);function I(e,t){if(typeof e!=`object`||!e)return;let n=e[t];return typeof n==`number`&&Number.isFinite(n)&&n>0?n:void 0}w(I,`getPositiveNumberMember`);function Pt(e,t){let n=`HTTP ${e.status} ${e.statusText}`.trim(),r=F(t,`error_description`);return r?`${n}: ${r}`:n}w(Pt,`describeUnusableResponse`);function Ft(e){return e>=500||e===429}w(Ft,`isRetryableStatus`);function It(e){let t=F(e,`device_code`),n=F(e,`user_code`),r=F(e,`verification_uri`),i=I(e,`expires_in`);if(t&&n&&r&&i!==void 0)return{device_code:t,user_code:n,verification_uri:r,verification_uri_complete:F(e,`verification_uri_complete`),expires_in:i,interval:I(e,`interval`)}}w(It,`asDeviceAuthorizationResponse`);async function L(e,t){let n=await e.text();try{return JSON.parse(n)}catch(r){throw n.match(/<!DOCTYPE html>/)&&(t.debug(`The body of the response was HTML rather than JSON. Check the debug logs to see the full body of the response.`),n.match(/challenge-platform/)&&t.debug(`It looks like you might have hit a bot challenge page. This may be transient but if not, please contact Cloudflare to find out what can be done. When you contact Cloudflare, please provide your Ray ID: ${e.headers.get(`cf-ray`)}`)),t.debug(`Full body of response
|
|
38
|
+
|
|
39
|
+
`,n),Error(`Invalid JSON in response: status: ${e.status} ${e.statusText}`,{cause:r})}}w(L,`readJson`);async function Lt(e,t){let n={"Content-Type":`application/x-www-form-urlencoded`};return await ke(D(),e)&&(e.debug(`Using Cloudflare Access to get an access token for the device authorization request`),Object.assign(n,await Me({logger:e,isNonInteractiveOrCI:t}))),n}w(Lt,`buildDeviceAuthHeaders`);async function Rt(e,t,n,r){let i=new URLSearchParams({client_id:t,scope:[...e,`offline_access`].join(` `)}),a=await Lt(n,r),o=Se();n.debug(`Fetching device authorization from`,o);let s=await(0,T.fetch)(o,{method:`POST`,body:i.toString(),headers:a});if(!s.ok){let e=await L(s,n).catch(()=>void 0);throw N(e&&typeof e==`object`&&`error`in e?String(e.error):`HTTP ${s.status} ${s.statusText}`)}let c=await L(s,n),l=It(c);if(l===void 0)throw n.debug(`Unusable device authorization response body:`,c),new u(`The device authorization endpoint returned a response that could not be interpreted (${Pt(s,c)}).
|
|
40
|
+
Enable debug logging to see the full response.`,{telemetryMessage:`user device-flow unusable device authorization response`});return l}w(Rt,`requestDeviceAuthorization`);async function zt(e,t,n,r){let i=await At(new URLSearchParams({grant_type:`urn:ietf:params:oauth:grant-type:device_code`,device_code:e,client_id:t}),n,r),a=await L(i,n),o=F(a,`error`);if(o!==void 0)return{kind:`oauth-error`,error:o};let s=F(a,`access_token`),c=I(a,`expires_in`);return!i.ok||s===void 0||c===void 0?(n.debug(`Unusable token response body:`,a),{kind:`unexpected`,detail:Pt(i,a),retryable:!i.ok&&Ft(i.status)}):{kind:`token`,grant:{access_token:s,expires_in:c,refresh_token:F(a,`refresh_token`),scope:F(a,`scope`)}}}w(zt,`pollDeviceToken`);function Bt(e){return new Promise(t=>setTimeout(t,e*1e3))}w(Bt,`sleep`);async function Vt(e,t){let{logger:n,openInBrowser:r,isNonInteractiveOrCI:i}=t,a=await Rt(e.scopes,e.clientId,n,i),o=D();Be(a.verification_uri,{field:`verification_uri`,authDomain:o}),a.verification_uri_complete!==void 0&&Be(a.verification_uri_complete,{field:`verification_uri_complete`,authDomain:o});let s=a.verification_uri_complete??Re({verificationUri:a.verification_uri,userCode:a.user_code}),c=Math.min(a.expires_in,Mt);n.log(st`
|
|
41
|
+
To authorize ${t.displayName}, please visit:
|
|
42
|
+
|
|
43
|
+
${a.verification_uri}
|
|
44
|
+
|
|
45
|
+
and enter the code:
|
|
46
|
+
|
|
47
|
+
${a.user_code}
|
|
48
|
+
|
|
49
|
+
You have ${Ht(c)} to approve this request.
|
|
50
|
+
`),e.browser&&(n.log(`
|
|
51
|
+
Opening a link in your default browser: ${s}`),await r(s));let l=Date.now()+c*1e3,d=Math.max(a.interval??Nt,Nt),f=!0,p;for(;Date.now()<l;){f||await Bt(d),f=!1;let r;try{r=await zt(a.device_code,e.clientId,n,i)}catch(e){n.debug(`Ignoring transient error while polling for token:`,e),p=e instanceof Error?e.message:String(e);continue}if(r.kind===`unexpected`){if(!r.retryable)throw new u(`The token endpoint returned a response that could not be interpreted (${r.detail}).
|
|
52
|
+
Enable debug logging to see the full response.`,{telemetryMessage:`user device-flow unusable token response`});n.debug(`Ignoring transient response while polling for token:`,r.detail),p=r.detail;continue}if(p=void 0,r.kind===`oauth-error`)switch(r.error){case`authorization_pending`:continue;case`slow_down`:d+=5;continue;case`access_denied`:throw new u(`Consent denied. You must grant consent to ${t.displayName} in order to login.
|
|
53
|
+
If you don't want to do this consider passing an API token via the \`CLOUDFLARE_API_TOKEN\` environment variable.`,{telemetryMessage:`user device-flow consent denied`});case`expired_token`:throw new u(`Device code expired before the request was approved. Please run \`${t.deviceLoginCommand}\` again to obtain a new code.`,{telemetryMessage:`user device-flow code expired`});default:throw N(r.error)}let{grant:o}=r;return{token:{value:o.access_token,expiry:new Date(Date.now()+o.expires_in*1e3).toISOString()},scopes:o.scope?o.scope.split(` `):[],refreshToken:o.refresh_token?{value:o.refresh_token}:void 0}}throw p===void 0?new u(`Device authorization timed out after ${Ht(c)}. Please run \`${t.deviceLoginCommand}\` again to obtain a new code.`,{telemetryMessage:`user device-flow authorization timeout`}):new u(`Gave up waiting for device authorization: the token endpoint kept returning responses that could not be interpreted (last: ${p}).
|
|
54
|
+
Enable debug logging to see the full response, then run \`${t.deviceLoginCommand}\` to try again.`,{telemetryMessage:`user device-flow poll failed`})}w(Vt,`getOauthTokenViaDeviceFlow`);function Ht(e){if(e<60)return`${e} seconds`;let t=Math.floor(e/60),n=t===1?`minute`:`minutes`,r=e%60;return r===0?`${t} ${n}`:r==59?`${t+1} ${n}`:`${t} ${n} and ${r} ${r===1?`second`:`seconds`}`}w(Ht,`toHumanPeriod`);function Ut(e){let t={},n={generateAuthUrl:e.generateAuthUrl??Ve,generateRandomState:e.generateRandomState??He},r=`default`;function i(t){return e.storageFactory(t??r)}w(i,`getStorage`);let o=/* @__PURE__ */ w(()=>typeof e.clientId==`function`?e.clientId():e.clientId,`getClientId`),s=e.consent,c,l,d=new URL(e.redirectUri),f=d.hostname,p=Number(d.port);async function m(r){if(e.hasEnvCredentials())return e.logger.error(`You are logged in with an API Token. Unset the CLOUDFLARE_API_TOKEN in the environment to log in via OAuth.`),!1;let c=a(r.complianceConfig);if(c===`fedramp_high`){let e=r.complianceConfig?.compliance_region?"`compliance_region` configuration property":"`CLOUDFLARE_API_ENVIRONMENT` environment variable";throw new u(st`
|
|
55
|
+
OAuth login is not supported in the \`${c}\` compliance region.
|
|
56
|
+
Please use a Cloudflare API token (\`CLOUDFLARE_API_TOKEN\` environment variable) or remove the ${e}.
|
|
57
|
+
`,{telemetryMessage:`user login unsupported compliance region`})}let l;return r.device?(e.logger.log(`Attempting to login via OAuth Device Authorization Grant...`),l=await Vt({browser:r.browser??!0,scopes:r.scopes,clientId:o()},e)):(e.logger.log(`Attempting to login via OAuth...`),l=await jt({browser:r.browser??!0,scopes:r.scopes,clientId:o(),redirectUri:e.redirectUri,denied:s.denied,granted:s.granted,callbackHost:r.callbackHost??f,callbackPort:r.callbackPort??p},t,e,n)),i(r.profile).write({oauth_token:l.token?.value??``,expiration_time:l.token?.expiry,refresh_token:l.refreshToken?.value,scopes:l.scopes}),e.logger.log(`Successfully logged in.`),x(),e.purgeOnLoginOrLogout?.(),!0}w(m,`login`);function h(t){if(e.hasEnvCredentials())return!1;let{accessToken:n}=E({warningLogger:e.logger,storage:i(t)});return!!(n&&/* @__PURE__ */ new Date>=new Date(n.expiry))}w(h,`isRefreshNeeded`);async function g(t){let n=i(t);try{let{token:{value:t,expiry:r}={value:``,expiry:``},refreshToken:{value:i}={},scopes:a}=await Ot(e.logger,e.isNonInteractiveOrCI,o(),n);return n.write({oauth_token:t,expiration_time:r,refresh_token:i,scopes:a}),`refreshed`}catch(t){return e.logger.debug(`Token refresh failed: ${t instanceof Error?t.message:String(t)}`),t instanceof lt?`unreachable`:`rejected`}}w(g,`refreshToken`);async function _(t){if(e.hasEnvCredentials())return{loggedIn:!0};let n=E({warningLogger:e.logger,storage:i(t.profile)});if(!n.accessToken&&!n.deprecatedApiToken)return e.isNonInteractiveOrCI()?{loggedIn:!1,reason:`no-credentials-non-interactive`}:await m(t)?{loggedIn:!0}:{loggedIn:!1,reason:`no-credentials-login-failed`};if(h(t.profile)){let n=await g(t.profile);return n===`refreshed`?{loggedIn:!0}:n===`unreachable`?{loggedIn:!1,reason:`token-refresh-unreachable`}:e.isNonInteractiveOrCI()?{loggedIn:!1,reason:`token-expired-non-interactive`}:await m(t)?{loggedIn:!0}:{loggedIn:!1,reason:`token-expired-login-failed`}}return{loggedIn:!0}}w(_,`loginOrRefreshIfRequired`);async function v(t){let n=x();if(e.hasEnvCredentials()){e.logger.log(`You are logged in with an API Token. Unset the CLOUDFLARE_API_TOKEN in the environment to log out.`);return}let r=E({warningLogger:e.logger,storage:i(t)}).refreshToken;if(!r){e.logger.log(n?`Cleared temporary preview account.`:`Not logged in, exiting...`);return}let a=`client_id=${encodeURIComponent(o())}&token_type_hint=refresh_token&token=${encodeURIComponent(r.value||``)}`;await(await(0,T.fetch)(ve(),{method:`POST`,body:a,headers:{"Content-Type":`application/x-www-form-urlencoded`}})).text(),i(t).clear(),e.logger.log(`Successfully logged out.`),e.purgeOnLoginOrLogout?.()}w(v,`logout`);async function ee(){let t=E({warningLogger:e.logger,storage:i()});if(t.accessToken){if(t.accessToken&&/* @__PURE__ */ new Date>=new Date(t.accessToken.expiry)){if(await g()!==`refreshed`)return;t=E({warningLogger:e.logger,storage:i()})}return t.accessToken?.value}}w(ee,`getOAuthTokenFromLocalState`);function y(){return l?{apiToken:l.account.apiToken}:fe({storage:i(),warningLogger:e.logger,allowGlobalAuthKey:e.allowGlobalAuthKey})}w(y,`getAPITokenInternal`);function te(){return l?{apiToken:l.account.apiToken}:pe({storage:i(),warningLogger:e.logger,allowGlobalAuthKey:e.allowGlobalAuthKey})}w(te,`requireApiTokenInternal`);function ne(t,n){c=t&&e.temporary!==void 0?n??{}:void 0,l=void 0}w(ne,`setTemporaryAllowed`);function re(){return c!==void 0}w(re,`isTemporaryAllowed`);function ie(){return l}w(ie,`getActiveTemporaryAccount`);async function b(){if(!e.temporary)throw new u(`Temporary preview accounts are not supported by this CLI.`,{telemetryMessage:`user temporary account unsupported`});let t=await at({...e.temporary,logger:e.logger,...c?{request:c}:{}});return l=t.account,t}w(b,`activateTemporaryAccount`);function x(){return l=void 0,e.temporary?.storage.clear()??!1}w(x,`clearTemporaryAccount`);function S(e){r=e}w(S,`setProfile`);function ae(){return r}w(ae,`getActiveProfile`);function C(){return E({warningLogger:e.logger,storage:i()}).scopes}return w(C,`getScopes`),{setProfile:S,getActiveProfile:ae,login:m,logout:v,loginOrRefreshIfRequired:_,getOAuthTokenFromLocalState:ee,getAPIToken:y,requireApiToken:te,getScopes:C,setTemporaryAllowed:ne,isTemporaryAllowed:re,getActiveTemporaryAccount:ie,activateTemporaryAccount:b}}w(Ut,`createOAuthFlow`);var Wt=[`default`,`staging`];function Gt(e){let t={read(){return e.bindings.read()},write(t){e.bindings.write(t)},activate(t,n){let r=v.resolve(n),i=e.bindings.read();i[r]=t,e.bindings.write(i)},deactivate(t){let n=v.resolve(t),r=e.bindings.read(),i=r[n];if(i===void 0){let e=qt(n,r);throw e?new u(`No profile is directly bound to "${Kt(n)}". The active profile "${e.profile}" is bound at "${Kt(e.dir)}". Run the deactivate command from that directory instead.`,{telemetryMessage:`auth deactivate wrong directory`}):new u(`No profile is bound to "${Kt(n)}". Nothing to deactivate.`,{telemetryMessage:`auth deactivate no binding`})}delete r[n],e.bindings.write(r);let a=qt(n,r);return a?{removedProfile:i,newResolution:{profile:a.profile,source:`inherited from ${a.dir}`}}:e.configs.exists(`default`)?{removedProfile:i,newResolution:{profile:`default`,source:`default profile`}}:{removedProfile:i,newResolution:{profile:void 0,source:`no profile`}}},getProfileForDirectory(t){return qt(t,e.bindings.read())?.profile},getBindingsForProfile(t){return Object.entries(e.bindings.read()).filter(([,e])=>e===t).map(([e])=>e)},removeAllBindingsForProfile(t){let n=e.bindings.read(),r=[];for(let[e,i]of Object.entries(n))i===t&&(r.push(e),delete n[e]);return r.length>0&&e.bindings.write(n),r}};return{configs:e.configs,bindings:t,resolve(e){return e.profile?e.profile==="default"?`default`:(R(e.profile),e.profile):t.getProfileForDirectory(e.cwd)||`default`}}}w(Gt,`createProfileStore`);function R(e){if(Wt.includes(e.toLowerCase()))throw new u(`"${e}" is a reserved profile name. Use the login and logout commands to manage the default profile, which applies as a global fallback.`,{telemetryMessage:`auth profile reserved name`});if(!/^[a-zA-Z0-9_-]+$/.test(e))throw new u(`Invalid profile name "${e}". Profile names may only contain alphanumeric characters, hyphens, and underscores.`,{telemetryMessage:`auth profile invalid name`})}w(R,`validateProfileName`);function Kt(e){return v.relative(process.cwd(),e)||`.`}w(Kt,`formatDirectoryForUserError`);function qt(e,t){let n=v.resolve(e),r=Object.entries(t).sort(([e],[t])=>t.length-e.length);for(let[e,t]of r)if(n===e||n.startsWith(e)&&n[e.length]===v.sep)return{profile:t,dir:e}}w(qt,`getProfileForDirectoryFromBindings`);var Jt=/^[a-z0-9-_]+$/i,Yt=!!``.isWellFormed;function z(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(typeof e.getUTCDate==`function`&&e instanceof Date)return`date`;if(globalThis.Temporal){if(e.until){if(e instanceof Temporal.ZonedDateTime)return`temporal/tz+uc`;if(e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainDate)return`temporal/uc`;if(e instanceof Temporal.PlainTime||e instanceof Temporal.Instant)return`temporal`;if(e instanceof Temporal.PlainYearMonth)return`temporal/x`}else if(e.toPlainDate&&e instanceof Temporal.PlainMonthDay||e.negated&&e instanceof Temporal.Duration)return`temporal/x`}}return t}w(z,`extendedTypeOf`);function Xt(e){for(let t=0;t<e.length;t++)if(z(e[t])!==`object`)return!1;return e.length!=0}w(Xt,`isArrayOfTables`);function Zt(e){return JSON.stringify(e).replaceAll(``,`\\u007f`)}w(Zt,`formatWellFormedStringUnchecked`);function Qt(e){return Zt(Yt?e.toWellFormed():e)}w(Qt,`formatString`);function $t(e){if(Jt.test(e))return e;if(Yt&&!e.isWellFormed())throw RangeError(`key contains illegal lone surrogates`);return Zt(e)}w($t,`formatKey`);function B(e,t,n,r,i){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);switch(t){case`number`:if(isNaN(e))return`nan`;if(e===1/0)return`inf`;if(e===-1/0)return`-inf`;if(Number.isInteger(e)&&(r||!Number.isSafeInteger(e)))return e.toFixed(1);case`bigint`:case`boolean`:case`temporal`:return e.toString();case`string`:return Qt(e);case`date`:if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString();case`object`:return en(e,n,r,i);case`array`:return tn(e,n,r,i);case`temporal/tz+uc`:if(i){let t=e.timeZoneId,n=t.charCodeAt(0);if(n!==43&&n!==45&&(n!==85&&n!==71&&n!==90&&n!==69||t!==`UTC`&&t!==`UCT`&&t!==`Universal`&&t!==`Zulu`&&!t.startsWith(`GMT`)&&t!==`Greenwich`&&!t.startsWith(`Etc/`)))throw TypeError(`Temporal objects with an IANA timezone are not allowed in Temporal strict mode`)}case`temporal/uc`:if(i&&e.calendarId!==`iso8601`)throw TypeError(`Temporal objects with a non-default calendar are not allowed in Temporal strict mode`);return e.toString({calendarName:`never`,timeZoneName:`never`});case`temporal/x`:throw TypeError(`Unsupported `+e[Symbol.toStringTag])}}w(B,`stringifyValue`);function en(e,t,n,r){let i=Object.keys(e);if(i.length===0)return`{}`;let a=`{ `;for(let o=0;o<i.length;o++){let s=i[o];o&&(a+=`, `),a+=$t(s)+` = `+B(e[s],z(e[s]),t-1,n,r)}return a+` }`}w(en,`stringifyInlineTable`);function tn(e,t,n,r){if(e.length===0)return`[]`;let i=`[ `;for(let a=0;a<e.length;a++){if(a&&(i+=`, `),e[a]===null||e[a]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);i+=B(e[a],z(e[a]),t-1,n,r)}return i+` ]`}w(tn,`stringifyArray`);function nn(e,t,n,r,i){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``;for(let o=0;o<e.length;o++)a+=`${a&&`
|
|
58
|
+
`}[[${t}]]
|
|
59
|
+
`,a+=V(0,e[o],t,n,r,i);return a}w(nn,`stringifyArrayTable`);function V(e,t,n,r,i,a){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let o=``,s=``,c=Object.keys(t);for(let e=0;e<c.length;e++){let l=c[e];if(t[l]!==null&&t[l]!==void 0){let e=z(t[l]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let c=$t(l);if(e===`array`&&Xt(t[l]))s+=(s&&`
|
|
60
|
+
`)+nn(t[l],n?`${n}.${c}`:c,r-1,i,a);else if(e===`object`){let e=n?`${n}.${c}`:c;s+=(s&&`
|
|
61
|
+
`)+V(e,t[l],e,r-1,i,a)}else o+=c,o+=` = `,o+=B(t[l],e,r,i,a),o+=`
|
|
62
|
+
`}}return e&&(o||!s)&&(o=o?`[${e}]
|
|
63
|
+
${o}`:`[${e}]`),o&&s?`${o}
|
|
64
|
+
${s}`:o||s}w(V,`stringifyTable`);function rn(e,{maxDepth:t=1e3,numbersAsFloat:n=!1,strictTemporal:r=!1}={}){if(z(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let i=V(0,e,``,t,n,r);return i[i.length-1]===`
|
|
65
|
+
`?i:i+`
|
|
66
|
+
`}w(rn,`stringify`);var an={toml:{parse:/* @__PURE__ */ w(e=>c(e),`parse`),stringify:/* @__PURE__ */ w(e=>rn(e),`stringify`)},json:{parse:/* @__PURE__ */ w(e=>JSON.parse(e),`parse`),stringify:/* @__PURE__ */ w(e=>JSON.stringify(e,null,` `),`stringify`)}};function H(e,t){return an[e].parse(t)}w(H,`parseFile`);function U(e,t){return an[e].stringify(t)}w(U,`stringifyFile`);var on=`config`;function W(e){if(e===void 0||e==="default"){let e=n();return e===`production`?`default`:e}return R(e),e}w(W,`resolveAuthProfileBaseName`);function G(e,t,n=`toml`){return v.join(e,on,`${W(t)}.${n}`)}w(G,`getAuthConfigFilePath`);var K=class{constructor(e,t,n=`toml`){this.configPath=e,this.profile=t,this.format=n}static{w(this,`FileCredentialStore`)}kind=`file`;filePath(){return G(this.configPath,this.profile,this.format)}read(){let e=this.filePath();if(m(e))return H(this.format,d(e))}write(e){let t=this.filePath();h(v.dirname(t),{recursive:!0}),_(t,U(this.format,e),{encoding:`utf-8`,mode:384}),p(t,384)}clear(){let e=this.filePath(),t=m(e);return t&&g(e),t}path(){return this.filePath()}describe(){return this.filePath()}},q=32,sn=12,cn=16,ln=`AES-256-GCM`,un=`aes-256-gcm`;function dn(){return new Uint8Array(x(q))}w(dn,`generateKey`);function fn(e,t){if(t.length!==q)throw Error(`AES-256-GCM requires a ${q}-byte key (got ${t.length} bytes).`);let n=x(sn),r=re(un,t,n),i=Buffer.concat([r.update(e,`utf-8`),r.final()]),a=r.getAuthTag();return{v:1,alg:ln,iv:n.toString(`base64`),tag:a.toString(`base64`),ciphertext:i.toString(`base64`)}}w(fn,`encryptString`);function pn(e,t){if(t.length!==q)throw Error(`AES-256-GCM requires a ${q}-byte key (got ${t.length} bytes).`);if(e.v!==1)throw Error(`Unsupported encrypted envelope version: ${e.v}.`);let n=Buffer.from(e.iv,`base64`),r=Buffer.from(e.tag,`base64`),i=Buffer.from(e.ciphertext,`base64`);if(n.length!==sn)throw Error(`Expected ${sn}-byte IV in envelope (got ${n.length} bytes).`);if(r.length!==cn)throw Error(`Expected ${cn}-byte auth tag in envelope (got ${r.length} bytes).`);let a=ie(un,t,n);return a.setAuthTag(r),Buffer.concat([a.update(i),a.final()]).toString(`utf-8`)}w(pn,`decryptString`);function mn(e){if(typeof e!=`object`||!e)return;let t=e;if(t.v===1&&t.alg===ln&&typeof t.iv==`string`&&typeof t.tag==`string`&&typeof t.ciphertext==`string`)return t}w(mn,`parseEncryptedEnvelope`);function J(e,t){return v.join(e,`config`,`${W(t)}.enc`)}w(J,`getEncryptedAuthConfigFilePath`);var hn=class{constructor(e,t,n,r,i=`toml`){this.configPath=e,this.keyProvider=t,this.onPlaintextMigration=n,this.profile=r,this.format=i}static{w(this,`EncryptedFileCredentialStore`)}kind=`encrypted-file`;plaintextPath(){return G(this.configPath,this.profile,this.format)}read(){let e=J(this.configPath,this.profile);if(m(e))return this.readEncryptedFile(e);let t=this.plaintextPath();if(m(t))return this.migrateFromPlaintext(t,e)}write(e){let t=this.ensureKey(),n=fn(U(this.format,e),t),r=J(this.configPath,this.profile);h(v.dirname(r),{recursive:!0}),_(r,JSON.stringify(n,null,` `),{encoding:`utf-8`,mode:384}),p(r,384);let i=this.plaintextPath();m(i)&&g(i)}clear(){let e=J(this.configPath,this.profile),t=this.plaintextPath(),n=!1;m(e)&&(g(e),n=!0),m(t)&&(g(t),n=!0);try{this.keyProvider.deleteKey()}catch{}return n}path(){return J(this.configPath,this.profile)}describe(){return`Encrypted file (${J(this.configPath,this.profile)}) with key in ${this.keyProvider.describe()}`}readEncryptedFile(e){let t=this.keyProvider.getKey();if(t===void 0)return;let n=d(e),r;try{r=mn(JSON.parse(n))}catch{return}if(r===void 0)return;let i;try{i=pn(r,t)}catch{return}try{return H(this.format,i)}catch{return}}migrateFromPlaintext(e,t){let n=d(e),r;try{r=H(this.format,n)}catch{return}return this.write(r),this.onPlaintextMigration?.({plaintextPath:e,encryptedPath:t,keyProviderDescription:this.keyProvider.describe()}),r}ensureKey(){let e=this.keyProvider.getKey();if(e!==void 0)return e;let t=dn();return this.keyProvider.setKey(t),t}},Y=`1.3.0`;function gn(e){return C(`npm`,e,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`pipe`],shell:process.platform===`win32`})}w(gn,`defaultNpmRunner`);var _n=gn,X=/* @__PURE__ */ new Map;function vn(e){_n=e??gn,X.clear()}w(vn,`setNpmRunner`);function yn(e){return v.join(e,`native`,`keyring`)}w(yn,`getKeyringInstallDir`);function bn(e){return v.join(e,`node_modules`,`@napi-rs`,`keyring`)}w(bn,`getInstalledBindingPath`);function xn(e){try{return f(e)(e),!0}catch{return!1}}w(xn,`canLoadKeyringBinding`);function Sn(e){let t=X.get(e);if(t!==void 0)return t;let n=bn(e);if(m(v.join(n,`index.js`))&&xn(n))return X.set(e,n),n;try{let t=_n([`root`,`-g`]);if(t.status===0){let n=v.join(t.stdout.trim(),`@napi-rs`,`keyring`);if(m(v.join(n,`index.js`))&&xn(n))return X.set(e,n),n}}catch{}return X.set(e,null),null}w(Sn,`findKeyringBinding`);function Cn(e){let t=e;h(t,{recursive:!0});let n=v.join(t,`package.json`);m(n)||_(n,JSON.stringify({private:!0,name:`cloudflare-auth-keyring-host`},null,` `),`utf-8`);let r;try{r=_n([`install`,`@napi-rs/keyring@${Y}`,`--prefix`,t,`--no-save`,`--no-audit`,`--no-fund`,`--no-package-lock`,`--loglevel=error`])}catch(e){throw new u(`Failed to spawn \`npm\` to install the keyring backend: ${e instanceof Error?e.message:String(e)}
|
|
67
|
+
|
|
68
|
+
Install \`npm\` and retry, or install the binding globally:
|
|
69
|
+
npm install -g @napi-rs/keyring@${Y}`,{telemetryMessage:`workers-auth keyring npm spawn failed`})}if(r.status!==0)throw new u(`Failed to install \`@napi-rs/keyring\` (npm exited ${r.status}):
|
|
70
|
+
${r.stderr?.trim()??`(no stderr)`}
|
|
71
|
+
|
|
72
|
+
Retry once the underlying issue is fixed, or install the binding globally:
|
|
73
|
+
npm install -g @napi-rs/keyring@${Y}`,{telemetryMessage:`workers-auth keyring npm install failed`});if(X.delete(e),Sn(e)===null)throw new u(`\`npm\` reported success but the \`@napi-rs/keyring\` native binding still cannot be loaded.
|
|
74
|
+
|
|
75
|
+
Its platform-specific binary ships as a separate optional package, so a download that was skipped or interrupted leaves the binding unusable.
|
|
76
|
+
|
|
77
|
+
Retry once the underlying issue is fixed, or install the binding globally:
|
|
78
|
+
npm install -g @napi-rs/keyring@${Y}`,{telemetryMessage:`workers-auth keyring install incomplete`})}w(Cn,`installKeyringBindingSync`);var wn;function Tn(e){wn=e}w(Tn,`setKeyringEntryFactory`);function En(e){if(wn!==void 0)return wn;let t=Sn(e);if(t===null)throw new u(`The \`@napi-rs/keyring\` native binding is not available.
|
|
79
|
+
|
|
80
|
+
Retry the command, or install the binding globally:
|
|
81
|
+
npm install -g @napi-rs/keyring@${Y}`,{telemetryMessage:`workers-auth keyring binding not loadable`});let n=f(t)(t);return(e,t)=>new n.Entry(e,t)}w(En,`resolveKeyringEntryFactory`);function Z(e){return W(e)}w(Z,`getKeyringAccountName`);function Dn(e){let t={v:1,key:Buffer.from(e).toString(`base64`),created:(/* @__PURE__ */ new Date()).toISOString()};return JSON.stringify(t)}w(Dn,`encodeKeyEnvelope`);function Q(e){if(e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t==`object`&&t&&t.v===1&&typeof t.key==`string`)try{let e=Buffer.from(t.key,`base64`);return e.length===32?new Uint8Array(e):void 0}catch{return}}w(Q,`decodeKeyEnvelope`);function On(e,t={}){return C(`secret-tool`,e,{encoding:`utf-8`,input:t.input})}w(On,`defaultRunner`);var $=On,kn=void 0;function An(e){$=e??On,kn=void 0}w(An,`setLinuxSecretToolRunner`);function jn(){if(kn!==void 0)return kn;let e;try{e=$([`--version`]).error===void 0}catch{e=!1}return kn=e,e}w(jn,`probeSecretTool`);var Mn=class{constructor(e,t){this.serviceName=e,this.profile=t}static{w(this,`LinuxSecretToolKeyProvider`)}getKey(){let e=$([`lookup`,`service`,this.serviceName,`account`,Z(this.profile)]);if(e.status!==1){if(e.status!==0)throw Error(`Failed to read key via secret-tool (exit ${e.status}): ${e.stderr?.trim()??`(no stderr)`}`);return Q(e.stdout.trim())}}setKey(e){let t=$([`store`,`--label=Cloudflare credentials key`,`service`,this.serviceName,`account`,Z(this.profile)],{input:Dn(e)});if(t.status!==0)throw Error(`Failed to write key via secret-tool (exit ${t.status}): ${t.stderr?.trim()??`(no stderr)`}`)}deleteKey(){let e=$([`clear`,`service`,this.serviceName,`account`,Z(this.profile)]);if(e.status!==0)throw Error(`Failed to delete key via secret-tool (exit ${e.status}): ${e.stderr?.trim()??`(no stderr)`}`)}describe(){return`Linux secret-tool (service=${this.serviceName}, account=${Z(this.profile)})`}},Nn=44;function Pn(e,t={}){return C(`/usr/bin/security`,e,{encoding:`utf-8`,input:t.input})}w(Pn,`defaultRunner`);var Fn=Pn;function In(e){Fn=e??Pn}w(In,`setMacSecurityCommandRunner`);var Ln=class{constructor(e,t){this.serviceName=e,this.profile=t}static{w(this,`MacSecurityKeyProvider`)}getKey(){let e=Fn([`find-generic-password`,`-s`,this.serviceName,`-a`,Z(this.profile),`-w`]);if(e.status!==Nn){if(e.status!==0)throw Error(`Failed to read key from macOS Keychain (exit ${e.status}): ${e.stderr?.trim()??`(no stderr)`}`);return Q(e.stdout.trim())}}setKey(e){let t=Fn([`add-generic-password`,`-s`,this.serviceName,`-a`,Z(this.profile),`-w`,Dn(e),`-U`]);if(t.status!==0)throw Error(`Failed to write key to macOS Keychain (exit ${t.status}): ${t.stderr?.trim()??`(no stderr)`}`)}deleteKey(){let e=Fn([`delete-generic-password`,`-s`,this.serviceName,`-a`,Z(this.profile)]);if(e.status!==0&&e.status!==Nn)throw Error(`Failed to delete key from macOS Keychain (exit ${e.status}): ${e.stderr?.trim()??`(no stderr)`}`)}describe(){return`macOS Keychain (service=${this.serviceName}, account=${Z(this.profile)})`}},Rn=class{constructor(e,t,n){this.serviceName=e,this.installDir=t,this.profile=n}static{w(this,`NapiKeyringKeyProvider`)}entry(){return En(this.installDir)(this.serviceName,Z(this.profile))}getKey(){let e=this.entry().getPassword();if(e!==null&&e!==``)return Q(e)}setKey(e){this.entry().setPassword(Dn(e))}deleteKey(){try{this.entry().deletePassword()}catch{}}describe(){return`${process.platform===`win32`?`Windows Credential Manager`:`OS keyring`} via @napi-rs/keyring (service=${this.serviceName}, account=${Z(this.profile)})`}},zn;function Bn(e){zn=e}w(Bn,`setKeyProviderFactoryForTesting`);function Vn(e,t,n){if(zn!==void 0)return{kind:`available`,provider:zn(e,t)};switch(process.platform){case`darwin`:return{kind:`available`,provider:new Ln(e,t)};case`linux`:return jn()?{kind:`available`,provider:new Mn(e,t)}:{kind:`unsupported`};case`win32`:{let r=yn(n);return Sn(r)===null?{kind:`needs-install`,install:/* @__PURE__ */ w(()=>Cn(r),`install`),afterInstall:/* @__PURE__ */ w(()=>new Rn(e,r,t),`afterInstall`)}:{kind:`available`,provider:new Rn(e,r,t)}}default:return{kind:`unsupported`}}}w(Vn,`resolveKeyProvider`);var Hn={installFailedThisSession:!1,hasWarnedAboutKeyringFallback:!1,hasWarnedAboutSecretToolMissing:!1};function Un(){return Hn}w(Un,`getResolverSessionFlags`);function Wn(){Hn.installFailedThisSession=!1,Hn.hasWarnedAboutKeyringFallback=!1,Hn.hasWarnedAboutSecretToolMissing=!1}w(Wn,`resetCredentialStorageState`);function Gn(e){let t={...e,loginCommand:e.loginCommand??`your CLI login`,format:e.format??`toml`};function n(e){return Kn(t,e)}w(n,`getActiveStore`);function r(e){return{read:/* @__PURE__ */ w(()=>n(e).read(),`read`),write:/* @__PURE__ */ w(t=>n(e).write(t),`write`),clear:/* @__PURE__ */ w(()=>n(e).clear(),`clear`),path:/* @__PURE__ */ w(()=>n(e).path(),`path`)}}return w(r,`storageFactory`),{storageFactory:r,getActiveStore:n}}w(Gn,`createCredentialStorageContext`);function Kn(e,t){let n=Ee(),r=e.getConfigPath();if(n===!1)return new K(r,t,e.format);let i=n===!0;if(!(n??e.isKeyringEnabled()??!1))return new K(r,t,e.format);let a=Vn(e.serviceName,t,r);switch(a.kind){case`available`:return new hn(r,a.provider,qn(e),t,e.format);case`needs-install`:return Jn(a,i,e,t);case`unsupported`:return Yn(i,e,t)}}w(Kn,`resolveActiveCredentialStore`);function qn(e){return t=>{e.logger.warn(`Migrated credentials from ${t.plaintextPath} into ${t.encryptedPath} (key in ${t.keyProviderDescription}). The plaintext file has been deleted.`)}}w(qn,`buildMigrationLogger`);function Jn(e,t,n,r){let i=Un();if(i.installFailedThisSession){if(t)throw new u(`CLOUDFLARE_AUTH_USE_KEYRING is set but the keyring backend could not be installed earlier this session.`,{telemetryMessage:`workers-auth keyring install previously failed`});return Xn(`The keyring backend could not be installed earlier this session; using the plaintext credentials file.`,n,r)}if(n.isNonInteractiveOrCI())throw new u(Qn(n.loginCommand),{telemetryMessage:`workers-auth keyring binding not installed`});try{n.logger.log(`🔐 Installing keyring backend (one-time, ~2 MB)…`),e.install()}catch(e){if(i.installFailedThisSession=!0,t)throw e instanceof u?e:new u(`Failed to install the keyring backend: ${e instanceof Error?e.message:String(e)}`,{telemetryMessage:`workers-auth keyring install threw`});return Xn(`Failed to install the keyring backend (${e instanceof Error?e.message:String(e)}); falling back to the plaintext credentials file.`,n,r)}return new hn(n.getConfigPath(),e.afterInstall(),qn(n),r,n.format)}w(Jn,`handleNeedsInstall`);function Yn(e,t,n){let r=process.platform,i=r===`linux`,a=i?Zn(t.loginCommand):`OS keyring storage is not supported on \`${r}\`; falling back to the plaintext credentials file.`;if(e)throw new u(i?`CLOUDFLARE_AUTH_USE_KEYRING is set but ${a}`:`CLOUDFLARE_AUTH_USE_KEYRING is set but no keyring backend is available on \`${r}\`.`,{telemetryMessage:i?`workers-auth keyring secret tool missing`:`workers-auth keyring unsupported platform`});if(i&&t.isNonInteractiveOrCI())throw new u(a,{telemetryMessage:`workers-auth keyring secret tool missing`});let o=Un();return i?(o.hasWarnedAboutSecretToolMissing||(o.hasWarnedAboutSecretToolMissing=!0,t.logger.warn(`${a}
|
|
82
|
+
|
|
83
|
+
Falling back to the plaintext credentials file for this session.`)),new K(t.getConfigPath(),n,t.format)):Xn(a,t,n)}w(Yn,`handleUnsupported`);function Xn(e,t,n){let r=Un();return r.hasWarnedAboutKeyringFallback||(r.hasWarnedAboutKeyringFallback=!0,t.logger.warn(e)),new K(t.getConfigPath(),n,t.format)}w(Xn,`fallbackToFileWithWarning`);function Zn(e){return`\`secret-tool\` is required for OS keyring storage on Linux but is not installed.
|
|
84
|
+
|
|
85
|
+
Install it via your package manager:
|
|
86
|
+
Debian/Ubuntu: sudo apt-get install libsecret-tools
|
|
87
|
+
Fedora/RHEL: sudo dnf install libsecret
|
|
88
|
+
Arch: sudo pacman -S libsecret
|
|
89
|
+
Alpine: apk add libsecret
|
|
90
|
+
|
|
91
|
+
Or disable keyring storage: \`${e} --no-use-keyring\`.`}w(Zn,`secretToolMissingMessage`);function Qn(e){return`\`@napi-rs/keyring\` is required for OS keyring storage on Windows but is not installed.
|
|
92
|
+
|
|
93
|
+
Run \`${e} --use-keyring\` interactively to install it automatically, or install it globally for CI:
|
|
94
|
+
|
|
95
|
+
npm install -g @napi-rs/keyring@${Y}
|
|
96
|
+
|
|
97
|
+
Or disable keyring storage: \`${e} --no-use-keyring\`.`}w(Qn,`windowsBindingMissingMessage`);function $n(e){let t=J(e.configPath,e.profile),n=m(t),r=Vn(e.serviceName,e.profile,e.configPath);return r.kind===`available`?(new hn(e.configPath,r.provider,void 0,e.profile,e.format??`toml`).clear(),{backendAvailable:!0,encryptedFileExisted:n}):(n&&g(t),{backendAvailable:!1,encryptedFileExisted:n})}w($n,`scrubEncryptedCredentials`);
|
|
98
|
+
/*! Bundled license information:
|
|
99
|
+
|
|
100
|
+
smol-toml/dist/error.js:
|
|
101
|
+
(*!
|
|
102
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
103
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
|
+
*
|
|
105
|
+
* Redistribution and use in source and binary forms, with or without
|
|
106
|
+
* modification, are permitted provided that the following conditions are met:
|
|
107
|
+
*
|
|
108
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
109
|
+
* list of conditions and the following disclaimer.
|
|
110
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
111
|
+
* this list of conditions and the following disclaimer in the
|
|
112
|
+
* documentation and/or other materials provided with the distribution.
|
|
113
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
114
|
+
* may be used to endorse or promote products derived from this software without
|
|
115
|
+
* specific prior written permission.
|
|
116
|
+
*
|
|
117
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
118
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
119
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
120
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
121
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
122
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
123
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
124
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
125
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
126
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
127
|
+
*)
|
|
128
|
+
|
|
129
|
+
smol-toml/dist/primitive.js:
|
|
130
|
+
(*!
|
|
131
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
132
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
133
|
+
*
|
|
134
|
+
* Redistribution and use in source and binary forms, with or without
|
|
135
|
+
* modification, are permitted provided that the following conditions are met:
|
|
136
|
+
*
|
|
137
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
138
|
+
* list of conditions and the following disclaimer.
|
|
139
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
140
|
+
* this list of conditions and the following disclaimer in the
|
|
141
|
+
* documentation and/or other materials provided with the distribution.
|
|
142
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
143
|
+
* may be used to endorse or promote products derived from this software without
|
|
144
|
+
* specific prior written permission.
|
|
145
|
+
*
|
|
146
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
147
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
148
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
149
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
150
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
151
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
152
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
153
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
154
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
155
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
156
|
+
*)
|
|
157
|
+
|
|
158
|
+
smol-toml/dist/date.js:
|
|
159
|
+
(*!
|
|
160
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
161
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
162
|
+
*
|
|
163
|
+
* Redistribution and use in source and binary forms, with or without
|
|
164
|
+
* modification, are permitted provided that the following conditions are met:
|
|
165
|
+
*
|
|
166
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
167
|
+
* list of conditions and the following disclaimer.
|
|
168
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
169
|
+
* this list of conditions and the following disclaimer in the
|
|
170
|
+
* documentation and/or other materials provided with the distribution.
|
|
171
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
172
|
+
* may be used to endorse or promote products derived from this software without
|
|
173
|
+
* specific prior written permission.
|
|
174
|
+
*
|
|
175
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
176
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
177
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
178
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
179
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
180
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
181
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
182
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
183
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
184
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
185
|
+
*)
|
|
186
|
+
|
|
187
|
+
smol-toml/dist/extract.js:
|
|
188
|
+
(*!
|
|
189
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
190
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
191
|
+
*
|
|
192
|
+
* Redistribution and use in source and binary forms, with or without
|
|
193
|
+
* modification, are permitted provided that the following conditions are met:
|
|
194
|
+
*
|
|
195
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
196
|
+
* list of conditions and the following disclaimer.
|
|
197
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
198
|
+
* this list of conditions and the following disclaimer in the
|
|
199
|
+
* documentation and/or other materials provided with the distribution.
|
|
200
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
201
|
+
* may be used to endorse or promote products derived from this software without
|
|
202
|
+
* specific prior written permission.
|
|
203
|
+
*
|
|
204
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
205
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
206
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
207
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
208
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
209
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
210
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
211
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
212
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
213
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
214
|
+
*)
|
|
215
|
+
|
|
216
|
+
smol-toml/dist/util.js:
|
|
217
|
+
(*!
|
|
218
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
219
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
220
|
+
*
|
|
221
|
+
* Redistribution and use in source and binary forms, with or without
|
|
222
|
+
* modification, are permitted provided that the following conditions are met:
|
|
223
|
+
*
|
|
224
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
225
|
+
* list of conditions and the following disclaimer.
|
|
226
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
227
|
+
* this list of conditions and the following disclaimer in the
|
|
228
|
+
* documentation and/or other materials provided with the distribution.
|
|
229
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
230
|
+
* may be used to endorse or promote products derived from this software without
|
|
231
|
+
* specific prior written permission.
|
|
232
|
+
*
|
|
233
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
234
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
235
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
236
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
237
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
238
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
239
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
240
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
241
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
242
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
243
|
+
*)
|
|
244
|
+
|
|
245
|
+
smol-toml/dist/struct.js:
|
|
246
|
+
(*!
|
|
247
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
248
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
249
|
+
*
|
|
250
|
+
* Redistribution and use in source and binary forms, with or without
|
|
251
|
+
* modification, are permitted provided that the following conditions are met:
|
|
252
|
+
*
|
|
253
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
254
|
+
* list of conditions and the following disclaimer.
|
|
255
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
256
|
+
* this list of conditions and the following disclaimer in the
|
|
257
|
+
* documentation and/or other materials provided with the distribution.
|
|
258
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
259
|
+
* may be used to endorse or promote products derived from this software without
|
|
260
|
+
* specific prior written permission.
|
|
261
|
+
*
|
|
262
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
263
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
264
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
265
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
266
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
267
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
268
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
269
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
270
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
271
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
272
|
+
*)
|
|
273
|
+
|
|
274
|
+
smol-toml/dist/parse.js:
|
|
275
|
+
(*!
|
|
276
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
277
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
278
|
+
*
|
|
279
|
+
* Redistribution and use in source and binary forms, with or without
|
|
280
|
+
* modification, are permitted provided that the following conditions are met:
|
|
281
|
+
*
|
|
282
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
283
|
+
* list of conditions and the following disclaimer.
|
|
284
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
285
|
+
* this list of conditions and the following disclaimer in the
|
|
286
|
+
* documentation and/or other materials provided with the distribution.
|
|
287
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
288
|
+
* may be used to endorse or promote products derived from this software without
|
|
289
|
+
* specific prior written permission.
|
|
290
|
+
*
|
|
291
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
292
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
293
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
294
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
295
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
296
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
297
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
298
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
299
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
300
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
301
|
+
*)
|
|
302
|
+
|
|
303
|
+
smol-toml/dist/stringify.js:
|
|
304
|
+
(*!
|
|
305
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
306
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
307
|
+
*
|
|
308
|
+
* Redistribution and use in source and binary forms, with or without
|
|
309
|
+
* modification, are permitted provided that the following conditions are met:
|
|
310
|
+
*
|
|
311
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
312
|
+
* list of conditions and the following disclaimer.
|
|
313
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
314
|
+
* this list of conditions and the following disclaimer in the
|
|
315
|
+
* documentation and/or other materials provided with the distribution.
|
|
316
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
317
|
+
* may be used to endorse or promote products derived from this software without
|
|
318
|
+
* specific prior written permission.
|
|
319
|
+
*
|
|
320
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
321
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
322
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
323
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
324
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
325
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
326
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
327
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
328
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
329
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
330
|
+
*)
|
|
331
|
+
|
|
332
|
+
smol-toml/dist/index.js:
|
|
333
|
+
(*!
|
|
334
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
335
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
336
|
+
*
|
|
337
|
+
* Redistribution and use in source and binary forms, with or without
|
|
338
|
+
* modification, are permitted provided that the following conditions are met:
|
|
339
|
+
*
|
|
340
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
341
|
+
* list of conditions and the following disclaimer.
|
|
342
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
343
|
+
* this list of conditions and the following disclaimer in the
|
|
344
|
+
* documentation and/or other materials provided with the distribution.
|
|
345
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
346
|
+
* may be used to endorse or promote products derived from this software without
|
|
347
|
+
* specific prior written permission.
|
|
348
|
+
*
|
|
349
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
350
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
351
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
352
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
353
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
354
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
355
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
356
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
357
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
358
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
359
|
+
*)
|
|
360
|
+
*/
|
|
361
|
+
export{G as a,Ee as c,$n as d,U as f,w as h,ot as i,J as l,R as m,Ut as n,de as o,he as p,Gt as r,be as s,Gn as t,H as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e,r as t}from"./source-mXUcrTVw.mjs";import{B as n,j as r,m as i}from"./dist-CYFkGHYv.mjs";import{N as a,r as o}from"./chunk-AUSY7DKT-BJX6Fdc4.mjs";import{createRequire as s}from"node:module";import{readFileSync as c}from"node:fs";import l,{resolve as u}from"node:path";import d from"node:assert";import{spawnSync as f}from"node:child_process";const p=s(import.meta.url||(typeof __filename==`string`?__filename:`/`));var m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>h(e,`name`,{value:t,configurable:!0}),x=/* @__PURE__ */ (e=>p===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(p===void 0?e:p)[t]}):e:p)(function(e){if(p!==void 0)return p.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),S=(e,t)=>function(){return t||(0,e[_(e)[0]])((t={exports:{}}).exports,t),t.exports},C=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},w=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},T=(e,t,n)=>(n=e==null?{}:m(v(e)),w(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),E=/* @__PURE__ */ e(((e,n)=>{var r=t(`child_process`).exec,i=t(`child_process`).execSync,a=t(`fs`),o=t(`path`),s=a.access,c=a.accessSync,l=a.constants||a,u=process.platform==`win32`,d=function(e,t){s(e,l.F_OK,function(e){t(!e)})},f=function(e){try{return c(e,l.F_OK),!1}catch{return!0}},p=function(e,t){s(e,l.F_OK|l.X_OK,function(e){t(null,!e)})},m=function(e){try{return c(e,l.F_OK|l.X_OK),!0}catch{return!1}},h=function(e,t,n){d(e,function(i){if(!i){r(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`,function(e,t,r){n(null,!!t)});return}p(e,n)})},g=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e)){n(null,!1);return}r(`where `+t,function(e){e===null?n(null,!0):n(null,!1)})},_=function(e,t){if(f(e))try{return!!i(`command -v `+t+` 2>/dev/null && { echo >&1 `+t+`; exit 0; }`)}catch{return!1}return m(e)},v=function(e,t,n){if(!/^(?!(?:.*\s|.*\.|\W+)$)(?:[a-zA-Z]:)?(?:(?:[^<>:"\|\?\*\n])+(?:\/\/|\/|\\\\|\\)?)+$/m.test(e))return!1;try{return!!i(`where `+t,{stdio:[]})}catch{return!1}},y=function(e){return/[^A-Za-z0-9_\/:=-]/.test(e)&&(e=`'`+e.replace(/'/g,`'\\''`)+`'`,e=e.replace(/^(?:'')+/g,``).replace(/\\'''/g,`\\'`)),e};u&&(y=function(e){if(/[\\]/.test(e)){var t=`"`+o.dirname(e)+`"`,n=`"`+o.basename(e)+`"`;return t+`:`+n}return`"`+e+`"`}),n.exports=function e(t,n){var r=y(t);if(!n&&typeof Promise<`u`)return new Promise(function(n,r){e(t,function(e,i){i?n(t):r(e)})});u?g(t,r,n):h(t,r,n)},n.exports.sync=function(e){var t=y(e);return u?v(e,t):_(e,t)}})),D=/* @__PURE__ */ e(((e,t)=>{t.exports=E()})),ee=n(),O=D();s(import.meta.url||(typeof __filename==`string`?__filename:`/`));function k(e){if(e.compiled_schema)return c(u(e.compiled_schema));let{base_path:t,source_schemas:n}=e,r=(n??[]).map(e=>u(t,e));if(!(0,O.sync)(`capnp`))throw new a(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let i=u(t??`.`),o=f(`capnp`,[`compile`,`-o-`,`--src-prefix=${i}`,...r],{maxBuffer:3145728});if(o.error)throw o.error;if(o.stderr.length)throw Error(o.stderr.toString());return o.stdout}b(k,`handleUnsafeCapnp`);var A={esm:`application/javascript+module`,commonjs:`application/javascript`,"compiled-wasm":`application/wasm`,buffer:`application/octet-stream`,text:`text/plain`,python:`text/x-python`,"python-requirement":`text/x-python-requirement`};function j(e){let t=A[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}b(j,`toMimeType`);function M(e){let t=Object.keys(A).find(t=>A[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}b(M,`fromMimeType`);function N(e,t,n){let s=new ee.FormData,{main:u,sourceMaps:f,migrations:p,code_update_strategy:m,exports:h,compatibility_date:g,compatibility_flags:_,keepVars:v,keepSecrets:y,keepBindings:b,logpush:x,placement:S,tail_consumers:C,streaming_tail_consumers:w,limits:T,annotations:E,keep_assets:D,assets:O,observability:A,cache:M,package_dependencies:N}=e,P={html_handling:O?.assetConfig?.html_handling,not_found_handling:O?.assetConfig?.not_found_handling,run_worker_first:O?.run_worker_first,_redirects:O?._redirects,_headers:O?._headers};if(O&&!O.routerConfig.has_user_worker)return s.set(`metadata`,JSON.stringify({assets:{jwt:O.jwt,config:P},...E&&{annotations:E},...g&&{compatibility_date:g},..._&&{compatibility_flags:_}})),s;let{modules:F}=e,I=[],te=i(`plain_text`,t),ne=i(`json`,t),re=i(`secret_text`,t),ie=i(`kv_namespace`,t),ae=i(`send_email`,t),oe=i(`durable_object_namespace`,t),se=i(`workflow`,t),ce=i(`queue`,t),le=i(`r2_bucket`,t),ue=i(`d1`,t),de=i(`vectorize`,t),fe=i(`ai_search_namespace`,t),pe=i(`ai_search`,t),L=i(`agent_memory`,t),R=i(`hyperdrive`,t),z=i(`secrets_store_secret`,t),B=i(`artifacts`,t),me=i(`unsafe_hello_world`,t),he=i(`flagship`,t),ge=i(`ratelimit`,t),_e=i(`vpc_service`,t),ve=i(`vpc_network`,t),V=i(`service`,t),ye=i(`analytics_engine`,t),be=i(`dispatch_namespace`,t),xe=i(`mtls_certificate`,t),Se=i(`pipeline`,t),Ce=i(`k2`,t),we=i(`worker_loader`,t),Te=i(`logfwdr`,t),Ee=i(`wasm_module`,t),H=i(`browser`,t)[0],U=i(`analytics`,t)[0],W=i(`ai`,t)[0],G=i(`images`,t)[0],K=i(`stream`,t)[0],q=i(`media`,t)[0],J=i(`version_metadata`,t)[0],Y=i(`assets`,t)[0],De=i(`text_blob`,t),Oe=i(`data_blob`,t);i(`inherit`,t).forEach(({binding:e})=>{I.push({name:e,type:`inherit`})}),te.forEach(({binding:e,value:t})=>{I.push({name:e,type:`plain_text`,text:t})}),ne.forEach(({binding:e,value:t})=>{I.push({name:e,type:`json`,json:t})}),re.forEach(({binding:e,value:t})=>{I.push({name:e,type:`secret_text`,text:t})}),ie.forEach(({id:e,binding:t,raw:r})=>{if(n?.dryRun&&(e??=o),e===void 0)throw new a(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===o?I.push({name:t,type:`inherit`}):I.push({name:t,type:`kv_namespace`,namespace_id:e,raw:r})}),ae.forEach(e=>{let t={name:e.name,type:`send_email`,allowed_sender_addresses:e.allowed_sender_addresses};e.destination_address===void 0?e.allowed_destination_addresses===void 0?I.push(t):I.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):I.push({...t,destination_address:e.destination_address})}),oe.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{I.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),se.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{I.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),ce.forEach(({binding:e,queue_name:t,delivery_delay:r,raw:i})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "queue" field. Add a "queue" field to the producer in your Worker configuration specifying the name of the Queue to bind to.`,{telemetryMessage:`queue binding missing name`});t===o?I.push({name:e,type:`inherit`}):I.push({type:`queue`,name:e,queue_name:t,delivery_delay:r,raw:i})}),le.forEach(({binding:e,bucket_name:t,jurisdiction:r,raw:i})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "bucket_name" field. Add a "bucket_name" field to the binding in your Worker configuration specifying the name of the R2 bucket to bind to.`,{telemetryMessage:`r2 bucket binding missing bucket_name`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:r,raw:i})}),ue.forEach(({binding:e,database_id:t,database_internal_env:r,raw:i})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "database_id" field. Add a "database_id" field to the binding in your Worker configuration specifying the ID of the D1 database to bind to.`,{telemetryMessage:`d1 database binding missing database_id`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`d1`,id:t,internalEnv:r,raw:i})}),de.forEach(({binding:e,index_name:t,raw:n})=>{I.push({name:e,type:`vectorize`,index_name:t,raw:n})}),fe.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the AI Search namespace to bind to.`,{telemetryMessage:`ai search namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`ai_search_namespace`,namespace:t})}),pe.forEach(({binding:e,instance_name:t})=>{I.push({name:e,type:`ai_search`,instance_name:t})}),L.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the namespace to bind to.`,{telemetryMessage:!1});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`agent_memory`,namespace:t})}),R.forEach(({binding:e,id:t})=>{I.push({name:e,type:`hyperdrive`,id:t})}),z.forEach(({binding:e,store_id:t,secret_name:n})=>{I.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),B.forEach(({binding:e,namespace:t})=>{I.push({name:e,type:`artifacts`,namespace:t})}),me.forEach(({binding:e,enable_timer:t})=>{I.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),he.forEach(({binding:e,app_id:t})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have an "app_id" field. Add an "app_id" field to the binding in your Worker configuration specifying the Flagship app to bind to.`,{telemetryMessage:`flagship binding missing app id`});I.push(t===o?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),ge.forEach(({name:e,namespace_id:t,simple:n})=>{I.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),_e.forEach(({binding:e,service_id:t})=>{I.push({name:e,type:`vpc_service`,service_id:t})}),ve.forEach(({binding:e,tunnel_id:t,network_id:n})=>{I.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),V.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{I.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),ye.forEach(({binding:e,dataset:t})=>{I.push({name:e,type:`analytics_engine`,dataset:t})}),be.forEach(({binding:e,namespace:t,outbound:r})=>{if(n?.dryRun&&(t??=o),t===void 0)throw new a(`${e} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the dispatch namespace to bind to.`,{telemetryMessage:`dispatch namespace binding missing namespace`});t===o?I.push({name:e,type:`inherit`}):I.push({name:e,type:`dispatch_namespace`,namespace:t,...r&&{outbound:{worker:{service:r.service,environment:r.environment},params:r.parameters?.map(e=>({name:e}))}}})}),xe.forEach(({binding:e,certificate_id:t})=>{I.push({name:e,type:`mtls_certificate`,certificate_id:t})}),Se.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)I.push({name:e,type:`pipelines`,stream:t});else if(n)I.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),Ce.forEach(({binding:e,stream:t})=>{I.push({name:e,type:`k2`,stream:t})}),we.forEach(({binding:e})=>{I.push({name:e,type:`worker_loader`})}),Te.forEach(({name:e,destination:t})=>{I.push({name:e,type:`logfwdr`,destination:t})}),Ee.forEach(({binding:e,source:t})=>{I.push({name:e,type:`wasm_module`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/wasm`}))}),H!==void 0&&I.push({name:H.binding,type:`browser`,raw:H.raw}),U!==void 0&&I.push({name:U.binding,type:`analytics`}),W!==void 0&&I.push({name:W.binding,staging:W.staging,type:`ai`,raw:W.raw}),G!==void 0&&I.push({name:G.binding,type:`images`,raw:G.raw}),K!==void 0&&I.push({name:K.binding,type:`stream`}),q!==void 0&&I.push({name:q.binding,type:`media`}),J!==void 0&&I.push({name:J.binding,type:`version_metadata`}),Y!==void 0&&I.push({name:Y.binding,type:`assets`}),De.forEach(({binding:e,source:t})=>{I.push({name:e,type:`text_blob`,part:e}),e!==`__STATIC_CONTENT_MANIFEST`&&(`contents`in t?s.set(e,new File([t.contents],t.path??e,{type:`text/plain`})):s.set(e,new File([c(t.path)],t.path,{type:`text/plain`})))}),Oe.forEach(({binding:e,source:t})=>{I.push({name:e,type:`data_blob`,part:e}),s.set(e,new File([`contents`in t?t.contents:c(t.path)],`path`in t?t.path??e:e,{type:`application/octet-stream`}))});for(let[e,n]of Object.entries(t??{}))if(r(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;I.push({name:e,type:t.slice(7),...r})}let X=`__STATIC_CONTENT_MANIFEST`;if(F?.some(({name:e})=>e===X)&&u.type===`esm`){d(F!==void 0);let e=new Set(F.map(e=>l.posix.dirname(e.name)));for(let t of e){if(t===`.`)continue;let e=l.posix.relative(t,X),n=l.posix.join(t,X);F.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(u.type===`commonjs`){for(let e of Object.values([...F||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)s.set(e.name,new File([e.content],e.name,{type:`text/plain`})),F=F?.filter(t=>t!==e);else if(e.type===`compiled-wasm`||e.type===`text`||e.type===`buffer`){let t=e.name.replace(/[^a-zA-Z0-9_$]/g,`_`);I.push({name:t,type:e.type===`compiled-wasm`?`wasm_module`:e.type===`text`?`text_blob`:`data_blob`,part:t}),s.set(t,new File([e.content],e.name,{type:e.type===`compiled-wasm`?`application/wasm`:e.type===`text`?`text/plain`:`application/octet-stream`})),F=F?.filter(t=>t!==e)}}let Z;if(n?.unsafe?.capnp){let e=k(n.unsafe.capnp);Z=`./capnp-${Date.now()}.compiled`,s.set(Z,new File([e],Z,{type:`application/octet-stream`}))}let Q;v&&(Q??=[],Q.push(`plain_text`,`json`)),y&&(Q??=[],Q.push(`secret_text`,`secret_key`)),b&&(Q??=[],Q.push(...b));let $={...u.type===`commonjs`?{body_part:u.name}:{main_module:u.name},bindings:I,containers:e.containers===void 0?void 0:e.containers.map(e=>({...e.name!==void 0&&{name:e.name},...e.class_name!==void 0&&{class_name:e.class_name},...e.images!==void 0&&{images:e.images}})),...g&&{compatibility_date:g},..._&&{compatibility_flags:_},...p&&{migrations:p},...m&&{code_update_strategy:m},...h&&Object.keys(h).length>0&&{exports:h},capnp_schema:Z,...Q&&{keep_bindings:Q},...x!==void 0&&{logpush:x},...S&&{placement:S},...C&&{tail_consumers:C},...w&&{streaming_tail_consumers:w},...T&&{limits:T},...E&&{annotations:E},...D!==void 0&&{keep_assets:D},...O&&{assets:{jwt:O.jwt,config:P}},...A&&{observability:A},...M&&{cache_options:M},...N?.length&&{package_dependencies:N}};if(n?.unsafe?.metadata!==void 0)for(let e of Object.keys(n.unsafe.metadata))$[e]=n.unsafe.metadata[e];if(s.set(`metadata`,JSON.stringify($)),u.type===`commonjs`&&F&&F.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[u].concat(F||[]))s.set(e.name,new File([e.content],e.name,{type:j(e.type??u.type??`esm`)}));for(let e of f||[])s.set(e.name,new File([e.content],e.name,{type:`application/source-map`}));return s}b(N,`createWorkerUploadForm`);export{C as a,T as c,S as i,M as n,b as o,A as r,x as s,N as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as e}from"node:module";const t=e(import.meta.url||(typeof __filename==`string`?__filename:`/`));var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=/* @__PURE__ */ (e=>t===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,n)=>(t===void 0?e:t)[n]}):e:t)(function(e){if(t!==void 0)return t.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),u=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},d=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},p=(e,t,i)=>(i=e==null?{}:n(o(e)),f(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e));export{p as a,l as i,d as n,c as r,u as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as e}from"node:module";const t=e(import.meta.url||(typeof __filename==`string`?__filename:`/`));var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>r(e,`name`,{value:t,configurable:!0}),l=/* @__PURE__ */ (e=>t===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,n)=>(t===void 0?e:t)[n]}):e:t)(function(e){if(t!==void 0)return t.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)}),u=(e,t)=>function(){return e&&(t=(0,e[a(e)[0]])(e=0)),t},d=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},f=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},p=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},m=(e,t,i)=>(i=e==null?{}:n(o(e)),p(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),h=e=>p(r({},`__esModule`,{value:!0}),e);export{l as a,c as i,u as n,h as o,f as r,m as s,d as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,t}from"./metadata-
|
|
2
|
+
import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{r as n}from"./theme-CQ_TYifs.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-YmjF66Ct.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{a,f as o,m as s,t as c,u as l}from"./run-CrZgB8L_.mjs";import u from"minisearch";function d({enabled:e,source:t}){let r=e?n.success(`Enabled`):n.error(`Disabled`),i=l(t);return`Status: ${r}${i?` (set by ${i})`:``}\n`}const f={command:`disable`,describe:`Disable cf telemetry collection`,handler:()=>{s(!1);let{enabled:e,source:t}=o();console.log(d({enabled:e,source:t})),console.log(e?`cf is collecting usage telemetry because ${l(t)}=true overrides this setting.\n`:`cf is no longer collecting usage telemetry.
|
|
3
3
|
`)}},p={command:`enable`,describe:`Enable cf telemetry collection`,handler:()=>{s(!0);let{enabled:e,source:t}=o();console.log(d({enabled:e,source:t})),console.log(e?`cf is now collecting anonymous usage telemetry. Thank you for helping make cf better.
|
|
4
4
|
`:`cf is not collecting usage telemetry because ${l(t)}${t===`env`||t===`wrangler-env`?`=false`:``} overrides this setting.\n`)}},m={command:`status`,describe:`Check whether cf telemetry collection is enabled`,handler:()=>{console.log(d(o())),console.log(n.muted(`Configure on this machine: \`cf cli telemetry enable\` / \`cf cli telemetry disable\`.
|
|
5
5
|
Override per invocation with ${a}=true/false. DO_NOT_TRACK is also honored.\nLearn more: https://github.com/cloudflare/cf/blob/main/packages/cli/telemetry.md`))}},h={command:`telemetry`,describe:`Configure whether cf collects anonymous usage telemetry`,builder:e=>e.command(m).command(p).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e,t){let n=e.fullPath.slice(0,-1).map((t,n)=>e.fullPath.slice(0,n+1).join(` `));return{command:e.command,summary:e.summary||e.description.split(`
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-F5wxc8zq.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 client-certificates create
|
|
3
3
|
|
|
4
|
-
Create a new API Shield mTLS Client Certificate.`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`validity-days`,{type:`number`,description:`The number of days the Client Certificate will be valid after the issued_on date.`}).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 p={command:`create`,describe:`Create Client Certificate`,builder:f,handler:async u=>a({command:`client-certificates create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf client-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body)
|
|
4
|
+
Create a new API Shield mTLS Client Certificate.`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`validity-days`,{type:`number`,description:`The number of days the Client Certificate will be valid after the issued_on date.`}).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 p={command:`create`,describe:`Create Client Certificate`,builder:f,handler:async u=>a({command:`client-certificates create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf client-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.clientCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u[`validity-days`]===void 0)throw Error(`--validity-days is required (or pass --body with this field set).`);let f=s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}),p=await i(`Creating`,async()=>a.clientCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function m(e){return e.usage(`$0 client-certificates delete <client-certificate-id>
|
|
5
5
|
|
|
6
6
|
Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <client-certificate-id>`,describe:`Revoke Client Certificate`,builder:m,handler:async o=>a({command:`client-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}
|
|
7
|
+
`);return}let c=await i(`Deleting`,async()=>a.clientCertificates.delete({zone_id:s,client_certificate_id:o[`client-certificate-id`]}));n(c,{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 client-certificates edit <client-certificate-id>
|
|
8
8
|
|
|
9
|
-
If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`reactivate`,{type:`boolean`,description:`The reactivate 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 _={command:`edit <client-certificate-id>`,describe:`Reactivate Client Certificate`,builder:g,handler:async c=>a({command:`client-certificates edit`,classification:{safeFlags:[`reactivate`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf client-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/client_certificates/${c[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(c[`client-certificate-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"client-certificate-id":String(c[`client-certificate-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({reactivate:c.reactivate}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body)
|
|
9
|
+
If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`reactivate`,{type:`boolean`,description:`The reactivate 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 _={command:`edit <client-certificate-id>`,describe:`Reactivate Client Certificate`,builder:g,handler:async c=>a({command:`client-certificates edit`,classification:{safeFlags:[`reactivate`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf client-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/client_certificates/${c[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(c[`client-certificate-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"client-certificate-id":String(c[`client-certificate-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({reactivate:c.reactivate}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.clientCertificates.edit({...e,zone_id:l,client_certificate_id:c[`client-certificate-id`]}));n(t,{successLabel:`Updated`});return}let u=s({reactivate:c.reactivate}),d=await i(`Updating`,async()=>a.clientCertificates.edit({...u,zone_id:l,client_certificate_id:c[`client-certificate-id`]}));n(d,{successLabel:`Updated`})})};function v(e){return e.usage(`$0 client-certificates get <client-certificate-id>
|
|
10
10
|
|
|
11
|
-
Get Details for a single mTLS API Shield Client Certificate.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <client-certificate-id>`,describe:`Client Certificate Details`,builder:v,handler:async o=>a({command:`client-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s
|
|
11
|
+
Get Details for a single mTLS API Shield Client Certificate.`).positional(`client-certificate-id`,{type:`string`,description:`Client Certificate Tag`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <client-certificate-id>`,describe:`Client Certificate Details`,builder:v,handler:async o=>a({command:`client-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf client-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates/${o[`client-certificate-id`]==null?`<client-certificate-id>`:encodeURIComponent(String(o[`client-certificate-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"client-certificate-id":String(o[`client-certificate-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.clientCertificates.get({zone_id:s,client_certificate_id:o[`client-certificate-id`]}));n(c,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 client-certificates list
|
|
12
12
|
|
|
13
|
-
List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination.`).option(`status`,{type:`string`,description:`Client Certitifcate Status to filter results by.`,choices:[`all`,`active`,`pending_reactivation`,`pending_revocation`,`revoked`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Client Certificates`,builder:d(b),handler:async o=>a({command:`client-certificates list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={status:o.status,page:o.page,per_page:o[`per-page`],limit:o.limit,offset:o.offset};if(o.dryRun){r({command:`cf client-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c
|
|
13
|
+
List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination.`).option(`status`,{type:`string`,description:`Client Certitifcate Status to filter results by.`,choices:[`all`,`active`,`pending_reactivation`,`pending_revocation`,`revoked`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List Client Certificates`,builder:d(b),handler:async o=>a({command:`client-certificates list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={status:o.status,page:o.page,per_page:o[`per-page`],limit:o.limit,offset:o.offset};if(o.dryRun){r({command:`cf client-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.clientCertificates.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},S={command:`client-certificates`,describe:`client-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{S as default};
|