cf 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/_meta/agent-context.json +34 -35
- package/dist/_meta/commands.json +6834 -10044
- package/dist/_meta/schemas.json +11228 -12752
- package/dist/{abuse-reports-CzDAjFpo.mjs → abuse-reports-CGF4zcKf.mjs} +2 -2
- package/dist/{access-CxyW_sIW.mjs → access-lhLJo1v2.mjs} +1 -1
- package/dist/{account-Dd4-tDYJ.mjs → account-CYRm3yoN.mjs} +1 -1
- package/dist/account-tags-B88TotoH.mjs +9 -0
- package/dist/accounts-BSIAT_iP.mjs +28 -0
- package/dist/{acm-CHacxa3s.mjs → acm-VULm1djv.mjs} +1 -1
- package/dist/{addressing-BnqNmmYN.mjs → addressing-BHPBIkRY.mjs} +1 -1
- package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-KBy48G1b.mjs} +1 -1
- package/dist/{agent-memory-D--BQS0W.mjs → agent-memory-DDv_Gxr7.mjs} +2 -2
- package/dist/{ai-audit-CfpDKXkD.mjs → ai-audit-BWZGvbca.mjs} +1 -1
- package/dist/{ai-gateway-oG4j_oYN.mjs → ai-gateway-jeB-sAgP.mjs} +1 -1
- package/dist/ai-search-BmdskMjR.mjs +7 -0
- package/dist/{ai-security-byjIIrfl.mjs → ai-security-CsmfcaUx.mjs} +1 -1
- package/dist/{ai-BnVlQDiI.mjs → ai-viHB1tgI.mjs} +1 -1
- package/dist/{alerting-qa8SkXlD.mjs → alerting-Bl8OqViR.mjs} +4 -4
- package/dist/analytics-vOxw8Hy0.mjs +3 -0
- package/dist/{analytics_engine-BnECMIWJ.mjs → analytics_engine-DO4-C0wD.mjs} +1 -1
- package/dist/{api-security-MfHbfZyf.mjs → api-security-4FVrD4n8.mjs} +1 -1
- package/dist/argo-CQfCgazW.mjs +2 -0
- package/dist/args-DlUhyGU0.mjs +2 -0
- package/dist/artifacts-CVDGnr2V.mjs +4 -0
- package/dist/{audit-logs-retFtvow.mjs → audit-logs-CzpwvQ6A.mjs} +1 -1
- package/dist/{auth-aazs91XL.mjs → auth-D0xZxAEa.mjs} +1 -1
- package/dist/{auth-DuLchM18.mjs → auth-MQEamPN9.mjs} +2 -2
- package/dist/{billing-CxQVqpGZ.mjs → billing-aJgapeRm.mjs} +2 -2
- package/dist/{bot-management-Rli7v7tg.mjs → bot-management-Y2q5d-pi.mjs} +1 -1
- package/dist/{botnet-feed-Cw6XSEf8.mjs → botnet-feed-DANJqfmE.mjs} +1 -1
- package/dist/{brand-protection-CTvnHGfV.mjs → brand-protection-CjpZWBjp.mjs} +1 -1
- package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-BtpCbh-2.mjs} +1 -1
- package/dist/browser-run-BFn9h2Tz.mjs +4 -0
- package/dist/{build-Dji9BYmV.mjs → build-DcflwvqN.mjs} +1 -1
- package/dist/{cache-Cl7vKJwH.mjs → cache-VyWK1SjY.mjs} +1 -1
- package/dist/{calls-DtK_ANxq.mjs → calls-BxoRYxs4.mjs} +1 -1
- package/dist/{certificate-authorities-DZP1RzAs.mjs → certificate-authorities-D7OAFxF_.mjs} +1 -1
- package/dist/{cf-oSz9pud_.mjs → cf-C7DU4819.mjs} +1 -1
- package/dist/{chunk-LQW53VED-Xakf_rUn.mjs → chunk-LQW53VED-DLrXV-hE.mjs} +2 -2
- package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-DDUv8K0a.mjs} +1 -1
- package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-D4ysjwWT.mjs} +1 -1
- package/dist/{cloud-connector-BpVcvhjZ.mjs → cloud-connector-Bhec6z2P.mjs} +1 -1
- package/dist/cloudforce-one-J_hn9ss9.mjs +36 -0
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-Dycx8zFx.mjs +2 -0
- package/dist/{connector-telemetry-events-D5_3X7XW.mjs → connector-telemetry-events-BmxOSNtN.mjs} +1 -1
- package/dist/connector-telemetry-events-latest-BY2556uL.mjs +2 -0
- package/dist/{connector-telemetry-snapshots-CJ9gLRFR.mjs → connector-telemetry-snapshots-CdcqfKnH.mjs} +1 -1
- package/dist/connector-telemetry-snapshots-latest-BHYdxUEF.mjs +2 -0
- package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BqxYMMtQ.mjs} +1 -1
- package/dist/{containers-Bog7j0Hw.mjs → containers-CKW081JA.mjs} +8 -8
- package/dist/{content-scan-D03UfK2X.mjs → content-scan-Dgd7A8KF.mjs} +1 -1
- package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-DYL37wLc.mjs} +1 -1
- package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CkhSbfAs.mjs} +1 -1
- package/dist/{custom-certificates-4y35UC1X.mjs → custom-certificates-BzAOnEoT.mjs} +1 -1
- package/dist/custom-csrs-CgzG3pd3.mjs +3 -0
- package/dist/{custom-hostnames-CDIAnsRa.mjs → custom-hostnames-q_nsnlye.mjs} +4 -4
- package/dist/custom-nameservers-BUBmfhUe.mjs +3 -0
- package/dist/custom-pages-M7jA2Hit.mjs +3 -0
- package/dist/{d1-Cllm-iTT.mjs → d1-BFvMd6-S.mjs} +1 -1
- package/dist/{data-security-rnoSCEdL.mjs → data-security-Bji4Or_j.mjs} +2 -2
- package/dist/{dcv-delegation-DCRCOL6l.mjs → dcv-delegation-BuoRQ1Yh.mjs} +1 -1
- package/dist/{deploy-DGlmjPTS.mjs → deploy-CZ7bgNDu.mjs} +1 -1
- package/dist/{deploy-input-DhCo1I0I.mjs → deploy-input-CrvuoDGJ.mjs} +1 -1
- package/dist/{dev-BbLV0Ti-.mjs → dev-V10MG-Bg.mjs} +1 -1
- package/dist/{diagnostics-D5Yo2xqx.mjs → diagnostics-BTH-8nJH.mjs} +2 -2
- package/dist/{directory-CCndFkbQ.mjs → directory-BlH6N6Qy.mjs} +1 -1
- package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-BCjH1JzB.mjs} +1 -1
- package/dist/{dist-COfwjT96.mjs → dist-CgrMkXFx.mjs} +1 -1
- package/dist/{dls-BBq99pjI.mjs → dls-BF5iN78p.mjs} +1 -1
- package/dist/{dns-DdQYtenF.mjs → dns-CeCTNqRk.mjs} +11 -11
- package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-B54MaLGm.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wIVDg_fl.mjs} +1 -1
- package/dist/{durable-objects-BvxXBht_.mjs → durable-objects-D8FQORrL.mjs} +1 -1
- package/dist/{email-auth-DFvXKSkg.mjs → email-auth-DJK0Eb30.mjs} +1 -1
- package/dist/email-routing-NpmiKIrl.mjs +6 -0
- package/dist/{email-security-BFagcRPP.mjs → email-security-BLZ7WZ9Z.mjs} +2 -2
- package/dist/email-sending-dn-353Nx.mjs +7 -0
- package/dist/fieldExtractors-ahysj57J.mjs +3 -0
- package/dist/firewall-CBPGJ43p.mjs +11 -0
- package/dist/{flagship-FJHc4mFi.mjs → flagship-BusjRNIb.mjs} +3 -3
- package/dist/{fraud-AH47n-wL.mjs → fraud-BIhS8pLf.mjs} +1 -1
- package/dist/{google-tag-gateway-149kbuG_.mjs → google-tag-gateway-TZZ3F1tV.mjs} +1 -1
- package/dist/{healthchecks-DfEUG007.mjs → healthchecks-FiXIk-KP.mjs} +2 -2
- package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-Bx0mykMR.mjs} +1 -1
- package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-C8qCabBF.mjs} +1 -1
- package/dist/{iam-BhHYhMXO.mjs → iam-Cj63Kjc6.mjs} +1 -1
- package/dist/{images-CDViyKtZ.mjs → images-CBWXCDhy.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-YHZbPlS3.mjs → intel-B-9Z_sJs.mjs} +2 -2
- package/dist/{interactive-mV8PABm6.mjs → interactive-DtsCYfrK.mjs} +1 -1
- package/dist/{ips-BpCdldFx.mjs → ips-qs9eGJnI.mjs} +1 -1
- package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-THHvoXX3.mjs} +1 -1
- package/dist/{keys-yYtv7Ztr.mjs → keys-D7N0j4-x.mjs} +1 -1
- package/dist/{kv-Bi9B4E0A.mjs → kv-BFDUCnft.mjs} +1 -1
- package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-DUlUCOoJ.mjs} +1 -1
- package/dist/load-balancers-D2zbQ8fT.mjs +6 -0
- package/dist/{local-DTyuGwTw.mjs → local-D-aVNu6A.mjs} +1 -1
- package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Dh3keC5v.mjs} +1 -1
- package/dist/logexplorer-CUsfZ_bS.mjs +13 -0
- package/dist/{logo-matches-LyDAYPbI.mjs → logo-matches-CJcthPHf.mjs} +1 -1
- package/dist/{logos-O9f5bGSB.mjs → logos-BS65zN8q.mjs} +1 -1
- package/dist/logpush-BK34mMQs.mjs +4 -0
- package/dist/{logs-DmWWL5f9.mjs → logs-CLAqX9h2.mjs} +1 -1
- package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-h_ozrC5S.mjs} +1 -1
- package/dist/magic-network-monitoring-C7tAPNKP.mjs +4 -0
- package/dist/{magic-transit-DwgZeIj-.mjs → magic-transit-BtsFePMx.mjs} +5 -5
- package/dist/{managed-transforms-DCmogkxv.mjs → managed-transforms-Cm_KVCMB.mjs} +1 -1
- package/dist/{matches-BAeN8VM1.mjs → matches-InA1hwII.mjs} +1 -1
- package/dist/{mcp-DKZ2D050.mjs → mcp-mJ7bekNJ.mjs} +1 -1
- package/dist/mesh-BK4S1Ezy.mjs +4 -0
- package/dist/{moq-CJpE-eNj.mjs → moq-qmuVPAO0.mjs} +1 -1
- package/dist/{mtls-certificates-Bbm_1lQI.mjs → mtls-certificates-CU4OAAXY.mjs} +1 -1
- package/dist/{network-D2WRXCDe.mjs → network-D74cSy3t.mjs} +1 -1
- package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-BJ0Nc48J.mjs} +1 -1
- package/dist/{oauth-BPizUUqP.mjs → oauth-B0ETkNcX.mjs} +2 -2
- package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-Br-smLxQ.mjs} +1 -1
- package/dist/{oauth-scopes-CmbgsPYd.mjs → oauth-scopes-D5bF11ju.mjs} +1 -1
- package/dist/observability-BWE0Gg3V.mjs +4 -0
- package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-R-qesf18.mjs} +1 -1
- package/dist/{organization-D41rIvJa.mjs → organization-NX7yCZrq.mjs} +1 -1
- package/dist/{organizations-eNzfOwlP.mjs → organizations-DLhiRt8g.mjs} +1 -1
- package/dist/{origin-ca-certificates-DaiAmw45.mjs → origin-ca-certificates-Ff4McZRQ.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-7YztBged.mjs → origin-post-quantum-encryption-UuTr4_SW.mjs} +1 -1
- package/dist/{origin-tls-client-auth-DRwURM8s.mjs → origin-tls-client-auth-DOJ1zlH3.mjs} +1 -1
- package/dist/{output-DgW1hQGX.mjs → output-DrpYYfnB.mjs} +1 -1
- package/dist/{page-rules-B2Csdc4h.mjs → page-rules-BSz1gO-_.mjs} +1 -1
- package/dist/{pages-BAL6Q7OY.mjs → pages-DVDogxPs.mjs} +4 -4
- package/dist/{pay-per-crawl-C-1-ZAtn.mjs → pay-per-crawl-BrLXK7gT.mjs} +1 -1
- package/dist/{pipelines-cyQOuFLb.mjs → pipelines-BszRk4sM.mjs} +2 -2
- package/dist/{precursor-BrweY39h.mjs → precursor-BPNjQr76.mjs} +1 -1
- package/dist/progress-CsHIt3Tp.mjs +2 -0
- package/dist/{prompt-CDtLWxNv.mjs → prompt-DdegNPpg.mjs} +1 -1
- package/dist/{queries-oM8uGZy5.mjs → queries-JL1H1Biz.mjs} +1 -1
- package/dist/{queues-CTx04ZNw.mjs → queues-DpkYdRUE.mjs} +1 -1
- package/dist/{r2-CnlIUn7R.mjs → r2-CKozthw_.mjs} +4 -4
- package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-Du7hN9jA.mjs} +1 -1
- package/dist/radar-C-92vggG.mjs +2 -0
- package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-yBF3qoYD.mjs} +1 -1
- package/dist/{raw-fetch-Dz-QBoP_.mjs → raw-fetch-CteyTOM2.mjs} +1 -1
- package/dist/realtimekit-CIP7lP-a.mjs +7 -0
- package/dist/{registrar-BEcb90RX.mjs → registrar-DKKN0M29.mjs} +3 -3
- package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-DiXg8p_1.mjs} +3 -3
- package/dist/{registry-DDcSvd8H.mjs → registry-Bck_zFkz.mjs} +1 -1
- package/dist/{reporting-CLbjHlnw.mjs → reporting-fg_GKXe1.mjs} +1 -1
- package/dist/{request-tracers-BcKpofP1.mjs → request-tracers-CkMya96z.mjs} +1 -1
- package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-D1pSDvtf.mjs} +1 -1
- package/dist/{resource-tagging-DGEyVTDN.mjs → resource-tagging-z48JGHCq.mjs} +1 -1
- package/dist/{rules-CmuB5rIN.mjs → rules-BTmNjDN-.mjs} +1 -1
- package/dist/rulesets-CsoSM-17.mjs +5 -0
- package/dist/{rum-QT6EP4JK.mjs → rum-DB4iO2q5.mjs} +1 -1
- package/dist/{schema-BeXPWeK9.mjs → schema-B34Q9tLF.mjs} +1 -1
- package/dist/{schema-flags-DHryz6SF.mjs → schema-flags-iGoOriJt.mjs} +1 -1
- package/dist/{scim-BgGsmHrL.mjs → scim-CcSyfKCH.mjs} +1 -1
- package/dist/sdk-ZctLa5jW.mjs +3 -0
- package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DFmvtphu.mjs} +1 -1
- package/dist/security-center-DFKeHq5c.mjs +2 -0
- package/dist/{security-txt-Be2Bif0z.mjs → security-txt-DqnFpjMI.mjs} +1 -1
- package/dist/{session-Ckt20hHa.mjs → session-D6KHthHf.mjs} +1 -1
- package/dist/{share-Bz2tFTUP.mjs → share-BuwYUzOL.mjs} +1 -1
- package/dist/{shared-BzPQog8H.mjs → shared-VppSAQf4.mjs} +1 -1
- package/dist/{smart-shield-SODkOUyO.mjs → smart-shield-D6X8L7p8.mjs} +2 -2
- package/dist/{snippets-B5jY8v_7.mjs → snippets-DIpc9pb_.mjs} +1 -1
- package/dist/{spawn-CHkoow5W.mjs → spawn-O1RS01vr.mjs} +2 -2
- package/dist/{spectrum-BA0a42eM.mjs → spectrum-b7N1ZRAm.mjs} +1 -1
- package/dist/{speed-mmOjxOzo.mjs → speed-cw31yFva.mjs} +1 -1
- package/dist/src-D_HETJNy.mjs +108 -0
- package/dist/{ssl-Yr6kELqg.mjs → ssl-CsEhRVTO.mjs} +1 -1
- package/dist/{state-DZC531l2.mjs → state-Bb5Cbc_L.mjs} +1 -1
- package/dist/{stream-Cu0kYWbc.mjs → stream-DFOao6Gu.mjs} +3 -3
- package/dist/{submit-Dl_27e0n.mjs → submit--xTzyNPy.mjs} +1 -1
- package/dist/{tags-Cdo_Pwtr.mjs → tags-efICDkah.mjs} +1 -1
- package/dist/{tenant-EX-ANl6X.mjs → tenant-CerHuToJ.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BPHUeckw.mjs → tenant-custom-nameservers-C4otMBm2.mjs} +1 -1
- package/dist/{tools-D2Xxfkrc.mjs → tools-BHfBOZOU.mjs} +1 -1
- package/dist/{triggers-Bf9hbP3h.mjs → triggers-BEsiiKAf.mjs} +1 -1
- package/dist/{tunnel-CDYkWjnt.mjs → tunnel-DkMiNtVY.mjs} +1 -1
- package/dist/{tunnels-CgyX8R2J.mjs → tunnels-D0J8lJoI.mjs} +1 -1
- package/dist/{turnstile-BUtzlW-0.mjs → turnstile-CFmtY5bn.mjs} +2 -2
- package/dist/{ui-DIpjthrV.mjs → ui-DE8CNn6c.mjs} +1 -1
- package/dist/{url-info-CJsa1Oc9.mjs → url-info-DBCeRWwb.mjs} +1 -1
- package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-ClfFiruK.mjs} +1 -1
- package/dist/{url-scanner-Cz-yl0_3.mjs → url-scanner-CNyvg65L.mjs} +1 -1
- package/dist/{user-BxHjEqpd.mjs → user-bifVEQq5.mjs} +2 -2
- package/dist/{values-C43NurfT.mjs → values-OxkdP1tV.mjs} +1 -1
- package/dist/{vectorize-CjXfiFH4.mjs → vectorize-CVKu7lEt.mjs} +1 -1
- package/dist/{versions-BFbc90Wu.mjs → versions-BVL-Ludh.mjs} +1 -1
- package/dist/waiting-rooms-CmRAl51T.mjs +11 -0
- package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C2s9kzWf.mjs} +1 -1
- package/dist/{web3-Ctv9HGiR.mjs → web3-y_cY91V_.mjs} +1 -1
- package/dist/{workers-builds-B44wc67O.mjs → workers-builds-B55-oXOa.mjs} +4 -4
- package/dist/{workers-D-YbIedB.mjs → workers-jDcq14GH.mjs} +6 -6
- package/dist/{workflows-rFuQWClt.mjs → workflows-B-kGHxFu.mjs} +2 -2
- package/dist/{zaraz-BA6kY-b6.mjs → zaraz-27zwjLvv.mjs} +1 -1
- package/dist/zero-trust-DV3sIOvu.mjs +92 -0
- package/dist/{zone-B_rgejLV.mjs → zone-BJix2KQ9.mjs} +1 -1
- package/dist/{zones-DTWO7Vvn.mjs → zones-Bkj5i92c.mjs} +1 -1
- package/package.json +1 -1
- package/dist/account-tags-65fAlHrf.mjs +0 -9
- package/dist/accounts-Bp5KGc6r.mjs +0 -28
- package/dist/ai-search-B2l3B_jn.mjs +0 -7
- package/dist/analytics-DeIKjC9n.mjs +0 -3
- package/dist/argo-DFerMyXF.mjs +0 -2
- package/dist/artifacts-CtyEYYDa.mjs +0 -4
- package/dist/browser-run-FwtwnBzA.mjs +0 -4
- package/dist/cloudforce-one-2PecncfX.mjs +0 -30
- package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
- package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
- package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
- package/dist/custom-pages-vfDxrXbt.mjs +0 -4
- package/dist/email-CGOC_evd.mjs +0 -2
- package/dist/email-routing-QBRPBlyl.mjs +0 -6
- package/dist/email-sending-Ddhe7xjN.mjs +0 -7
- package/dist/filters-CGisPGD1.mjs +0 -4
- package/dist/firewall-DD8U-Brd.mjs +0 -11
- package/dist/load-balancers-jRCN75mX.mjs +0 -7
- package/dist/logexplorer-kO8CULiK.mjs +0 -24
- package/dist/logpush-dtXLu3Ck.mjs +0 -5
- package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
- package/dist/media-CnxgOViL.mjs +0 -2
- package/dist/mesh-CzIPtuaM.mjs +0 -4
- package/dist/observability-DXYgDdU5.mjs +0 -4
- package/dist/progress-B84wYh91.mjs +0 -2
- package/dist/radar-CGNgGh8v.mjs +0 -2
- package/dist/realtimekit-BPwzhNS9.mjs +0 -7
- package/dist/rulesets-CGaMq8vG.mjs +0 -8
- package/dist/sdk-m4xeaua4.mjs +0 -3
- package/dist/security-center-BNm4uPVB.mjs +0 -2
- package/dist/src-CHW7s5IS.mjs +0 -108
- package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
- package/dist/zero-trust-DOFLlUz1.mjs +0 -102
- package/dist/zone-tags-BWdza4rH.mjs +0 -9
- /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
- /package/dist/{alerts-B85uj2Vx.mjs → alerts-CRmjqOZi.mjs} +0 -0
- /package/dist/{autorag-Do9l_LyY.mjs → autorag-BD7cu5NU.mjs} +0 -0
- /package/dist/{body-parser-CYD7PKFC.mjs → body-parser-C-c9gfH1.mjs} +0 -0
- /package/dist/{brands-DateHCdd.mjs → brands-BhALBkX2.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-B7bSMYLe.mjs} +0 -0
- /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
- /package/dist/{clear-CB2kgcEB.mjs → clear-BgF8No7D.mjs} +0 -0
- /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-BsTty22w.mjs} +0 -0
- /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C50W5GhA.mjs} +0 -0
- /package/dist/{health-buY5f5pp.mjs → health-BFNZqiAm.mjs} +0 -0
- /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-Bav2M9F-.mjs} +0 -0
- /package/dist/{internal-CwyoJUHh.mjs → internal-BTeSewwB.mjs} +0 -0
- /package/dist/{live-wEpA5V_n.mjs → live-Dkiyu30_.mjs} +0 -0
- /package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BwQqexwo-CNW_dPly.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-Dz-Wv1T0.mjs} +0 -0
- /package/dist/{ready-CBSCPiHE.mjs → ready-TKOkKeRg.mjs} +0 -0
- /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-3Asm6eIi.mjs} +0 -0
- /package/dist/{refute-u7ZPQJZy.mjs → refute-BVz9nMyd.mjs} +0 -0
- /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-CeBbH6Pq.mjs} +0 -0
- /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-ZteA-PUV.mjs} +0 -0
- /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-DWDSyzQ7.mjs} +0 -0
- /package/dist/{search-D9WDwnV4.mjs → search-DGNc37HK.mjs} +0 -0
- /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-B5Qpn2mn.mjs} +0 -0
- /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-FjUolE6A.mjs} +0 -0
- /package/dist/{theme-BePJemMn.mjs → theme-CeVf-5qG.mjs} +0 -0
- /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-NHJj1HGq.mjs} +0 -0
- /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CniKVHIp.mjs} +0 -0
- /package/dist/{verify-2yi0H93r.mjs → verify-DS1PWAJe.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{i as r}from"./session-Ckt20hHa.mjs";import{A as i,B as a,Dt as o,E as s,Et as c,F as l,G as u,H as d,J as f,K as p,L as m,M as h,N as g,O as _,Ot as v,P as y,Q as b,St as x,T as S,Tt as C,X as w,Y as T,Z as E,_ as D,_t as O,at as k,b as A,bt as ee,ct as te,dt as ne,ft as j,gt as re,ht as ie,it as ae,j as oe,k as M,kt as N,mt as P,nt as se,pt as ce,rt as le,st as ue,ut as de,vt as fe,wt as pe,xt as me,yt as he}from"./chunk-LQW53VED-Xakf_rUn.mjs";import{c as ge}from"./interactive-mV8PABm6.mjs";import{r as _e}from"./build-Dji9BYmV.mjs";import{C as ve,S as ye,T as be,_ as xe,b as Se,c as Ce,d as we,f as Te,g as Ee,h as De,l as Oe,m as ke,o as Ae,p as je,s as Me,u as Ne,v as Pe,w as Fe,x as Ie,y as Le}from"./spawn-CHkoow5W.mjs";import{createRequire as Re}from"node:module";import{createReadStream as ze,existsSync as Be,mkdirSync as Ve,readFileSync as He,statSync as Ue,writeFileSync as We}from"node:fs";import Ge from"node:assert";import*as Ke from"node:path";import qe,{dirname as Je,extname as Ye,isAbsolute as Xe,join as Ze,resolve as Qe,sep as $e}from"node:path";import{execSync as et,spawn as tt,spawnSync as nt}from"node:child_process";import{createHash as rt}from"node:crypto";import{Blob as it}from"node:buffer";import{gzipSync as at}from"node:zlib";import ot,{URLSearchParams as st}from"node:url";import{access as ct,readFile as lt,readdir as ut,stat as dt,writeFile as ft}from"node:fs/promises";import pt from"node:readline";import{hash as mt}from"blake3-wasm";import{getFreshSourceMapSupport as ht,getNodeCompat as gt}from"miniflare";var _t=Object.create,vt=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,xt=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty,F=(e,t)=>vt(e,`name`,{value:t,configurable:!0}),Ct=t===void 0?Re(import.meta.url):t,wt=(e,t)=>function(){return t||(0,e[bt(e)[0]])((t={exports:{}}).exports,t),t.exports},Tt=(e,t)=>{for(var n in t)vt(e,n,{get:t[n],enumerable:!0})},Et=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of bt(t))!St.call(e,i)&&i!==n&&vt(e,i,{get:()=>t[i],enumerable:!(r=yt(t,i))||r.enumerable});return e},Dt=(e,t,n)=>(n=e==null?{}:_t(xt(e)),Et(t||!e||!e.__esModule?vt(n,`default`,{value:e,enumerable:!0}):n,e)),I,L,Ot,kt,At,jt,Mt;function Nt(e){I=e.logger,L=e.fetchResult,Ot=e.fetchListResult,kt=e.fetchPagedListResult,e.fetchKVGetValue,At=e.confirm,jt=e.prompt,Mt=e.select}F(Nt,`initDeployHelpersContext`);var Pt=n(((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)}})),Ft=n(((e,t)=>{t.exports=Pt()})),It=T(),Lt=Ft();function Rt(e){if(e.compiled_schema)return He(Qe(e.compiled_schema));let{base_path:t,source_schemas:n}=e,r=(n??[]).map(e=>Qe(t,e));if(!(0,Lt.sync)(`capnp`))throw new N(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let i=nt(`capnp`,[`compile`,`-o-`,`--src-prefix=${Qe(t??`.`)}`,...r],{maxBuffer:3*1024*1024});if(i.error)throw i.error;if(i.stderr.length)throw Error(i.stderr.toString());return i.stdout}F(Rt,`handleUnsafeCapnp`);var zt={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 Bt(e){let t=zt[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}F(Bt,`toMimeType`);function Vt(e){let t=Object.keys(zt).find(t=>zt[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}F(Vt,`fromMimeType`);function Ht(e,t,n){let r=new It.FormData,{main:i,sourceMaps:a,migrations:o,exports:c,compatibility_date:l,compatibility_flags:u,keepVars:f,keepSecrets:p,keepBindings:m,logpush:h,placement:g,tail_consumers:_,streaming_tail_consumers:v,limits:y,annotations:b,keep_assets:x,assets:S,observability:C,cache:w,package_dependencies:T}=e,E={html_handling:S?.assetConfig?.html_handling,not_found_handling:S?.assetConfig?.not_found_handling,run_worker_first:S?.run_worker_first,_redirects:S?._redirects,_headers:S?._headers};if(S&&!S.routerConfig.has_user_worker)return r.set(`metadata`,JSON.stringify({assets:{jwt:S.jwt,config:E},...b&&{annotations:b},...l&&{compatibility_date:l},...u&&{compatibility_flags:u}})),r;let{modules:D}=e,O=[],k=s(`plain_text`,t),A=s(`json`,t),ee=s(`secret_text`,t),te=s(`kv_namespace`,t),ne=s(`send_email`,t),j=s(`durable_object_namespace`,t),re=s(`workflow`,t),ie=s(`queue`,t),ae=s(`r2_bucket`,t),oe=s(`d1`,t),M=s(`vectorize`,t),se=s(`ai_search_namespace`,t),ce=s(`ai_search`,t),le=s(`websearch`,t)[0],ue=s(`agent_memory`,t),de=s(`hyperdrive`,t),fe=s(`secrets_store_secret`,t),pe=s(`artifacts`,t),me=s(`unsafe_hello_world`,t),he=s(`flagship`,t),ge=s(`ratelimit`,t),_e=s(`vpc_service`,t),ve=s(`vpc_network`,t),ye=s(`service`,t),be=s(`analytics_engine`,t),xe=s(`dispatch_namespace`,t),Se=s(`mtls_certificate`,t),Ce=s(`pipeline`,t),we=s(`worker_loader`,t),Te=s(`logfwdr`,t),Ee=s(`wasm_module`,t),De=s(`browser`,t)[0],Oe=s(`ai`,t)[0],ke=s(`images`,t)[0],Ae=s(`stream`,t)[0],je=s(`media`,t)[0],Me=s(`version_metadata`,t)[0],Ne=s(`assets`,t)[0],Pe=s(`text_blob`,t),Fe=s(`data_blob`,t);s(`inherit`,t).forEach(({binding:e})=>{O.push({name:e,type:`inherit`})}),k.forEach(({binding:e,value:t})=>{O.push({name:e,type:`plain_text`,text:t})}),A.forEach(({binding:e,value:t})=>{O.push({name:e,type:`json`,json:t})}),ee.forEach(({binding:e,value:t})=>{O.push({name:e,type:`secret_text`,text:t})}),te.forEach(({id:e,binding:t,raw:r})=>{if(n?.dryRun&&(e??=P),e===void 0)throw new N(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===P?O.push({name:t,type:`inherit`}):O.push({name:t,type:`kv_namespace`,namespace_id:e,raw:r})}),ne.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?O.push(t):O.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):O.push({...t,destination_address:e.destination_address})}),j.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{O.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),re.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{O.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),ie.forEach(({binding:e,queue_name:t,delivery_delay:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({type:`queue`,name:e,queue_name:t,delivery_delay:r,raw:i})}),ae.forEach(({binding:e,bucket_name:t,jurisdiction:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:r,raw:i})}),oe.forEach(({binding:e,database_id:t,database_internal_env:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`d1`,id:t,internalEnv:r,raw:i})}),M.forEach(({binding:e,index_name:t,raw:n})=>{O.push({name:e,type:`vectorize`,index_name:t,raw:n})}),se.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`ai_search_namespace`,namespace:t})}),ce.forEach(({binding:e,instance_name:t})=>{O.push({name:e,type:`ai_search`,instance_name:t})}),le!==void 0&&O.push({name:le.binding,type:`websearch`}),ue.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`agent_memory`,namespace:t})}),de.forEach(({binding:e,id:t})=>{O.push({name:e,type:`hyperdrive`,id:t})}),fe.forEach(({binding:e,store_id:t,secret_name:n})=>{O.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),pe.forEach(({binding:e,namespace:t})=>{O.push({name:e,type:`artifacts`,namespace:t})}),me.forEach(({binding:e,enable_timer:t})=>{O.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),he.forEach(({binding:e,app_id:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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`});O.push(t===P?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),ge.forEach(({name:e,namespace_id:t,simple:n})=>{O.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),_e.forEach(({binding:e,service_id:t})=>{O.push({name:e,type:`vpc_service`,service_id:t})}),ve.forEach(({binding:e,tunnel_id:t,network_id:n})=>{O.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),ye.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{O.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),be.forEach(({binding:e,dataset:t})=>{O.push({name:e,type:`analytics_engine`,dataset:t})}),xe.forEach(({binding:e,namespace:t,outbound:r})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`dispatch_namespace`,namespace:t,...r&&{outbound:{worker:{service:r.service,environment:r.environment},params:r.parameters?.map(e=>({name:e}))}}})}),Se.forEach(({binding:e,certificate_id:t})=>{O.push({name:e,type:`mtls_certificate`,certificate_id:t})}),Ce.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)O.push({name:e,type:`pipelines`,stream:t});else if(n)O.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),we.forEach(({binding:e})=>{O.push({name:e,type:`worker_loader`})}),Te.forEach(({name:e,destination:t})=>{O.push({name:e,type:`logfwdr`,destination:t})}),Ee.forEach(({binding:e,source:t})=>{O.push({name:e,type:`wasm_module`,part:e}),r.set(e,new File([`contents`in t?t.contents:He(t.path)],`path`in t?t.path??e:e,{type:`application/wasm`}))}),De!==void 0&&O.push({name:De.binding,type:`browser`,raw:De.raw}),Oe!==void 0&&O.push({name:Oe.binding,staging:Oe.staging,type:`ai`,raw:Oe.raw}),ke!==void 0&&O.push({name:ke.binding,type:`images`,raw:ke.raw}),Ae!==void 0&&O.push({name:Ae.binding,type:`stream`}),je!==void 0&&O.push({name:je.binding,type:`media`}),Me!==void 0&&O.push({name:Me.binding,type:`version_metadata`}),Ne!==void 0&&O.push({name:Ne.binding,type:`assets`}),Pe.forEach(({binding:e,source:t})=>{O.push({name:e,type:`text_blob`,part:e}),e!==`__STATIC_CONTENT_MANIFEST`&&(`contents`in t?r.set(e,new File([t.contents],t.path??e,{type:`text/plain`})):r.set(e,new File([He(t.path)],t.path,{type:`text/plain`})))}),Fe.forEach(({binding:e,source:t})=>{O.push({name:e,type:`data_blob`,part:e}),r.set(e,new File([`contents`in t?t.contents:He(t.path)],`path`in t?t.path??e:e,{type:`application/octet-stream`}))});for(let[e,n]of Object.entries(t??{}))if(d(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;O.push({name:e,type:t.slice(7),...r})}let Ie=`__STATIC_CONTENT_MANIFEST`;if(D?.some(({name:e})=>e===Ie)&&i.type===`esm`){Ge(D!==void 0);let e=new Set(D.map(e=>qe.posix.dirname(e.name)));for(let t of e){if(t===`.`)continue;let e=qe.posix.relative(t,Ie),n=qe.posix.join(t,Ie);D.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(i.type===`commonjs`){for(let e of Object.values([...D||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)r.set(e.name,new File([e.content],e.name,{type:`text/plain`})),D=D?.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,`_`);O.push({name:t,type:e.type===`compiled-wasm`?`wasm_module`:e.type===`text`?`text_blob`:`data_blob`,part:t}),r.set(t,new File([e.content],e.name,{type:e.type===`compiled-wasm`?`application/wasm`:e.type===`text`?`text/plain`:`application/octet-stream`})),D=D?.filter(t=>t!==e)}}let Le;if(n?.unsafe?.capnp){let e=Rt(n.unsafe.capnp);Le=`./capnp-${Date.now()}.compiled`,r.set(Le,new File([e],Le,{type:`application/octet-stream`}))}let Re;f&&(Re??=[],Re.push(`plain_text`,`json`)),p&&(Re??=[],Re.push(`secret_text`,`secret_key`)),m&&(Re??=[],Re.push(...m));let ze={...i.type===`commonjs`?{body_part:i.name}:{main_module:i.name},bindings:O,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}})),...l&&{compatibility_date:l},...u&&{compatibility_flags:u},...o&&{migrations:o},...c&&Object.keys(c).length>0&&{exports:c},capnp_schema:Le,...Re&&{keep_bindings:Re},...h!==void 0&&{logpush:h},...g&&{placement:g},..._&&{tail_consumers:_},...v&&{streaming_tail_consumers:v},...y&&{limits:y},...b&&{annotations:b},...x!==void 0&&{keep_assets:x},...S&&{assets:{jwt:S.jwt,config:E}},...C&&{observability:C},...w&&{cache_options:w},...T?.length&&{package_dependencies:T}};if(n?.unsafe?.metadata!==void 0)for(let e of Object.keys(n.unsafe.metadata))ze[e]=n.unsafe.metadata[e];if(r.set(`metadata`,JSON.stringify(ze)),i.type===`commonjs`&&D&&D.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[i].concat(D||[]))r.set(e.name,new File([e.content],e.name,{type:Bt(e.type??i.type??`esm`)}));for(let e of a||[])r.set(e.name,new File([e.content],e.name,{type:`application/source-map`}));return r}F(Ht,`createWorkerUploadForm`);var Ut=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1),Wt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Gt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function Kt(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(Gt(o));return}if(o&&(c=()=>{l(Gt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Wt;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function qt(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var Jt=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},i={priority:n,id:r,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(i);return}let a=qt(this.#e,i,(e,t)=>t.priority-e.priority);this.#e.splice(a,0,i)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},Yt=class extends Ut.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f;#p=0;#m;#h;#g=1n;#_=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Jt,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=new e.queueClass,this.#f=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#h=e.autoStart===!1,this.#M()}get#v(){return this.#t||this.#n<this.#r}get#y(){return this.#p<this.#m}#b(){this.#p--,this.#p===0&&this.emit(`pendingZero`),this.#E(),this.emit(`next`)}#x(){this.#O(),this.#D(),this.#u=void 0}get#S(){let e=Date.now();if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#C(this.#o-t),!0}this.#n=this.#e?this.#p:0}else return this.#C(t),!0}return!1}#C(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#x()},e))}#w(){this.#l&&=(clearInterval(this.#l),void 0)}#T(){this.#u&&=(clearTimeout(this.#u),void 0)}#E(){if(this.#d.size===0)return this.#w(),this.emit(`empty`),this.#p===0&&(this.#T(),this.emit(`idle`)),!1;let e=!1;if(!this.#h){let t=!this.#S;if(this.#v&&this.#y){let n=this.#d.dequeue();this.#t||(this.#n++,this.#N()),this.emit(`active`),this.#c=Date.now(),n(),t&&this.#D(),e=!0}}return e}#D(){this.#t||this.#l!==void 0||(this.#l=setInterval(()=>{this.#O()},this.#o),this.#s=Date.now()+this.#o)}#O(){this.#n===0&&this.#p===0&&this.#l&&this.#w(),this.#n=this.#e?this.#p:0,this.#k(),this.#N()}#k(){for(;this.#E(););}get concurrency(){return this.#m}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#m=e,this.#k()}async#A(e){return new Promise((t,n)=>{e.addEventListener(`abort`,()=>{n(e.reason)},{once:!0})})}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#d.setPriority(e,t)}async add(e,t={}){return t.id??=(this.#g++).toString(),t={timeout:this.timeout,...t},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`);this.#d.enqueue(async()=>{this.#p++,this.#_.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});try{try{t.signal?.throwIfAborted()}catch(e){throw this.#t||this.#n--,this.#_.delete(i),e}let r=e({signal:t.signal});t.timeout&&(r=Kt(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#p} running, ${this.#d.size} waiting)`})),t.signal&&(r=Promise.race([r,this.#A(t.signal)]));let a=await r;n(a),this.emit(`completed`,a)}catch(e){r(e),this.emit(`error`,e)}finally{this.#_.delete(i),queueMicrotask(()=>{this.#b()})}},t),this.emit(`add`),this.#E()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#h?(this.#h=!1,this.#k(),this):this}pause(){this.#h=!0}clear(){this.#d=new this.#f,this.#P()}async onEmpty(){this.#d.size!==0&&await this.#j(`empty`)}async onSizeLessThan(e){this.#d.size<e||await this.#j(`next`,()=>this.#d.size<e)}async onIdle(){this.#p===0&&this.#d.size===0||await this.#j(`idle`)}async onPendingZero(){this.#p!==0&&await this.#j(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#j(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#j(`rateLimitCleared`)}async onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#j(e,t){return new Promise(n=>{let r=()=>{t&&!t()||(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#d.size}sizeBy(e){return this.#d.filter(e).length}get pending(){return this.#p}get isPaused(){return this.#h}#M(){this.#t||(this.on(`add`,()=>{this.#d.size>0&&this.#N()}),this.on(`next`,()=>{this.#N()}))}#N(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#P()}))}#P(){let e=this.#i,t=!this.#t&&this.#n>=this.#r&&this.#d.size>0;t!==e&&(this.#i=t,this.emit(t?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#p===this.#m&&this.#d.size>0||this.isRateLimited&&this.#d.size>0}get runningTasks(){return[...this.#_.values()].map(e=>({...e}))}};const Xt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],Zt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],Qt=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],$t=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],en=(e,t,n)=>{let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function tn(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let n=t.bits?t.binary?$t:Qt:t.binary?Zt:Xt,r=t.space?` `:``;if(t.signed&&e===0)return` 0${r}${n[0]}`;let i=e<0,a=i?`-`:t.signed?`+`:``;i&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1)return a+en(e,t.locale,o)+r+n[0];let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let c=en(Number(e),t.locale,o),l=n[s];return a+c+r+l}var nn=n(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),rn=n(((e,n)=>{let r=t(`fs`),i=t(`path`),a=t(`os`),o=t(`crypto`),s=nn().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function l(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
|
|
2
|
+
import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{i as r}from"./session-D6KHthHf.mjs";import{A as i,B as a,Dt as o,E as s,Et as c,F as l,G as u,H as d,J as f,K as p,L as m,M as h,N as g,O as _,Ot as v,P as y,Q as b,St as x,T as S,Tt as C,X as w,Y as T,Z as E,_ as D,_t as O,at as k,b as A,bt as ee,ct as te,dt as ne,ft as j,gt as re,ht as ie,it as ae,j as oe,k as M,kt as N,mt as P,nt as se,pt as ce,rt as le,st as ue,ut as de,vt as fe,wt as pe,xt as me,yt as he}from"./chunk-LQW53VED-DLrXV-hE.mjs";import{c as ge}from"./interactive-DtsCYfrK.mjs";import{r as _e}from"./build-DcflwvqN.mjs";import{C as ve,S as ye,T as be,_ as xe,b as Se,c as Ce,d as we,f as Te,g as Ee,h as De,l as Oe,m as ke,o as Ae,p as je,s as Me,u as Ne,v as Pe,w as Fe,x as Ie,y as Le}from"./spawn-O1RS01vr.mjs";import{createRequire as Re}from"node:module";import{createReadStream as ze,existsSync as Be,mkdirSync as Ve,readFileSync as He,statSync as Ue,writeFileSync as We}from"node:fs";import Ge from"node:assert";import*as Ke from"node:path";import qe,{dirname as Je,extname as Ye,isAbsolute as Xe,join as Ze,resolve as Qe,sep as $e}from"node:path";import{execSync as et,spawn as tt,spawnSync as nt}from"node:child_process";import{createHash as rt}from"node:crypto";import{Blob as it}from"node:buffer";import{gzipSync as at}from"node:zlib";import ot,{URLSearchParams as st}from"node:url";import{access as ct,readFile as lt,readdir as ut,stat as dt,writeFile as ft}from"node:fs/promises";import pt from"node:readline";import{hash as mt}from"blake3-wasm";import{getFreshSourceMapSupport as ht,getNodeCompat as gt}from"miniflare";var _t=Object.create,vt=Object.defineProperty,yt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,xt=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty,F=(e,t)=>vt(e,`name`,{value:t,configurable:!0}),Ct=t===void 0?Re(import.meta.url):t,wt=(e,t)=>function(){return t||(0,e[bt(e)[0]])((t={exports:{}}).exports,t),t.exports},Tt=(e,t)=>{for(var n in t)vt(e,n,{get:t[n],enumerable:!0})},Et=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of bt(t))!St.call(e,i)&&i!==n&&vt(e,i,{get:()=>t[i],enumerable:!(r=yt(t,i))||r.enumerable});return e},Dt=(e,t,n)=>(n=e==null?{}:_t(xt(e)),Et(t||!e||!e.__esModule?vt(n,`default`,{value:e,enumerable:!0}):n,e)),I,L,Ot,kt,At,jt,Mt;function Nt(e){I=e.logger,L=e.fetchResult,Ot=e.fetchListResult,kt=e.fetchPagedListResult,e.fetchKVGetValue,At=e.confirm,jt=e.prompt,Mt=e.select}F(Nt,`initDeployHelpersContext`);var Pt=n(((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)}})),Ft=n(((e,t)=>{t.exports=Pt()})),It=T(),Lt=Ft();function Rt(e){if(e.compiled_schema)return He(Qe(e.compiled_schema));let{base_path:t,source_schemas:n}=e,r=(n??[]).map(e=>Qe(t,e));if(!(0,Lt.sync)(`capnp`))throw new N(`The capnp compiler is required to upload capnp schemas, but is not present.`,{telemetryMessage:`capnp compiler missing`});let i=nt(`capnp`,[`compile`,`-o-`,`--src-prefix=${Qe(t??`.`)}`,...r],{maxBuffer:3*1024*1024});if(i.error)throw i.error;if(i.stderr.length)throw Error(i.stderr.toString());return i.stdout}F(Rt,`handleUnsafeCapnp`);var zt={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 Bt(e){let t=zt[e];if(t===void 0)throw TypeError(`Unsupported module: `+e);return t}F(Bt,`toMimeType`);function Vt(e){let t=Object.keys(zt).find(t=>zt[t]===e);if(t===void 0)throw TypeError(`Unsupported mime type: `+e);return t}F(Vt,`fromMimeType`);function Ht(e,t,n){let r=new It.FormData,{main:i,sourceMaps:a,migrations:o,exports:c,compatibility_date:l,compatibility_flags:u,keepVars:f,keepSecrets:p,keepBindings:m,logpush:h,placement:g,tail_consumers:_,streaming_tail_consumers:v,limits:y,annotations:b,keep_assets:x,assets:S,observability:C,cache:w,package_dependencies:T}=e,E={html_handling:S?.assetConfig?.html_handling,not_found_handling:S?.assetConfig?.not_found_handling,run_worker_first:S?.run_worker_first,_redirects:S?._redirects,_headers:S?._headers};if(S&&!S.routerConfig.has_user_worker)return r.set(`metadata`,JSON.stringify({assets:{jwt:S.jwt,config:E},...b&&{annotations:b},...l&&{compatibility_date:l},...u&&{compatibility_flags:u}})),r;let{modules:D}=e,O=[],k=s(`plain_text`,t),A=s(`json`,t),ee=s(`secret_text`,t),te=s(`kv_namespace`,t),ne=s(`send_email`,t),j=s(`durable_object_namespace`,t),re=s(`workflow`,t),ie=s(`queue`,t),ae=s(`r2_bucket`,t),oe=s(`d1`,t),M=s(`vectorize`,t),se=s(`ai_search_namespace`,t),ce=s(`ai_search`,t),le=s(`websearch`,t)[0],ue=s(`agent_memory`,t),de=s(`hyperdrive`,t),fe=s(`secrets_store_secret`,t),pe=s(`artifacts`,t),me=s(`unsafe_hello_world`,t),he=s(`flagship`,t),ge=s(`ratelimit`,t),_e=s(`vpc_service`,t),ve=s(`vpc_network`,t),ye=s(`service`,t),be=s(`analytics_engine`,t),xe=s(`dispatch_namespace`,t),Se=s(`mtls_certificate`,t),Ce=s(`pipeline`,t),we=s(`worker_loader`,t),Te=s(`logfwdr`,t),Ee=s(`wasm_module`,t),De=s(`browser`,t)[0],Oe=s(`ai`,t)[0],ke=s(`images`,t)[0],Ae=s(`stream`,t)[0],je=s(`media`,t)[0],Me=s(`version_metadata`,t)[0],Ne=s(`assets`,t)[0],Pe=s(`text_blob`,t),Fe=s(`data_blob`,t);s(`inherit`,t).forEach(({binding:e})=>{O.push({name:e,type:`inherit`})}),k.forEach(({binding:e,value:t})=>{O.push({name:e,type:`plain_text`,text:t})}),A.forEach(({binding:e,value:t})=>{O.push({name:e,type:`json`,json:t})}),ee.forEach(({binding:e,value:t})=>{O.push({name:e,type:`secret_text`,text:t})}),te.forEach(({id:e,binding:t,raw:r})=>{if(n?.dryRun&&(e??=P),e===void 0)throw new N(`${t} bindings must have an "id" field`,{telemetryMessage:`kv namespace binding missing id`});e===P?O.push({name:t,type:`inherit`}):O.push({name:t,type:`kv_namespace`,namespace_id:e,raw:r})}),ne.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?O.push(t):O.push({...t,allowed_destination_addresses:e.allowed_destination_addresses}):O.push({...t,destination_address:e.destination_address})}),j.forEach(({name:e,class_name:t,script_name:n,environment:r})=>{O.push({name:e,type:`durable_object_namespace`,class_name:t,...n&&{script_name:n},...r&&{environment:r}})}),re.forEach(({binding:e,name:t,class_name:n,script_name:r,raw:i})=>{O.push({type:`workflow`,name:e,workflow_name:t,class_name:n,script_name:r,raw:i})}),ie.forEach(({binding:e,queue_name:t,delivery_delay:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({type:`queue`,name:e,queue_name:t,delivery_delay:r,raw:i})}),ae.forEach(({binding:e,bucket_name:t,jurisdiction:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`r2_bucket`,bucket_name:t,jurisdiction:r,raw:i})}),oe.forEach(({binding:e,database_id:t,database_internal_env:r,raw:i})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`d1`,id:t,internalEnv:r,raw:i})}),M.forEach(({binding:e,index_name:t,raw:n})=>{O.push({name:e,type:`vectorize`,index_name:t,raw:n})}),se.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`ai_search_namespace`,namespace:t})}),ce.forEach(({binding:e,instance_name:t})=>{O.push({name:e,type:`ai_search`,instance_name:t})}),le!==void 0&&O.push({name:le.binding,type:`websearch`}),ue.forEach(({binding:e,namespace:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`agent_memory`,namespace:t})}),de.forEach(({binding:e,id:t})=>{O.push({name:e,type:`hyperdrive`,id:t})}),fe.forEach(({binding:e,store_id:t,secret_name:n})=>{O.push({name:e,type:`secrets_store_secret`,store_id:t,secret_name:n})}),pe.forEach(({binding:e,namespace:t})=>{O.push({name:e,type:`artifacts`,namespace:t})}),me.forEach(({binding:e,enable_timer:t})=>{O.push({name:e,type:`unsafe_hello_world`,enable_timer:t})}),he.forEach(({binding:e,app_id:t})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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`});O.push(t===P?{name:e,type:`inherit`}:{name:e,type:`flagship`,app_id:t})}),ge.forEach(({name:e,namespace_id:t,simple:n})=>{O.push({name:e,type:`ratelimit`,namespace_id:t,simple:n})}),_e.forEach(({binding:e,service_id:t})=>{O.push({name:e,type:`vpc_service`,service_id:t})}),ve.forEach(({binding:e,tunnel_id:t,network_id:n})=>{O.push({name:e,type:`vpc_network`,...t===void 0?{network_id:n}:{tunnel_id:t}})}),ye.forEach(({binding:e,service:t,environment:n,entrypoint:r,props:i,cross_account_grant:a})=>{O.push({name:e,type:`service`,service:t,cross_account_grant:a,...n&&{environment:n},...r&&{entrypoint:r},...i&&{props:i}})}),be.forEach(({binding:e,dataset:t})=>{O.push({name:e,type:`analytics_engine`,dataset:t})}),xe.forEach(({binding:e,namespace:t,outbound:r})=>{if(n?.dryRun&&(t??=P),t===void 0)throw new N(`${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===P?O.push({name:e,type:`inherit`}):O.push({name:e,type:`dispatch_namespace`,namespace:t,...r&&{outbound:{worker:{service:r.service,environment:r.environment},params:r.parameters?.map(e=>({name:e}))}}})}),Se.forEach(({binding:e,certificate_id:t})=>{O.push({name:e,type:`mtls_certificate`,certificate_id:t})}),Ce.forEach(({binding:e,stream:t,pipeline:n})=>{if(t)O.push({name:e,type:`pipelines`,stream:t});else if(n)O.push({name:e,type:`pipelines`,pipeline:n});else throw Error(`Pipeline binding must specify a stream or pipeline`)}),we.forEach(({binding:e})=>{O.push({name:e,type:`worker_loader`})}),Te.forEach(({name:e,destination:t})=>{O.push({name:e,type:`logfwdr`,destination:t})}),Ee.forEach(({binding:e,source:t})=>{O.push({name:e,type:`wasm_module`,part:e}),r.set(e,new File([`contents`in t?t.contents:He(t.path)],`path`in t?t.path??e:e,{type:`application/wasm`}))}),De!==void 0&&O.push({name:De.binding,type:`browser`,raw:De.raw}),Oe!==void 0&&O.push({name:Oe.binding,staging:Oe.staging,type:`ai`,raw:Oe.raw}),ke!==void 0&&O.push({name:ke.binding,type:`images`,raw:ke.raw}),Ae!==void 0&&O.push({name:Ae.binding,type:`stream`}),je!==void 0&&O.push({name:je.binding,type:`media`}),Me!==void 0&&O.push({name:Me.binding,type:`version_metadata`}),Ne!==void 0&&O.push({name:Ne.binding,type:`assets`}),Pe.forEach(({binding:e,source:t})=>{O.push({name:e,type:`text_blob`,part:e}),e!==`__STATIC_CONTENT_MANIFEST`&&(`contents`in t?r.set(e,new File([t.contents],t.path??e,{type:`text/plain`})):r.set(e,new File([He(t.path)],t.path,{type:`text/plain`})))}),Fe.forEach(({binding:e,source:t})=>{O.push({name:e,type:`data_blob`,part:e}),r.set(e,new File([`contents`in t?t.contents:He(t.path)],`path`in t?t.path??e:e,{type:`application/octet-stream`}))});for(let[e,n]of Object.entries(t??{}))if(d(n.type)&&n.type!==`unsafe_hello_world`){let{type:t,...r}=n;O.push({name:e,type:t.slice(7),...r})}let Ie=`__STATIC_CONTENT_MANIFEST`;if(D?.some(({name:e})=>e===Ie)&&i.type===`esm`){Ge(D!==void 0);let e=new Set(D.map(e=>qe.posix.dirname(e.name)));for(let t of e){if(t===`.`)continue;let e=qe.posix.relative(t,Ie),n=qe.posix.join(t,Ie);D.push({name:n,filePath:n,content:`export { default } from ${JSON.stringify(e)};`,type:`esm`})}}if(i.type===`commonjs`){for(let e of Object.values([...D||[]]))if(e.name===`__STATIC_CONTENT_MANIFEST`)r.set(e.name,new File([e.content],e.name,{type:`text/plain`})),D=D?.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,`_`);O.push({name:t,type:e.type===`compiled-wasm`?`wasm_module`:e.type===`text`?`text_blob`:`data_blob`,part:t}),r.set(t,new File([e.content],e.name,{type:e.type===`compiled-wasm`?`application/wasm`:e.type===`text`?`text/plain`:`application/octet-stream`})),D=D?.filter(t=>t!==e)}}let Le;if(n?.unsafe?.capnp){let e=Rt(n.unsafe.capnp);Le=`./capnp-${Date.now()}.compiled`,r.set(Le,new File([e],Le,{type:`application/octet-stream`}))}let Re;f&&(Re??=[],Re.push(`plain_text`,`json`)),p&&(Re??=[],Re.push(`secret_text`,`secret_key`)),m&&(Re??=[],Re.push(...m));let ze={...i.type===`commonjs`?{body_part:i.name}:{main_module:i.name},bindings:O,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}})),...l&&{compatibility_date:l},...u&&{compatibility_flags:u},...o&&{migrations:o},...c&&Object.keys(c).length>0&&{exports:c},capnp_schema:Le,...Re&&{keep_bindings:Re},...h!==void 0&&{logpush:h},...g&&{placement:g},..._&&{tail_consumers:_},...v&&{streaming_tail_consumers:v},...y&&{limits:y},...b&&{annotations:b},...x!==void 0&&{keep_assets:x},...S&&{assets:{jwt:S.jwt,config:E}},...C&&{observability:C},...w&&{cache_options:w},...T?.length&&{package_dependencies:T}};if(n?.unsafe?.metadata!==void 0)for(let e of Object.keys(n.unsafe.metadata))ze[e]=n.unsafe.metadata[e];if(r.set(`metadata`,JSON.stringify(ze)),i.type===`commonjs`&&D&&D.length>0)throw TypeError(`More than one module can only be specified when type = 'esm'`);for(let e of[i].concat(D||[]))r.set(e.name,new File([e.content],e.name,{type:Bt(e.type??i.type??`esm`)}));for(let e of a||[])r.set(e.name,new File([e.content],e.name,{type:`application/source-map`}));return r}F(Ht,`createWorkerUploadForm`);var Ut=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1),Wt=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const Gt=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function Kt(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(Gt(o));return}if(o&&(c=()=>{l(Gt(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new Wt;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function qt(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var Jt=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},i={priority:n,id:r,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(i);return}let a=qt(this.#e,i,(e,t)=>t.priority-e.priority);this.#e.splice(a,0,i)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},Yt=class extends Ut.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f;#p=0;#m;#h;#g=1n;#_=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Jt,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??``}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=new e.queueClass,this.#f=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#h=e.autoStart===!1,this.#M()}get#v(){return this.#t||this.#n<this.#r}get#y(){return this.#p<this.#m}#b(){this.#p--,this.#p===0&&this.emit(`pendingZero`),this.#E(),this.emit(`next`)}#x(){this.#O(),this.#D(),this.#u=void 0}get#S(){let e=Date.now();if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#C(this.#o-t),!0}this.#n=this.#e?this.#p:0}else return this.#C(t),!0}return!1}#C(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#x()},e))}#w(){this.#l&&=(clearInterval(this.#l),void 0)}#T(){this.#u&&=(clearTimeout(this.#u),void 0)}#E(){if(this.#d.size===0)return this.#w(),this.emit(`empty`),this.#p===0&&(this.#T(),this.emit(`idle`)),!1;let e=!1;if(!this.#h){let t=!this.#S;if(this.#v&&this.#y){let n=this.#d.dequeue();this.#t||(this.#n++,this.#N()),this.emit(`active`),this.#c=Date.now(),n(),t&&this.#D(),e=!0}}return e}#D(){this.#t||this.#l!==void 0||(this.#l=setInterval(()=>{this.#O()},this.#o),this.#s=Date.now()+this.#o)}#O(){this.#n===0&&this.#p===0&&this.#l&&this.#w(),this.#n=this.#e?this.#p:0,this.#k(),this.#N()}#k(){for(;this.#E(););}get concurrency(){return this.#m}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#m=e,this.#k()}async#A(e){return new Promise((t,n)=>{e.addEventListener(`abort`,()=>{n(e.reason)},{once:!0})})}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#d.setPriority(e,t)}async add(e,t={}){return t.id??=(this.#g++).toString(),t={timeout:this.timeout,...t},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`);this.#d.enqueue(async()=>{this.#p++,this.#_.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});try{try{t.signal?.throwIfAborted()}catch(e){throw this.#t||this.#n--,this.#_.delete(i),e}let r=e({signal:t.signal});t.timeout&&(r=Kt(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#p} running, ${this.#d.size} waiting)`})),t.signal&&(r=Promise.race([r,this.#A(t.signal)]));let a=await r;n(a),this.emit(`completed`,a)}catch(e){r(e),this.emit(`error`,e)}finally{this.#_.delete(i),queueMicrotask(()=>{this.#b()})}},t),this.emit(`add`),this.#E()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#h?(this.#h=!1,this.#k(),this):this}pause(){this.#h=!0}clear(){this.#d=new this.#f,this.#P()}async onEmpty(){this.#d.size!==0&&await this.#j(`empty`)}async onSizeLessThan(e){this.#d.size<e||await this.#j(`next`,()=>this.#d.size<e)}async onIdle(){this.#p===0&&this.#d.size===0||await this.#j(`idle`)}async onPendingZero(){this.#p!==0&&await this.#j(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#j(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#j(`rateLimitCleared`)}async onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#j(e,t){return new Promise(n=>{let r=()=>{t&&!t()||(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#d.size}sizeBy(e){return this.#d.filter(e).length}get pending(){return this.#p}get isPaused(){return this.#h}#M(){this.#t||(this.on(`add`,()=>{this.#d.size>0&&this.#N()}),this.on(`next`,()=>{this.#N()}))}#N(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#P()}))}#P(){let e=this.#i,t=!this.#t&&this.#n>=this.#r&&this.#d.size>0;t!==e&&(this.#i=t,this.emit(t?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#p===this.#m&&this.#d.size>0||this.isRateLimited&&this.#d.size>0}get runningTasks(){return[...this.#_.values()].map(e=>({...e}))}};const Xt=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],Zt=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],Qt=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],$t=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],en=(e,t,n)=>{let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function tn(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};let n=t.bits?t.binary?$t:Qt:t.binary?Zt:Xt,r=t.space?` `:``;if(t.signed&&e===0)return` 0${r}${n[0]}`;let i=e<0,a=i?`-`:t.signed?`+`:``;i&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1)return a+en(e,t.locale,o)+r+n[0];let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let c=en(Number(e),t.locale,o),l=n[s];return a+c+r+l}var nn=n(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),rn=n(((e,n)=>{let r=t(`fs`),i=t(`path`),a=t(`os`),o=t(`crypto`),s=nn().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function l(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
|
|
3
3
|
`);let r;for(;(r=c.exec(n))!=null;){let e=r[1],n=r[2]||``;n=n.trim();let i=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,`$2`),i===`"`&&(n=n.replace(/\\n/g,`
|
|
4
4
|
`),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function u(e){let t=g(e),n=C.configDotenv({path:t});if(!n.parsed)throw Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let r=m(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=h(n,r[e].trim());a=C.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=i)throw t}return C.parse(a)}function d(e){console.log(`[dotenv@${s}][INFO] ${e}`)}function f(e){console.log(`[dotenv@${s}][WARN] ${e}`)}function p(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function m(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:``}function h(e,t){let n;try{n=new URL(t)}catch(e){throw e.code===`ERR_INVALID_URL`?Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development`):e}let r=n.password;if(!r)throw Error(`INVALID_DOTENV_KEY: Missing key part`);let i=n.searchParams.get(`environment`);if(!i)throw Error(`INVALID_DOTENV_KEY: Missing environment part`);let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];if(!o)throw Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);return{ciphertext:o,key:r}}function g(e){let t=i.resolve(process.cwd(),`.env`);return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(`.vault`)?t:`${t}.vault`}function _(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function v(e){d(`Loading env from encrypted .env.vault`);let t=C._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),C.populate(n,t,e),{parsed:t}}function y(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=!!(e&&e.debug);e&&(e.path!=null&&(t=_(e.path)),e.encoding!=null&&(n=e.encoding));try{let i=C.parse(r.readFileSync(t,{encoding:n})),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),C.populate(a,i,e),{parsed:i}}catch(e){return a&&p(`Failed to load ${t} ${e.message}`),{error:e}}}function b(e){let t=g(e);return m(e).length===0?C.configDotenv(e):r.existsSync(t)?C._configVault(e):(f(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),C.configDotenv(e))}function x(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.slice(0,12),a=r.slice(-16);r=r.slice(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;throw t||n?Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`):r?Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`):(console.error(`Error: `,e.code),console.error(`Error: `,e.message),e)}}function S(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override);if(typeof t!=`object`)throw Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n]),r&&p(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}let C={configDotenv:y,_configVault:v,_parseVault:u,config:b,decrypt:x,parse:l,populate:S};n.exports.configDotenv=C.configDotenv,n.exports._configVault=C._configVault,n.exports._parseVault=C._parseVault,n.exports.config=C.config,n.exports.decrypt=C.decrypt,n.exports.parse=C.parse,n.exports.populate=C.populate,n.exports=C}))(),an=wt({"../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(e,t){function n(e){return Array.isArray(e)?e:[e]}F(n,`makeArray`);var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=F((e,t,n)=>Object.defineProperty(e,t,{value:n}),`define`),g=/([0-z])-([0-z])/g,_=F(()=>!1,`RETURN_FALSE`),v=F(e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),`sanitizeRange`),y=F(e=>{let{length:t}=e;return e.slice(0,t-t%2)},`cleanRangeBackSlash`),b=[[/^\uFEFF/,()=>r],[/\\?\s+$/,e=>e.indexOf(`\\`)===0?i:r],[/\\\s/g,()=>i],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,F(function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`},`startingReplacer`)],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=Object.create(null),S=F((e,t)=>{let n=x[e];return n||(n=b.reduce((t,n)=>t.replace(n[0],n[1].bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},`makeRegex`),C=F(e=>typeof e==`string`,`isString`),w=F(e=>e&&C(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,`checkPattern`),T=F(e=>e.split(u),`splitPattern`),E=class{static{F(this,`IgnoreRule`)}constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},D=F((e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new E(n,e,r,i)},`createRule`),O=F((e,t)=>{throw new t(e)},`throwError`),k=F((e,t,n)=>C(e)?e?k.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),`checkPath`),A=F(e=>d.test(e),`isNotRelative`);k.isNotRelative=A,k.convert=e=>e;var ee=class{static{F(this,`Ignore`)}constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(w(e)){let t=D(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&k.convert(e);return k(i,e,this._allowRelativePaths?_:O),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},te=F(e=>new ee(e),`factory`);if(te.isPathValid=F(e=>k(e&&k.convert(e),e,_),`isPathValid`),te.default=te,t.exports=te,typeof process<`u`&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform===`win32`)){k.convert=F(e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`),`makePosix`);let e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||A(t)}}}),on=wt({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/lib/heap.js"(e,t){(function(){var n,r,i=Math.floor,a,o,s,c,l,u,d=Math.min,f,p,m,h,g;r=F(function(e,t){return e<t?-1:+(e>t)},`defaultCmp`),u=F(function(e,t,n,a,o){var s;if(n??=0,o??=r,n<0)throw Error(`lo must be non-negative`);for(a??=e.length;n<a;)s=i((n+a)/2),o(t,e[s])<0?a=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},`insort`),s=F(function(e,t,n){return n??=r,e.push(t),h(e,0,e.length-1,n)},`heappush`),o=F(function(e,t){var n,i;return t??=r,n=e.pop(),e.length?(i=e[0],e[0]=n,g(e,0,t)):i=n,i},`heappop`),l=F(function(e,t,n){var i;return n??=r,i=e[0],e[0]=t,g(e,0,n),i},`heapreplace`),c=F(function(e,t,n){var i;return n??=r,e.length&&n(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],g(e,0,n)),t},`heappushpop`),a=F(function(e,t){var n,a,o,s,c,l;for(t??=r,s=function(){l=[];for(var t=0,n=i(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)l.push(t);return l}.apply(this).reverse(),c=[],a=0,o=s.length;a<o;a++)n=s[a],c.push(g(e,n,t));return c},`heapify`),m=F(function(e,t,n){var i;if(n??=r,i=e.indexOf(t),i!==-1)return h(e,0,i,n),g(e,i,n)},`updateItem`),f=F(function(e,t,n){var i,o,s,l,u;if(n??=r,o=e.slice(0,t),!o.length)return o;for(a(o,n),u=e.slice(t),s=0,l=u.length;s<l;s++)i=u[s],c(o,i,n);return o.sort(n).reverse()},`nlargest`),p=F(function(e,t,n){var i,s,c,l,f,p,m,h,g;if(n??=r,t*10<=e.length){if(c=e.slice(0,t).sort(n),!c.length)return c;for(s=c[c.length-1],m=e.slice(t),l=0,p=m.length;l<p;l++)i=m[l],n(i,s)<0&&(u(c,i,0,null,n),c.pop(),s=c[c.length-1]);return c}for(a(e,n),g=[],f=0,h=d(t,e.length);0<=h?f<h:f>h;0<=h?++f:--f)g.push(o(e,n));return g},`nsmallest`),h=F(function(e,t,n,i){var a,o,s;for(i??=r,a=e[n];n>t;){if(s=n-1>>1,o=e[s],i(a,o)<0){e[n]=o,n=s;continue}break}return e[n]=a},`_siftdown`),g=F(function(e,t,n){var i,a,o,s,c;for(n??=r,a=e.length,c=t,o=e[t],i=2*t+1;i<a;)s=i+1,s<a&&!(n(e[i],e[s])<0)&&(i=s),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,h(e,c,t,n)},`_siftup`),n=function(){e.push=s,e.pop=o,e.replace=l,e.pushpop=c,e.heapify=a,e.updateItem=m,e.nlargest=f,e.nsmallest=p;function e(e){this.cmp=e??r,this.nodes=[]}return F(e,`Heap`),e.prototype.push=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return c(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return a(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t=new e;return t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(function(n,r){return typeof define==`function`&&define.amd?define([],r):typeof e==`object`?t.exports=r():n.Heap=r()})(this,function(){return n})}).call(e)}}),sn=wt({"../../node_modules/.pnpm/heap@0.2.7/node_modules/heap/index.js"(e,t){t.exports=on()}}),cn=wt({"../../node_modules/.pnpm/@ewoudenberg+difflib@0.1.0/node_modules/@ewoudenberg/difflib/lib/difflib.js"(e){(function(){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[].indexOf;({floor:h,max:_,min:v}=Math),n=sn(),p=Ct(`assert`),c=F(function(e,t){return t?2*e/t:1},`_calculateRatio`),s=F(function(e,t){var n,r,i,a,o;for([i,a]=[e.length,t.length],n=r=0,o=v(i,a);0<=o?r<o:r>o;n=0<=o?++r:--r){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return i-a},`_arrayCmp`),f=F(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},`_has`),o=F(function(e){var t,n,r;for(n=0,r=e.length;n<r;n++)if(t=e[n],t)return!0;return!1},`_any`),a=class{static{F(this,`SequenceMatcher`)}constructor(e,t=``,n=``,r=!0){this.isjunk=e,this.autojunk=r,this.a=this.b=null,this.setSeqs(t,n)}setSeqs(e,t){return this.setSeq1(e),this.setSeq2(t)}setSeq1(e){if(e!==this.a)return this.a=e,this.matchingBlocks=this.opcodes=null}setSeq2(e){if(e!==this.b)return this.b=e,this.matchingBlocks=this.opcodes=null,this.fullbcount=null,this._chainB()}_chainB(){var e=this.b,t,n,r,i,a,o,s,c,l,u,d;for(this.b2j=t=new Map,r=s=0,c=e.length;s<c;r=++s)n=e[r],t.has(n)||t.set(n,[]),i=t.get(n),i.push(r);return o=new Map,a=this.isjunk,a&&t.forEach(function(e,n){if(a(n))return o.set(n,!0),t.delete(n)}),d=new Map,l=e.length,this.autojunk&&l>=200&&(u=h(l/100)+1,t.forEach(function(e,n){if(e.length>u)return d.set(n,!0),t.delete(n)})),this.isbjunk=function(e){return o.has(e)},this.isbpopular=function(e){return d.has(e)}}findLongestMatch(e,t,n,r){var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x;for([i,a,o,d]=[this.a,this.b,this.b2j,this.isbjunk],[s,c,l]=[e,n,0],p={},u=g=b=e,x=t;b<=x?g<x:g>x;u=b<=x?++g:--g){for(y={},m=[],o.has(i[u])&&(m=o.get(i[u])),v=0,_=m.length;v<_;v++)if(f=m[v],!(f<n)){if(f>=r)break;h=y[f]=(p[f-1]||0)+1,h>l&&([s,c,l]=[u-h+1,f-h+1,h])}p=y}for(;s>e&&c>n&&!d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&!d(a[c+l])&&i[s+l]===a[c+l];)l++;for(;s>e&&c>n&&d(a[c-1])&&i[s-1]===a[c-1];)[s,c,l]=[s-1,c-1,l+1];for(;s+l<t&&c+l<r&&d(a[c+l])&&i[s+l]===a[c+l];)l++;return[s,c,l]}getMatchingBlocks(){var e,t,n,r,i,a,o,c,l,u,d,f,p,m,h,g,_,v,y,b,x;if(this.matchingBlocks)return this.matchingBlocks;for([h,g]=[this.a.length,this.b.length],b=[[0,h,0,g]],v=[];b.length;)[t,e,r,n]=b.pop(),[i,c,d]=x=this.findLongestMatch(t,e,r,n),d&&(v.push(x),t<i&&r<c&&b.push([t,i,r,c]),i+d<e&&c+d<n&&b.push([i+d,e,c+d,n]));for(v.sort(s),a=l=f=0,y=[],m=0,_=v.length;m<_;m++)[o,u,p]=v[m],a+f===o&&l+f===u?f+=p:(f&&y.push([a,l,f]),[a,l,f]=[o,u,p]);return f&&y.push([a,l,f]),y.push([h,g,0]),this.matchingBlocks=y}getOpcodes(){var e,t,n,r,i,a,o,s,c,l;if(this.opcodes)return this.opcodes;for(r=i=0,this.opcodes=t=[],s=this.getMatchingBlocks(),a=0,o=s.length;a<o;a++)[e,n,c]=s[a],l=``,r<e&&i<n?l=`replace`:r<e?l=`delete`:i<n&&(l=`insert`),l&&t.push([l,r,e,i,n]),[r,i]=[e+c,n+c],c&&t.push([`equal`,e,r,n,i]);return t}getGroupedOpcodes(e=3){var t=this.getOpcodes(),n,r,i,a,o,s,c,l,u,d;for(t.length||(t=[[`equal`,0,1,0,1]]),t[0][0]===`equal`&&([d,i,a,o,s]=t[0],t[0]=[d,_(i,a-e),a,_(o,s-e),s]),t[t.length-1][0]===`equal`&&([d,i,a,o,s]=t[t.length-1],t[t.length-1]=[d,i,v(a,i+e),o,v(s,o+e)]),u=e+e,r=[],n=[],c=0,l=t.length;c<l;c++)[d,i,a,o,s]=t[c],d===`equal`&&a-i>u&&(n.push([d,i,v(a,i+e),o,v(s,o+e)]),r.push(n),n=[],[i,o]=[_(i,a-e),_(o,s-e)]),n.push([d,i,a,o,s]);return n.length&&!(n.length===1&&n[0][0]===`equal`)&&r.push(n),r}ratio(){var e,t,n,r=0,i=this.getMatchingBlocks();for(e=0,t=i.length;e<t;e++)n=i[e],r+=n[2];return c(r,this.a.length+this.b.length)}quickRatio(){var e,t,n,r,i,a,o,s,l,u,d;if(!this.fullbcount)for(this.fullbcount=n={},u=this.b,r=0,i=u.length;r<i;r++)t=u[r],n[t]=(n[t]||0)+1;for(n=this.fullbcount,e={},s=0,d=this.a,o=0,a=d.length;o<a;o++)t=d[o],l=f(e,t)?e[t]:n[t]||0,e[t]=l-1,l>0&&s++;return c(s,this.a.length+this.b.length)}realQuickRatio(){var e,t;return[e,t]=[this.a.length,this.b.length],c(v(e,t),e+t)}},g=F(function(e,t,r=3,i=.6){var o,c,l,u,d,f,p,m,h;if(!(r>0))throw Error(`n must be > 0: (${r})`);if(!(0<=i&&i<=1))throw Error(`cutoff must be in [0.0, 1.0]: (${i})`);for(d=[],p=new a,p.setSeq2(e),o=0,c=t.length;o<c;o++)h=t[o],p.setSeq1(h),p.realQuickRatio()>=i&&p.quickRatio()>=i&&p.ratio()>=i&&d.push([p.ratio(),h]);for(d=n.nlargest(d,r,s),f=[],u=0,l=d.length;u<l;u++)[m,h]=d[u],f.push(h);return f},`getCloseMatches`),l=F(function(e,t){var n,r;for([n,r]=[0,e.length];n<r&&e[n]===t;)n++;return n},`_countLeading`),t=class{static{F(this,`Differ`)}constructor(e,t){this.linejunk=e,this.charjunk=t}compare(e,t){var n,r,i,o,s=new a(this.linejunk,e,t),c,l,u,d,f,p=[],m,h=s.getOpcodes(),g;for(l=0,u=h.length;l<u;l++){switch([g,r,n,o,i]=h[l],g){case`replace`:c=this._fancyReplace(e,r,n,t,o,i);break;case`delete`:c=this._dump(`-`,e,r,n);break;case`insert`:c=this._dump(`+`,t,o,i);break;case`equal`:c=this._dump(` `,e,r,n);break;default:throw Error(`unknow tag (${g})`)}for(m=0,d=c.length;m<d;m++)f=c[m],p.push(f)}return p}_dump(e,t,n,r){var i,a,o,s,c=[];for(i=a=o=n,s=r;o<=s?a<s:a>s;i=o<=s?++a:--a)c.push(`${e} ${t[i]}`);return c}_plainReplace(e,t,n,r,i,a){var o,s,c,l,u,d,f,m,h,g;for(p(t<n&&i<a),a-i<n-t?(o=this._dump(`+`,r,i,a),g=this._dump(`-`,e,t,n)):(o=this._dump(`-`,e,t,n),g=this._dump(`+`,r,i,a)),f=[],h=[o,g],c=0,l=h.length;c<l;c++)for(s=h[c],m=0,u=s.length;m<u;m++)d=s[m],f.push(d);return f}_fancyReplace(e,t,n,r,i,o){var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ee,te,ne,j,re,ie,ae,oe,M,N,P,se,ce,le,ue,de,fe,pe,me,he,ge;for([p,x]=[.74,.75],b=new a(this.charjunk),[S,C]=[null,null],re=[],T=E=P=i,se=o;P<=se?E<se:E>se;T=P<=se?++E:--E)for(g=r[T],b.setSeq2(g),w=ie=ce=t,le=n;ce<=le?ie<le:ie>le;w=ce<=le?++ie:--ie){if(c=e[w],c===g){S===null&&([S,C]=[w,T]);continue}b.setSeq1(c),b.realQuickRatio()>p&&b.quickRatio()>p&&b.ratio()>p&&([p,m,h]=[b.ratio(),w,T])}if(p<x){if(S===null){for(ue=this._plainReplace(e,t,n,r,i,o),ae=0,k=ue.length;ae<k;ae++)j=ue[ae],re.push(j);return re}[m,h,p]=[S,C,1]}else S=null;for(de=this._fancyHelper(e,t,m,r,i,h),oe=0,A=de.length;oe<A;oe++)j=de[oe],re.push(j);if([s,f]=[e[m],r[h]],S===null){for(d=y=``,b.setSeqs(s,f),fe=b.getOpcodes(),M=0,ee=fe.length;M<ee;M++)switch([ge,l,u,_,v]=fe[M],[D,O]=[u-l,v-_],ge){case`replace`:d+=Array(D+1).join(`^`),y+=Array(O+1).join(`^`);break;case`delete`:d+=Array(D+1).join(`-`);break;case`insert`:y+=Array(O+1).join(`+`);break;case`equal`:d+=Array(D+1).join(` `),y+=Array(O+1).join(` `);break;default:throw Error(`unknow tag (${ge})`)}for(pe=this._qformat(s,f,d,y),N=0,te=pe.length;N<te;N++)j=pe[N],re.push(j)}else re.push(` `+s);for(me=this._fancyHelper(e,m+1,n,r,h+1,o),he=0,ne=me.length;he<ne;he++)j=me[he],re.push(j);return re}_fancyHelper(e,t,n,r,i,a){var o=[];return t<n?o=i<a?this._fancyReplace(e,t,n,r,i,a):this._dump(`-`,e,t,n):i<a&&(o=this._dump(`+`,r,i,a)),o}_qformat(e,t,n,r){var i,a=[];return i=v(l(e,` `),l(t,` `)),i=v(i,l(n.slice(0,i),` `)),i=v(i,l(r.slice(0,i),` `)),n=n.slice(i).replace(/\s+$/,``),r=r.slice(i).replace(/\s+$/,``),a.push(`- `+e),n.length&&a.push(`? ${Array(i+1).join(` `)}${n}
|
|
5
5
|
`),a.push(`+ `+t),r.length&&a.push(`? ${Array(i+1).join(` `)}${r}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./src-
|
|
2
|
+
import{t as e}from"./src-D_HETJNy.mjs";import{a as t}from"./theme-CeVf-5qG.mjs";import"./ui-DE8CNn6c.mjs";import{a as n,i as r,n as i,r as a,t as o}from"./spawn-O1RS01vr.mjs";import{t as s}from"./registry-Bck_zFkz.mjs";const c={command:`dev [implArgs..]`,describe:`Run the project's Cloudflare dev server`,builder:e=>e.positional(`implArgs`,{type:`string`,array:!0,describe:`Arguments forwarded to the dev-server implementation`}).parserConfiguration({"unknown-options-as-args":!0,"camel-case-expansion":!1}).epilogue(`cf dev starts the appropriate development server for your project. It runs your framework's dev command when available, falling back to an installed Cloudflare dev server.
|
|
3
3
|
|
|
4
4
|
Arguments after ${t.brand(`cf dev`)} are not forwarded to non-Cloudflare development servers. Run the non-Cloudflare dev command directly to pass additional arguments.`),handler:async t=>{let c=process.cwd(),l=await a(c);l&&!l.configured&&await r(l);let u=(t.implArgs??[]).map(String);throw l?.devCommand?u.length>0?Error(`Arguments cannot currently be forwarded to the detected dev command \`${l.devCommand}\`. Run that command directly with the required arguments.`):new e(await n(l.devCommand,c,{...l.env,...s()})):new e(await o(i(c),`dev`,u))}};export{c as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
3
|
-
`);return}i(await o(`Deleting`,async()=>c.diagnostics.endpointHealthchecks.delete({account_id:l,id:s.id})),{successLabel:`Deleted`})}};function _(e){return e.positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <id>`,describe:`Get a single Endpoint Health Check.`,builder:_,handler:async s=>{if(s.dryRun){a({command:`cf diagnostics endpoint-healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.diagnostics.endpointHealthchecks.get({account_id:l,id:s.id})),{successLabel:`Loaded`})}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Endpoint Health Checks.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf diagnostics endpoint-healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.diagnostics.endpointHealthchecks.list({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`]}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`update <id>`,describe:`Update a Endpoint Health Check.`,builder:x,handler:async f=>{if(f.dryRun){a({command:`cf diagnostics endpoint-healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Updating`,async()=>p.diagnostics.endpointHealthchecks.update({body:e,account_id:m,id:f.id})),{successLabel:`Updated`});return}f[`check-type`]===void 0&&(f[`check-type`]=await d(`check-type`,`type of check to perform`,[`icmp`])),f.endpoint===void 0&&(f.endpoint=await u(`endpoint`,`the IP address of the host to perform checks against`));let h=c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)});i(await o(`Updating`,async()=>p.diagnostics.endpointHealthchecks.update({body:h,account_id:m,id:f.id})),{successLabel:`Updated`})}},C={command:`endpoint-healthchecks`,describe:`Monitor external endpoint availability with periodic HTTP/HTTPS health checks`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.option(`colos`,{type:`string`,array:!0,description:`If no source colo names specified, all colos will be used. China colos are unavailable for traceroutes.`}).option(`options-max-ttl`,{type:`number`,description:`Max TTL
|
|
2
|
+
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{a as u,i as d,n as f}from"./prompt-DdegNPpg.mjs";function p(e){return e.option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`],default:`icmp`}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create Endpoint Health Check.`,builder:p,handler:async f=>{if(f.dryRun){a({command:`cf diagnostics endpoint-healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`json`,body:f.body===void 0?c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.diagnostics.endpointHealthchecks.create({body:e,account_id:m})),{successLabel:`Created`});return}f[`check-type`]===void 0&&(f[`check-type`]=await d(`check-type`,`type of check to perform`,[`icmp`])),f.endpoint===void 0&&(f.endpoint=await u(`endpoint`,`the IP address of the host to perform checks against`));let h=c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)});i(await o(`Creating`,async()=>p.diagnostics.endpointHealthchecks.create({body:h,account_id:m})),{successLabel:`Created`})}};function h(e){return e.positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <id>`,describe:`Delete Endpoint Health Check.`,builder:h,handler:async s=>{if(s.dryRun){a({command:`cf diagnostics endpoint-healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force})){process.stderr.write(`Aborted.
|
|
3
|
+
`);return}i(await o(`Deleting`,async()=>c.diagnostics.endpointHealthchecks.delete({account_id:l,id:s.id})),{successLabel:`Deleted`})}};function _(e){return e.positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <id>`,describe:`Get a single Endpoint Health Check.`,builder:_,handler:async s=>{if(s.dryRun){a({command:`cf diagnostics endpoint-healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}`,pathParams:{id:String(s.id??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.diagnostics.endpointHealthchecks.get({account_id:l,id:s.id})),{successLabel:`Loaded`})}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Endpoint Health Checks.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf diagnostics endpoint-healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.diagnostics.endpointHealthchecks.list({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.positional(`id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`check-type`,{type:`string`,description:`type of check to perform`,choices:[`icmp`]}).option(`endpoint`,{type:`string`,description:`the IP address of the host to perform checks against`}).option(`name`,{type:`string`,description:`Optional name associated with this check`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`update <id>`,describe:`Update a Endpoint Health Check.`,builder:x,handler:async f=>{if(f.dryRun){a({command:`cf diagnostics endpoint-healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/endpoint-healthchecks/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Updating`,async()=>p.diagnostics.endpointHealthchecks.update({body:e,account_id:m,id:f.id})),{successLabel:`Updated`});return}f[`check-type`]===void 0&&(f[`check-type`]=await d(`check-type`,`type of check to perform`,[`icmp`])),f.endpoint===void 0&&(f.endpoint=await u(`endpoint`,`the IP address of the host to perform checks against`));let h=c({check_type:l(f[`check-type`],`check-type`,`text`),endpoint:l(f.endpoint,`endpoint`,`text`),name:l(f.name,`name`,`text`)});i(await o(`Updating`,async()=>p.diagnostics.endpointHealthchecks.update({body:h,account_id:m,id:f.id})),{successLabel:`Updated`})}},C={command:`endpoint-healthchecks`,describe:`Monitor external endpoint availability with periodic HTTP/HTTPS health checks`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.option(`colos`,{type:`string`,array:!0,description:`If no source colo names specified, all colos will be used. China colos are unavailable for traceroutes.`}).option(`options-max-ttl`,{type:`number`,description:`Max TTL.`}).option(`options-packet-type`,{type:`string`,description:`Type of packet sent.`,choices:[`icmp`,`tcp`,`udp`,`gre`,`gre+icmp`]}).option(`options-packets-per-ttl`,{type:`number`,description:`Number of packets sent at each TTL.`}).option(`options-port`,{type:`number`,description:`For UDP and TCP, specifies the destination port. For ICMP, specifies the initial ICMP sequence value. Default value 0 will choose the best value to use for each protocol.`}).option(`options-wait-time`,{type:`number`,description:`Set the time (in seconds) to wait for a response to a probe.`}).option(`targets`,{type:`string`,array:!0,description:`The targets 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 T={command:`create`,describe:`Run traceroutes from Cloudflare colos.`,builder:w,handler:async u=>{if(u.dryRun){a({command:`cf diagnostics traceroutes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/diagnostics/traceroute`,pathParams:{},bodyKind:`json`,body:u.body===void 0?c({colos:u.colos,options:{max_ttl:u[`options-max-ttl`],packet_type:l(u[`options-packet-type`],`options-packet-type`,`text`),packets_per_ttl:u[`options-packets-per-ttl`],port:u[`options-port`],wait_time:u[`options-wait-time`]},targets:u.targets}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.diagnostics.traceroutes.create({...e,account_id:f})),{successLabel:`Created`});return}if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let p=c({colos:u.colos,options:{max_ttl:u[`options-max-ttl`],packet_type:l(u[`options-packet-type`],`options-packet-type`,`text`),packets_per_ttl:u[`options-packets-per-ttl`],port:u[`options-port`],wait_time:u[`options-wait-time`]},targets:u.targets});i(await o(`Creating`,async()=>d.diagnostics.traceroutes.create({...p,account_id:f})),{successLabel:`Created`})}},E={command:`traceroutes`,describe:`Run traceroutes from Cloudflare data centers to diagnose network path issues`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`diagnostics`,describe:`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,builder:e=>e.command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{a as u,i as d,n as f}from"./prompt-DdegNPpg.mjs";import{t as p}from"./cli-types-BsTty22w.mjs";function m(e){return e.option(`host-ipv4`,{type:`string`,description:`The host.ipv4 field`}).option(`host-network-tunnel-id`,{type:`string`,description:`The host.network.tunnel_id field`}).option(`host-ipv6`,{type:`string`,description:`The host.ipv6 field`}).option(`host-hostname`,{type:`string`,description:`The host.hostname field`}).option(`host-resolver-network-resolver-ips`,{type:`string`,array:!0,description:`The host.resolver_network.resolver_ips field`}).option(`host-resolver-network-tunnel-id`,{type:`string`,description:`The host.resolver_network.tunnel_id field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tls-settings-cert-verification-mode`,{type:`string`,description:'TLS certificate verification mode for the connection to the origin.\n\n- `"verify_full"` — verify certificate chain and hostname (default)\n- `"verify_ca"` — verify certificate chain only, skip hostname check\n- `"disabled"` — do not verify the server certificate at all'}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).option(`http-port`,{type:`number`,description:`The http_port field`}).option(`https-port`,{type:`number`,description:`The https_port field`}).option(`app-protocol`,{type:`string`,description:`The app_protocol field`,choices:[`postgresql`,`mysql`]}).option(`tcp-port`,{type:`number`,description:`The tcp_port 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)`}).conflicts(`host-ipv4`,[`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-ipv6`,[`host-ipv4`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-hostname`,[`host-ipv4`,`host-ipv6`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-ipv6`]).conflicts(`http-port`,[`app-protocol`,`tcp-port`]).conflicts(`https-port`,[`app-protocol`,`tcp-port`]).conflicts(`app-protocol`,[`http-port`,`https-port`]).conflicts(`tcp-port`,[`http-port`,`https-port`]).check(e=>{if([`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`].some(t=>e[t]!==void 0)){let t=[`host-network-tunnel-id`,`host-resolver-network-tunnel-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --host-* flag is set`)}return!0}).check(e=>{if([`tls-settings-cert-verification-mode`].some(t=>e[t]!==void 0)){let t=[`tls-settings-cert-verification-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tls_settings-* flag is set`)}return!0})}const h={command:`create`,describe:`Creates a new Workers VPC connectivity service in the account.`,builder:m,handler:async f=>{if(f.dryRun){a({command:`cf directory services create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services`,pathParams:{},bodyKind:`json`,body:f.body===void 0?c({host:{ipv4:l(f[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:l(f[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:l(f[`host-ipv6`],`host-ipv6`,`text`),hostname:l(f[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:f[`host-resolver-network-resolver-ips`],tunnel_id:l(f[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:l(f.name,`name`,`text`),tls_settings:{cert_verification_mode:l(f[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:l(f.type,`type`,`text`),http_port:f[`http-port`],https_port:f[`https-port`],app_protocol:l(f[`app-protocol`],`app-protocol`,`text`),tcp_port:f[`tcp-port`]}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.directory.services.create({body:e,account_id:m})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await u(`name`,`The name field`)),f.type===void 0&&(f.type=await d(`type`,`The type field`,[`tcp`,`http`]));let h=c({host:{ipv4:l(f[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:l(f[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:l(f[`host-ipv6`],`host-ipv6`,`text`),hostname:l(f[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:f[`host-resolver-network-resolver-ips`],tunnel_id:l(f[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:l(f.name,`name`,`text`),tls_settings:{cert_verification_mode:l(f[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:l(f.type,`type`,`text`),http_port:f[`http-port`],https_port:f[`https-port`],app_protocol:l(f[`app-protocol`],`app-protocol`,`text`),tcp_port:f[`tcp-port`]});i(await o(`Creating`,async()=>p.directory.services.create({body:h,account_id:m})),{successLabel:`Created`})}};function g(e){return e.positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <service-id>`,describe:`Removes a single Workers VPC connectivity service by its ID.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf directory services delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services/${s[`service-id`]==null?`<service-id>`:encodeURIComponent(String(s[`service-id`]))}`,pathParams:{"service-id":String(s[`service-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>c.directory.services.delete({account_id:l,service_id:s[`service-id`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <service-id>`,describe:`Fetches a single Workers VPC connectivity service by its ID.`,builder:v,handler:async s=>{if(s.dryRun){a({command:`cf directory services get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services/${s[`service-id`]==null?`<service-id>`:encodeURIComponent(String(s[`service-id`]))}`,pathParams:{"service-id":String(s[`service-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.directory.services.get({account_id:l,service_id:s[`service-id`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`type`,{type:`string`,description:`Type`,choices:[`tcp`,`http`]}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists the Workers VPC connectivity services in the account.`,builder:p(b),handler:async s=>{let c={type:s.type,page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf directory services list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.directory.services.list({account_id:u,...c})),{successLabel:`Loaded`})}};function S(e){return e.positional(`service-id`,{type:`string`,description:`Service ID`,demandOption:!0}).option(`host-ipv4`,{type:`string`,description:`The host.ipv4 field`}).option(`host-network-tunnel-id`,{type:`string`,description:`The host.network.tunnel_id field`}).option(`host-ipv6`,{type:`string`,description:`The host.ipv6 field`}).option(`host-hostname`,{type:`string`,description:`The host.hostname field`}).option(`host-resolver-network-resolver-ips`,{type:`string`,array:!0,description:`The host.resolver_network.resolver_ips field`}).option(`host-resolver-network-tunnel-id`,{type:`string`,description:`The host.resolver_network.tunnel_id field`}).option(`name`,{type:`string`,description:`The name field`}).option(`tls-settings-cert-verification-mode`,{type:`string`,description:'TLS certificate verification mode for the connection to the origin.\n\n- `"verify_full"` — verify certificate chain and hostname (default)\n- `"verify_ca"` — verify certificate chain only, skip hostname check\n- `"disabled"` — do not verify the server certificate at all'}).option(`type`,{type:`string`,description:`The type field`,choices:[`tcp`,`http`]}).option(`http-port`,{type:`number`,description:`The http_port field`}).option(`https-port`,{type:`number`,description:`The https_port field`}).option(`app-protocol`,{type:`string`,description:`The app_protocol field`,choices:[`postgresql`,`mysql`]}).option(`tcp-port`,{type:`number`,description:`The tcp_port 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)`}).conflicts(`host-ipv4`,[`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-ipv6`,[`host-ipv4`,`host-hostname`,`host-resolver-network-resolver-ips`]).conflicts(`host-hostname`,[`host-ipv4`,`host-ipv6`]).conflicts(`host-resolver-network-resolver-ips`,[`host-ipv4`,`host-ipv6`]).conflicts(`http-port`,[`app-protocol`,`tcp-port`]).conflicts(`https-port`,[`app-protocol`,`tcp-port`]).conflicts(`app-protocol`,[`http-port`,`https-port`]).conflicts(`tcp-port`,[`http-port`,`https-port`]).check(e=>{if([`host-ipv4`,`host-network-tunnel-id`,`host-ipv6`,`host-hostname`,`host-resolver-network-resolver-ips`,`host-resolver-network-tunnel-id`].some(t=>e[t]!==void 0)){let t=[`host-network-tunnel-id`,`host-resolver-network-tunnel-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --host-* flag is set`)}return!0}).check(e=>{if([`tls-settings-cert-verification-mode`].some(t=>e[t]!==void 0)){let t=[`tls-settings-cert-verification-mode`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tls_settings-* flag is set`)}return!0})}const C={command:`update <service-id>`,describe:`Updates an existing Workers VPC connectivity service by its ID.`,builder:S,handler:async f=>{if(f.dryRun){a({command:`cf directory services update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/connectivity/directory/services/${f[`service-id`]==null?`<service-id>`:encodeURIComponent(String(f[`service-id`]))}`,pathParams:{"service-id":String(f[`service-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({host:{ipv4:l(f[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:l(f[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:l(f[`host-ipv6`],`host-ipv6`,`text`),hostname:l(f[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:f[`host-resolver-network-resolver-ips`],tunnel_id:l(f[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:l(f.name,`name`,`text`),tls_settings:{cert_verification_mode:l(f[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:l(f.type,`type`,`text`),http_port:f[`http-port`],https_port:f[`https-port`],app_protocol:l(f[`app-protocol`],`app-protocol`,`text`),tcp_port:f[`tcp-port`]}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Updating`,async()=>p.directory.services.update({body:e,account_id:m,service_id:f[`service-id`]})),{successLabel:`Updated`});return}f.name===void 0&&(f.name=await u(`name`,`The name field`)),f.type===void 0&&(f.type=await d(`type`,`The type field`,[`tcp`,`http`]));let h=c({host:{ipv4:l(f[`host-ipv4`],`host-ipv4`,`text`),network:{tunnel_id:l(f[`host-network-tunnel-id`],`host-network-tunnel-id`,`text`)},ipv6:l(f[`host-ipv6`],`host-ipv6`,`text`),hostname:l(f[`host-hostname`],`host-hostname`,`text`),resolver_network:{resolver_ips:f[`host-resolver-network-resolver-ips`],tunnel_id:l(f[`host-resolver-network-tunnel-id`],`host-resolver-network-tunnel-id`,`text`)}},name:l(f.name,`name`,`text`),tls_settings:{cert_verification_mode:l(f[`tls-settings-cert-verification-mode`],`tls-settings-cert-verification-mode`,`text`)},type:l(f.type,`type`,`text`),http_port:f[`http-port`],https_port:f[`https-port`],app_protocol:l(f[`app-protocol`],`app-protocol`,`text`),tcp_port:f[`tcp-port`]});i(await o(`Updating`,async()=>p.directory.services.update({body:h,account_id:m,service_id:f[`service-id`]})),{successLabel:`Updated`})}},w={command:`services`,describe:`Operations for services`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`directory`,describe:`directory`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{a as r,r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./body-parser-C-c9gfH1.mjs";import{n as u,t as d}from"./input-validation-Bav2M9F-.mjs";import{a as f,i as p,n as m}from"./prompt-DdegNPpg.mjs";function h(e){return e.option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).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 ee={command:`create`,describe:`Create a new Workers for Platforms namespace.`,builder:h,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({name:u(r.name,`name`,`text`)}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Creating`,async()=>d.dispatchNamespaces.create({...e,account_id:f})),{successLabel:`Created`});return}let p=l({name:u(r.name,`name`,`text`)});a(await s(`Creating`,async()=>d.dispatchNamespaces.create({...p,account_id:f})),{successLabel:`Created`})}};function g(e){return e.positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <dispatch-namespace>`,describe:`Delete a Workers for Platforms namespace.`,builder:g,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}a(await s(`Deleting`,async()=>c.dispatchNamespaces.delete({account_id:l,dispatch_namespace:r[`dispatch-namespace`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the dispatch namespace.`}).option(`trusted-workers`,{type:`boolean`,description:'Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and `request.cf` is undefined. By default, Workers in a namespace are "untrusted".'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`edit <dispatch-namespace>`,describe:`Patch a Workers for Platforms namespace. Omitted fields are left unchanged.`,builder:v,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``)},bodyKind:`json`,body:r.body===void 0?l({name:u(r.name,`name`,`text`),trusted_workers:r[`trusted-workers`]}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.dispatchNamespaces.edit({...e,account_id:f,dispatch_namespace:r[`dispatch-namespace`]})),{successLabel:`Updated`});return}let p=l({name:u(r.name,`name`,`text`),trusted_workers:r[`trusted-workers`]});a(await s(`Updating`,async()=>d.dispatchNamespaces.edit({...p,account_id:f,dispatch_namespace:r[`dispatch-namespace`]})),{successLabel:`Updated`})}};function b(e){return e.positional(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <dispatch-namespace>`,describe:`Get a Workers for Platforms namespace.`,builder:b,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.dispatchNamespaces.get({account_id:l,dispatch_namespace:r[`dispatch-namespace`]})),{successLabel:`Loaded`})}};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`Fetch a list of Workers for Platforms namespaces.`,builder:S,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.dispatchNamespaces.list({account_id:l})),{successLabel:`Loaded`})}};function w(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`create <script-name>`,describe:`Start uploading a collection of assets for use in a Worker version. To learn more about the direct uploads of assets, see https://developers.cloudflare.com/workers/static-assets/direct-upload/.`,builder:w,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces scripts asset-upload create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}/assets-upload-session`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``)},bodyKind:`json`,body:r.body===void 0?void 0:c(r.body)});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=c(r.body);a(await s(`Creating`,async()=>l.dispatchNamespaces.scripts.assetUpload.create({body:e,account_id:u,dispatch_namespace:r[`dispatch-namespace`],script_name:r[`script-name`]})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},E={command:`asset-upload`,describe:`Operations for scripts.asset-upload`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <script-name>`,describe:`Fetch script bindings from a script uploaded to a Workers for Platforms namespace.`,builder:D,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces scripts bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}/bindings`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.dispatchNamespaces.scripts.bindings.get({account_id:l,dispatch_namespace:r[`dispatch-namespace`],script_name:r[`script-name`]})),{successLabel:`Loaded`})}},k={command:`bindings`,describe:`Operations for scripts.bindings`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`tags`,{type:`string`,description:`Filter scripts by tags before deletion. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.`}).option(`limit`,{type:`number`,description:`Limit the number of scripts to delete.`}).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 j={command:`bulk-delete`,describe:`Delete multiple scripts from a Workers for Platforms namespace based on optional tag filters.`,builder:A,handler:async r=>{let c={tags:r.tags,limit:r.limit};if(r.dryRun){o({command:`cf dispatch-namespaces scripts bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}a(await s(`Deleting`,async()=>l.dispatchNamespaces.scripts.bulkDelete({account_id:u,dispatch_namespace:r[`dispatch-namespace`],...c})),{successLabel:`Deleted`})}};function M(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <script-name>`,describe:`Fetch script content from a script uploaded to a Workers for Platforms namespace.`,builder:M,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces scripts content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}/content`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.dispatchNamespaces.scripts.content.get({account_id:l,dispatch_namespace:r[`dispatch-namespace`],script_name:r[`script-name`]})),{successLabel:`Loaded`})}};function P(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`cf-worker-body-part`,{type:`string`,description:`The multipart name of a script upload part containing script content in service worker format. Alternative to including in a metadata part.`}).option(`cf-worker-main-module-part`,{type:`string`,description:`The multipart name of a script upload part containing script content in es module format. Alternative to including in a metadata part.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`files`,{type:`string`,description:"An array of modules (often JavaScript files) comprising a Worker script. At least one module must be present and referenced in the metadata as `main_module` or `body_part` by filename.<br/>Possible Content-Type(s) are: `application/javascript+module`, `text/javascript+module`, `application/javascript`, `text/javascript`, `text/x-python`, `text/x-python-requirement`, `application/wasm`, `text/plain`, `application/octet-stream`, `application/source-map`."}).option(`metadata`,{type:`string`,description:`JSON-encoded metadata about the uploaded parts and Worker configuration.`})}const F={command:`update <script-name>`,describe:`Put script content for a script uploaded to a Workers for Platforms namespace.`,builder:P,handler:async c=>{let l={};if(c[`cf-worker-body-part`]!==void 0&&(l[`CF-WORKER-BODY-PART`]=String(c[`cf-worker-body-part`])),c[`cf-worker-main-module-part`]!==void 0&&(l[`CF-WORKER-MAIN-MODULE-PART`]=String(c[`cf-worker-main-module-part`])),c.dryRun){o({command:`cf dispatch-namespaces scripts content update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${c[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(c[`dispatch-namespace`]))}/scripts/${c[`script-name`]==null?`<script-name>`:encodeURIComponent(String(c[`script-name`]))}/content`,pathParams:{"dispatch-namespace":String(c[`dispatch-namespace`]??``),"script-name":String(c[`script-name`]??``)},bodyKind:`multipart`,body:{body:c.body,file:c.file,files:c.files,metadata:c.metadata}});return}let f=await i(c),p=c.local?e:await t();if(c.accountId=p,c.file!==void 0||c.body!==void 0||c.files!==void 0||c.metadata!==void 0){let e=new FormData;if(c.file){let t=d(c.file);e.append(`file`,new Blob([t]),c.file.split(/[\\/]/).filter(Boolean).pop())}else c.body!==void 0&&e.append(`file`,c.body);if(c.files!==void 0){let t=typeof c.files==`string`?u(c.files,`files`,`text`):c.files;e.append(`files`,typeof t==`string`?t:JSON.stringify(t))}if(c.metadata!==void 0){let t=typeof c.metadata==`string`?u(c.metadata,`metadata`,`text`):c.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}a(await s(`Updating`,async()=>r(f,`PUT`,`/accounts/${p}/workers/dispatch/namespaces/${encodeURIComponent(String(c[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(c[`script-name`]))}/content`,{body:e,headers:Object.keys(l).length>0?l:void 0})),{successLabel:`Updated`});return}if(c.body){let e=u(c.body,`body`,`binary`);a(await s(`Updating`,async()=>r(f,`PUT`,`/accounts/${p}/workers/dispatch/namespaces/${encodeURIComponent(String(c[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(c[`script-name`]))}/content`,{body:e,headers:{"Content-Type":`multipart/form-data`,...l}})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},I={command:`content`,describe:`Operations for scripts.content`,builder:e=>e.command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`force`,{type:`boolean`,description:`If set to true, delete will not be stopped by associated service binding, durable object, or other binding. Any of these associated bindings/durable objects will be deleted along with the script.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`delete <script-name>`,describe:`Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete.`,builder:L,handler:async r=>{let c={force:r.force};if(r.dryRun){o({command:`cf dispatch-namespaces scripts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}a(await s(`Deleting`,async()=>l.dispatchNamespaces.scripts.delete({account_id:u,dispatch_namespace:r[`dispatch-namespace`],script_name:r[`script-name`],...c})),{successLabel:`Deleted`})}};function z(e){return e.positional(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <script-name>`,describe:`Fetch information about a script uploaded to a Workers for Platforms namespace.`,builder:z,handler:async r=>{if(r.dryRun){o({command:`cf dispatch-namespaces scripts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.dispatchNamespaces.scripts.get({account_id:l,dispatch_namespace:r[`dispatch-namespace`],script_name:r[`script-name`]})),{successLabel:`Loaded`})}};function V(e){return e.option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`tags`,{type:`string`,description:`Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`Fetch a list of scripts uploaded to a Workers for Platforms namespace.`,builder:V,handler:async r=>{let c={tags:r.tags};if(r.dryRun){o({command:`cf dispatch-namespaces scripts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.dispatchNamespaces.scripts.list({account_id:u,dispatch_namespace:r[`dispatch-namespace`],...c})),{successLabel:`Loaded`})}};function U(e){return e.option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`JSON Merge Patch (RFC 7396) request body for bulk secret changes. `}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const te={command:`bulk-edit`,describe:"Create, update, or delete multiple secrets on a script in a single operation using JSON Merge Patch (RFC 7396). Usage: - To create or update a secret, set its value to a secret object. - To delete a secret, set its value to `null`. - Secrets not included in the request are left unchanged.",builder:U,handler:async l=>{if(l.dryRun){o({command:`cf dispatch-namespaces scripts secrets bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${l[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(l[`dispatch-namespace`]))}/scripts/${l[`script-name`]==null?`<script-name>`:encodeURIComponent(String(l[`script-name`]))}/secrets-bulk`,pathParams:{"dispatch-namespace":String(l[`dispatch-namespace`]??``),"script-name":String(l[`script-name`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let u=await i(l),f=l.local?e:await t();if(l.accountId=f,l.file){let e=d(l.file);a(await s(`Updating`,async()=>r(u,`PATCH`,`/accounts/${f}/workers/dispatch/namespaces/${encodeURIComponent(String(l[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(l[`script-name`]))}/secrets-bulk`,{body:e,headers:{"Content-Type":`application/merge-patch+json`}})),{successLabel:`Updated`});return}if(l.body){let e=c(l.body);a(await s(`Updating`,async()=>r(u,`PATCH`,`/accounts/${f}/workers/dispatch/namespaces/${encodeURIComponent(String(l[`dispatch-namespace`]))}/scripts/${encodeURIComponent(String(l[`script-name`]))}/secrets-bulk`,{body:e})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function W(e){return e.positional(`secret-name`,{type:`string`,description:`A JavaScript variable name for the secret binding.`,demandOption:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of the Workers for Platforms dispatch namespace.`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Name of the script, used in URLs and route configuration.`,demandOption:!0}).option(`url-encoded`,{type:`boolean`,description:`Flag that indicates whether the secret name is URL encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const G={command:`delete <secret-name>`,describe:`Remove a secret from a script uploaded to a Workers for Platforms namespace.`,builder:W,handler:async r=>{let c={url_encoded:r[`url-encoded`]};if(r.dryRun){o({command:`cf dispatch-namespaces scripts secrets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/dispatch/namespaces/${r[`dispatch-namespace`]==null?`<dispatch-namespace>`:encodeURIComponent(String(r[`dispatch-namespace`]))}/scripts/${r[`script-name`]==null?`<script-name>`:encodeURIComponent(String(r[`script-name`]))}/secrets/${r[`secret-name`]==null?`<secret-name>`:encodeURIComponent(String(r[`secret-name`]))}`,pathParams:{"dispatch-namespace":String(r[`dispatch-namespace`]??``),"script-name":String(r[`script-name`]??``),"secret-name":String(r[`secret-name`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./chunk-vbHwaUoU.mjs";import{a as t}from"./public-BwQqexwo-DbWj8rrr.mjs";import*as n from"node:module";import{fileURLToPath as r,pathToFileURL as i}from"node:url";import{AsyncLocalStorage as a}from"node:async_hooks";var o;const s=Object.freeze({status:`aborted`});function c(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var l=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},u=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(o=globalThis).__zod_globalConfig??(o.__zod_globalConfig={});const d=globalThis.__zod_globalConfig;function f(e){return e&&Object.assign(d,e),d}function p(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t){return typeof t==`bigint`?t.toString():t}function h(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function g(e){return e==null}function _(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const v=Symbol(`evaluating`);function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==v)return r===void 0&&(r=v,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function x(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function S(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const ie=h(()=>{if(d.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function C(e){if(S(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(S(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function w(e){return C(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const ae=new Set([`string`,`number`,`symbol`]),oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return b(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return b(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!C(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function fe(e,t){if(!C(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return b(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return b(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return b(this,`shape`,i),i}}))}function O(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function k(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function A(e,t,n){let r=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function j(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const ye=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,m,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},be=c(`$ZodError`,ye),xe=c(`$ZodError`,ye,{Parent:Error});function Se(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ce(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}const we=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new l;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Te=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Ee=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new l;return a.issues.length?{success:!1,error:new(e??be)(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},De=Ee(xe),Oe=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},ke=Oe(xe),Ae=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return we(e)(t,n,i)},je=e=>(t,n,r)=>we(e)(t,n,r),Me=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Te(e)(t,n,i)},Ne=e=>async(t,n,r)=>Te(e)(t,n,r),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ee(e)(t,n,i)},Fe=e=>(t,n,r)=>Ee(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Le=e=>async(t,n,r)=>Oe(e)(t,n,r),Re=/^[cC][0-9a-z]{6,}$/,ze=/^[0-9a-z]+$/,Be=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ve=/^[0-9a-vA-V]{20}$/,He=/^[A-Za-z0-9]{27}$/,Ue=/^[a-zA-Z0-9_-]{21}$/,We=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ge=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ke=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Je(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Ye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ze=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^https?$/,nt=/^\+[1-9]\d{6,14}$/,rt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,it=RegExp(`^${rt}$`);function at(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ot(e){return RegExp(`^${at(e)}$`)}function st(e){let t=at({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${rt}T(?:${r})$`)}const ct=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},lt=/^-?\d+$/,ut=/^-?\d+(?:\.\d+)?$/,dt=/^(?:true|false)$/i,ft=/^null$/i,pt=/^[^A-Z]*$/,mt=/^[^a-z]*$/,M=c(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ht={number:`number`,bigint:`bigint`,object:`date`},gt=c(`$ZodCheckLessThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_t=c(`$ZodCheckGreaterThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vt=c(`$ZodCheckMultipleOf`,(e,t)=>{M.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yt=c(`$ZodCheckNumberFormat`,(e,t)=>{M.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=lt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),bt=c(`$ZodCheckMaxLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ve(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xt=c(`$ZodCheckMinLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ve(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),St=c(`$ZodCheckLengthEquals`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ve(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ct=c(`$ZodCheckStringFormat`,(e,t)=>{var n,r;M.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),wt=c(`$ZodCheckRegex`,(e,t)=>{Ct.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tt=c(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pt,Ct.init(e,t)}),Et=c(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mt,Ct.init(e,t)}),Dt=c(`$ZodCheckIncludes`,(e,t)=>{M.init(e,t);let n=T(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ot=c(`$ZodCheckStartsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`^${T(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),kt=c(`$ZodCheckEndsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`.*${T(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),At=c(`$ZodCheckOverwrite`,(e,t)=>{M.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var jt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
import{n as e}from"./chunk-vbHwaUoU.mjs";import{a as t}from"./public-BwQqexwo-CNW_dPly.mjs";import*as n from"node:module";import{fileURLToPath as r,pathToFileURL as i}from"node:url";import{AsyncLocalStorage as a}from"node:async_hooks";var o;const s=Object.freeze({status:`aborted`});function c(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var l=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},u=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(o=globalThis).__zod_globalConfig??(o.__zod_globalConfig={});const d=globalThis.__zod_globalConfig;function f(e){return e&&Object.assign(d,e),d}function p(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t){return typeof t==`bigint`?t.toString():t}function h(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function g(e){return e==null}function _(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const v=Symbol(`evaluating`);function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==v)return r===void 0&&(r=v,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function x(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function S(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const ie=h(()=>{if(d.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function C(e){if(S(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(S(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function w(e){return C(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const ae=new Set([`string`,`number`,`symbol`]),oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return b(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return b(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!C(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function fe(e,t){if(!C(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return b(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return b(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return b(this,`shape`,i),i}}))}function O(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function k(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function A(e,t,n){let r=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function j(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const ye=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,m,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},be=c(`$ZodError`,ye),xe=c(`$ZodError`,ye,{Parent:Error});function Se(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ce(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}const we=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new l;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Te=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Ee=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new l;return a.issues.length?{success:!1,error:new(e??be)(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},De=Ee(xe),Oe=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},ke=Oe(xe),Ae=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return we(e)(t,n,i)},je=e=>(t,n,r)=>we(e)(t,n,r),Me=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Te(e)(t,n,i)},Ne=e=>async(t,n,r)=>Te(e)(t,n,r),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ee(e)(t,n,i)},Fe=e=>(t,n,r)=>Ee(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Le=e=>async(t,n,r)=>Oe(e)(t,n,r),Re=/^[cC][0-9a-z]{6,}$/,ze=/^[0-9a-z]+$/,Be=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ve=/^[0-9a-vA-V]{20}$/,He=/^[A-Za-z0-9]{27}$/,Ue=/^[a-zA-Z0-9_-]{21}$/,We=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ge=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ke=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Je(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Ye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ze=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^https?$/,nt=/^\+[1-9]\d{6,14}$/,rt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,it=RegExp(`^${rt}$`);function at(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ot(e){return RegExp(`^${at(e)}$`)}function st(e){let t=at({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${rt}T(?:${r})$`)}const ct=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},lt=/^-?\d+$/,ut=/^-?\d+(?:\.\d+)?$/,dt=/^(?:true|false)$/i,ft=/^null$/i,pt=/^[^A-Z]*$/,mt=/^[^a-z]*$/,M=c(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ht={number:`number`,bigint:`bigint`,object:`date`},gt=c(`$ZodCheckLessThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_t=c(`$ZodCheckGreaterThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vt=c(`$ZodCheckMultipleOf`,(e,t)=>{M.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yt=c(`$ZodCheckNumberFormat`,(e,t)=>{M.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=lt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),bt=c(`$ZodCheckMaxLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ve(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xt=c(`$ZodCheckMinLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ve(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),St=c(`$ZodCheckLengthEquals`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ve(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ct=c(`$ZodCheckStringFormat`,(e,t)=>{var n,r;M.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),wt=c(`$ZodCheckRegex`,(e,t)=>{Ct.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tt=c(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pt,Ct.init(e,t)}),Et=c(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mt,Ct.init(e,t)}),Dt=c(`$ZodCheckIncludes`,(e,t)=>{M.init(e,t);let n=T(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ot=c(`$ZodCheckStartsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`^${T(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),kt=c(`$ZodCheckEndsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`.*${T(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),At=c(`$ZodCheckOverwrite`,(e,t)=>{M.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var jt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
3
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
4
4
|
`))}};const Mt={major:4,minor:4,patch:3},N=c(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Mt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=O(e),i;for(let a of t){if(a._zod.def.when){if(ge(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new l;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=O(e,t))});else{if(e.issues.length===t)continue;r||=O(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(O(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new l;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new l;return o.then(e=>t(e,r,a))}return t(o,r,a)}}y(e,`~standard`,()=>({validate:t=>{try{let n=De(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ke(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Nt=c(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ct(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=c(`$ZodStringFormat`,(e,t)=>{Ct.init(e,t),Nt.init(e,t)}),Pt=c(`$ZodGUID`,(e,t)=>{t.pattern??=Ge,P.init(e,t)}),Ft=c(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ke(e)}else t.pattern??=Ke();P.init(e,t)}),It=c(`$ZodEmail`,(e,t)=>{t.pattern??=qe,P.init(e,t)}),Lt=c(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===tt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Rt=c(`$ZodEmoji`,(e,t)=>{t.pattern??=Je(),P.init(e,t)}),zt=c(`$ZodNanoID`,(e,t)=>{t.pattern??=Ue,P.init(e,t)}),Bt=c(`$ZodCUID`,(e,t)=>{t.pattern??=Re,P.init(e,t)}),Vt=c(`$ZodCUID2`,(e,t)=>{t.pattern??=ze,P.init(e,t)}),Ht=c(`$ZodULID`,(e,t)=>{t.pattern??=Be,P.init(e,t)}),Ut=c(`$ZodXID`,(e,t)=>{t.pattern??=Ve,P.init(e,t)}),Wt=c(`$ZodKSUID`,(e,t)=>{t.pattern??=He,P.init(e,t)}),Gt=c(`$ZodISODateTime`,(e,t)=>{t.pattern??=st(t),P.init(e,t)}),Kt=c(`$ZodISODate`,(e,t)=>{t.pattern??=it,P.init(e,t)}),qt=c(`$ZodISOTime`,(e,t)=>{t.pattern??=ot(t),P.init(e,t)}),Jt=c(`$ZodISODuration`,(e,t)=>{t.pattern??=We,P.init(e,t)}),Yt=c(`$ZodIPv4`,(e,t)=>{t.pattern??=Ye,P.init(e,t),e._zod.bag.format=`ipv4`}),Xt=c(`$ZodIPv6`,(e,t)=>{t.pattern??=Xe,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Zt=c(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ze,P.init(e,t)}),Qt=c(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Qe,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function $t(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const en=c(`$ZodBase64`,(e,t)=>{t.pattern??=$e,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$t(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tn(e){if(!et.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $t(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const nn=c(`$ZodBase64URL`,(e,t)=>{t.pattern??=et,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rn=c(`$ZodE164`,(e,t)=>{t.pattern??=nt,P.init(e,t)});function an(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const on=c(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{an(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sn=c(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??ut,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),cn=c(`$ZodNumberFormat`,(e,t)=>{yt.init(e,t),sn.init(e,t)}),ln=c(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),un=c(`$ZodNull`,(e,t)=>{N.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),dn=c(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),fn=c(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function pn(e,t,n){e.issues.length&&t.issues.push(...k(n,e.issues)),t.value[n]=e.value}const mn=c(`$ZodArray`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>pn(t,n,e))):pn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function hn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...k(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function gn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _n(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>hn(e,n,i,t,u,d))):hn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const vn=c(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=h(()=>gn(t));y(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=S,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>hn(n,t,e,s,r,i))):hn(a,t,e,s,r,i)}return i?_n(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),yn=c(`$ZodObjectJIT`,(e,t)=>{vn.init(e,t);let n=e._zod.parse,r=h(()=>gn(t)),i=e=>{let t=new jt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
5
5
|
if (${n}.issues.length) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{a as u,n as d}from"./prompt-DdegNPpg.mjs";import{t as f}from"./cli-types-BsTty22w.mjs";function p(e){return e.option(`cidr`,{type:`string`,description:`IP prefix in CIDR notation to bind.`}).option(`prefix-id`,{type:`string`,description:`The ID of the parent IP prefix that contains the CIDR.`}).option(`region-key`,{type:`string`,description:`Region key from managed regions (e.g., "us", "eu").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create a DLS prefix binding`,builder:p,handler:async d=>{if(d.dryRun){a({command:`cf dls regional_services prefix_bindings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({cidr:l(d.cidr,`cidr`,`text`),prefix_id:l(d[`prefix-id`],`prefix-id`,`text`),region_key:l(d[`region-key`],`region-key`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.dls.regionalServices.prefixBindings.create({...e,account_id:p})),{successLabel:`Created`});return}d.cidr===void 0&&(d.cidr=await u(`cidr`,`IP prefix in CIDR notation to bind.`)),d[`prefix-id`]===void 0&&(d[`prefix-id`]=await u(`prefix-id`,`The ID of the parent IP prefix that contains the CIDR.`)),d[`region-key`]===void 0&&(d[`region-key`]=await u(`region-key`,`Region key from managed regions (e.g., "us", "eu").`));let m=c({cidr:l(d.cidr,`cidr`,`text`),prefix_id:l(d[`prefix-id`],`prefix-id`,`text`),region_key:l(d[`region-key`],`region-key`,`text`)});i(await o(`Creating`,async()=>f.dls.regionalServices.prefixBindings.create({...m,account_id:p})),{successLabel:`Created`})}};function h(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <binding-id>`,describe:`Delete a DLS prefix binding`,builder:h,handler:async s=>{if(s.dryRun){a({command:`cf dls regional_services prefix_bindings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${s[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(s[`binding-id`]))}`,pathParams:{"binding-id":String(s[`binding-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await d({force:!!s.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>c.dls.regionalServices.prefixBindings.delete({account_id:l,binding_id:s[`binding-id`]})),{successLabel:`Deleted`})}};function _(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`region-key`,{type:`string`,description:`New region key to assign (e.g., "us", "eu", "cfcanary").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`edit <binding-id>`,describe:`Update a DLS prefix binding`,builder:_,handler:async d=>{if(d.dryRun){a({command:`cf dls regional_services prefix_bindings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${d[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(d[`binding-id`]))}`,pathParams:{"binding-id":String(d[`binding-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({region_key:l(d[`region-key`],`region-key`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.dls.regionalServices.prefixBindings.edit({...e,account_id:p,binding_id:d[`binding-id`]})),{successLabel:`Updated`});return}d[`region-key`]===void 0&&(d[`region-key`]=await u(`region-key`,`New region key to assign (e.g., "us", "eu", "cfcanary").`));let m=c({region_key:l(d[`region-key`],`region-key`,`text`)});i(await o(`Updating`,async()=>f.dls.regionalServices.prefixBindings.edit({...m,account_id:p,binding_id:d[`binding-id`]})),{successLabel:`Updated`})}};function y(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <binding-id>`,describe:`Get a DLS prefix binding`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf dls regional_services prefix_bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${s[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(s[`binding-id`]))}`,pathParams:{"binding-id":String(s[`binding-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.dls.regionalServices.prefixBindings.get({account_id:l,binding_id:s[`binding-id`]})),{successLabel:`Loaded`})}};function x(e){return e.option(`cursor`,{type:`string`,description:`Opaque token for cursor-based pagination. Omit for the first page. Pass the value from a previous response to fetch the next page.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List DLS prefix bindings for an account`,builder:x,handler:async s=>{let c={cursor:s.cursor,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf dls regional_services prefix_bindings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.dls.regionalServices.prefixBindings.list({account_id:u,...c})),{successLabel:`Loaded`})}},C={command:`prefix_bindings`,describe:`Operations for regional_services.prefix_bindings`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`regional_services`,describe:`Operations for regional_services`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`region-id`,{type:`string`,description:`UUID of the region (custom or managed) or region_key of a managed region.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <region-id>`,describe:`Get a DLS region`,builder:T,handler:async s=>{if(s.dryRun){a({command:`cf dls regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regions/${s[`region-id`]==null?`<region-id>`:encodeURIComponent(String(s[`region-id`]))}`,pathParams:{"region-id":String(s[`region-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.dls.regions.get({account_id:l,region_id:s[`region-id`]})),{successLabel:`Loaded`})}};function D(e){return e.option(`cursor`,{type:`string`,description:`Opaque token for cursor-based pagination. Omit for the first page. Pass the value from a previous response to fetch the next page.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`type`,{type:`string`,description:`Filter regions by type. Omit to return all regions.`,choices:[`managed`,`custom`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List DLS regions for an account`,builder:f(D),handler:async s=>{let c={cursor:s.cursor,per_page:s[`per-page`],type:s.type};if(s.dryRun){a({command:`cf dls regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.dls.regions.list({account_id:u,...c})),{successLabel:`Loaded`})}},k={command:`regions`,describe:`Operations for regions`,builder:e=>e.command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},A={command:`dls`,describe:`dls`,builder:e=>e.command(w).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
|