cf 1.0.0-beta.28 → 1.0.0-beta.29
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 +10 -3
- package/dist/_meta/commands.json +2240 -3181
- package/dist/_meta/hand-written-commands.json +38 -8
- package/dist/_meta/schemas.json +1683 -2505
- package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
- package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
- package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
- package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
- package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
- package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
- package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
- package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
- package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
- package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
- package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
- package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
- package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
- package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
- package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
- package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
- package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
- package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
- package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
- package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
- package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
- package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
- package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
- package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/static-assets-DGDoaJf1.mjs +386 -0
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
- package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
- package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
- package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +19 -19
- package/dist/ai-gateway-Lj4On37s.mjs +0 -74
- package/dist/ai-search-BxyhS3X7.mjs +0 -74
- package/dist/alerting-r0G2X9y9.mjs +0 -52
- package/dist/analytics-C6bfqm-W.mjs +0 -17
- package/dist/auth-B-h0BHg7.mjs +0 -2
- package/dist/auth-B6tswVxH.mjs +0 -2
- package/dist/auth-clmqFEWU.mjs +0 -7
- package/dist/body-parser-DoewLePl.mjs +0 -2
- package/dist/brand-protection-kv1ba80i.mjs +0 -14
- package/dist/browser-run-D-vRoZmf.mjs +0 -40
- package/dist/build-BzJGqb2o.mjs +0 -2
- package/dist/builds-BbxINHRP.mjs +0 -64
- package/dist/cf-BQ_LRiut.mjs +0 -18
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
- package/dist/cli-B7vslRfu.mjs +0 -4
- package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
- package/dist/command-AVwd7XjE.mjs +0 -2
- package/dist/command-B87T_f2f.mjs +0 -2
- package/dist/command-CEHhi3t0.mjs +0 -2
- package/dist/command-CYmQE79n.mjs +0 -2
- package/dist/command-Ce8CVLth.mjs +0 -2
- package/dist/command-CqDudQZs.mjs +0 -2
- package/dist/command-D4YcwpVp.mjs +0 -2
- package/dist/command-D9Qyi1B0.mjs +0 -2
- package/dist/command-Dl9ICrRK.mjs +0 -2
- package/dist/command-DtCSe8Hy.mjs +0 -2
- package/dist/command-DwzVtmb3.mjs +0 -2
- package/dist/command-wtBubtZ4.mjs +0 -2
- package/dist/containers-B06OGOEB.mjs +0 -380
- package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
- package/dist/d1-nJCOJZb8.mjs +0 -50
- package/dist/deploy-DJMnWFNk.mjs +0 -2
- package/dist/deploy-context-YCW3eqP1.mjs +0 -56
- package/dist/deploy-input-CQLBXFEB.mjs +0 -2
- package/dist/dev-GsYHvMah.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/docs-CRc_WOXh.mjs +0 -3
- package/dist/email-auth-ptdqNSTZ.mjs +0 -6
- package/dist/email-domains-uL22-zRY.mjs +0 -14
- package/dist/email-routing-CV43rMJC.mjs +0 -44
- package/dist/errors-VG1mgwJl.mjs +0 -11
- package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-BA1fmzTm.mjs +0 -20
- package/dist/init-EVsjBrOz.mjs +0 -43
- package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
- package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
- package/dist/local-D5Vq6ooZ.mjs +0 -2
- package/dist/local-runtime-BZjgkacr.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-DRJugxya.mjs +0 -2
- package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
- package/dist/o11y-ySxrnP1Z.mjs +0 -88
- package/dist/oauth-CFVUl-Wv.mjs +0 -4
- package/dist/output-BZQEl3mK.mjs +0 -2
- package/dist/package-B7RgwuFR.mjs +0 -2
- package/dist/page-rules-DRw763O1.mjs +0 -38
- package/dist/pages-DfQnxiTk.mjs +0 -48
- package/dist/pipelines-DbyrI6F4.mjs +0 -40
- package/dist/previews-DEVNSip2.mjs +0 -6
- package/dist/progress-yvPscjYg.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-CEpZ-lQZ.mjs +0 -4
- package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
- package/dist/registrar-D23gfKBi.mjs +0 -43
- package/dist/request-headers-C0FpeBhz.mjs +0 -2
- package/dist/request-tracers-qd7XOAka.mjs +0 -4
- package/dist/rulesets-DmqwixUC.mjs +0 -42
- package/dist/run-BOKI1uWa.mjs +0 -2
- package/dist/run-DBqOjD1P.mjs +0 -2
- package/dist/schema-Dj9STsWI.mjs +0 -2
- package/dist/schema-flags-CXm9iIv6.mjs +0 -4
- package/dist/session-vzNfUhPl.mjs +0 -2
- package/dist/shared-MK-_lkbn.mjs +0 -2
- package/dist/smart-shield-Boy_qbqd.mjs +0 -22
- package/dist/snippets-DdoDYXW-.mjs +0 -18
- package/dist/spawn-B5F4OIHG.mjs +0 -5
- package/dist/sql-Bb56llsb.mjs +0 -4
- package/dist/src-BoSDeQ9m.mjs +0 -133
- package/dist/startup-profile-DQVkZZpb.mjs +0 -2
- package/dist/state-DW3QZtfh.mjs +0 -2
- package/dist/stream-BuZYDbNR.mjs +0 -89
- package/dist/telemetry-DkDUr4KK.mjs +0 -2
- package/dist/tunnels-D90ztENM.mjs +0 -27
- package/dist/ui-xjCox-gU.mjs +0 -2
- package/dist/url-scanner-BRdWwka4.mjs +0 -16
- package/dist/user-Cmb1_Wu5.mjs +0 -103
- package/dist/version-6Bpy6Bgt.mjs +0 -2
- package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
- package/dist/workers-BnLiOjZf.mjs +0 -39
- package/dist/workers-builds-sKpITeRk.mjs +0 -14
- package/dist/zaraz-BBKki5WS.mjs +0 -22
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-qsnRlRk6.mjs";import{n as o}from"./input-validation-D7z60HJH.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./output-hFMAotFl.mjs";import{t as d}from"./progress-DE_G09u2.mjs";import{n as f,t as p}from"./run-CXWkMU3x.mjs";import{a as m,n as h,t as g}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{n as _}from"./resolve-C3FmNlSO.mjs";import{t as ee}from"./hand-written-dry-run-B82fRl2N.mjs";import v from"node:fs";import y from"node:path";var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database`,body:`json`};function ne(e){return e.usage(`$0 d1 create
|
|
3
|
+
|
|
4
|
+
Create a new D1 database in your account.`).option(`jurisdiction`,{type:`string`,description:`Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>o(e,`jurisdiction`,`text`)).option(`name`,{type:`string`,description:`D1 database name.`}).option(`primary-location-hint`,{type:`string`,description:`Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user.`,choices:[`wnam`,`enam`,`weur`,`eeur`,`apac`,`oc`]}).coerce(`primary-location-hint`,e=>o(e,`primary-location-hint`,`text`)).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>o(e,`read-replication-mode`,`text`)).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 re={command:`create`,describe:`Create D1 Database`,builder:ne,handler:async e=>p({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({jurisdiction:e.jurisdiction,name:o(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),f=await t(e),p=e.local?l:await c();if(e.accountId=p,e.body!==void 0){let e=n,t=await d(`Creating`,async()=>f.send(te,{body:e,account_id:p}));u(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`D1 database name.`));let h=i({jurisdiction:e.jurisdiction,name:o(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}),g=await d(`Creating`,async()=>f.send(te,{body:h,account_id:p}));u(g,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`};function ae(e){return e.usage(`$0 d1 delete <database-id>
|
|
5
|
+
|
|
6
|
+
Delete a D1 database.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (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 oe={command:`delete <database-id>`,describe:`Delete D1 Database`,builder:ae,handler:async e=>p({command:`d1 delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await c();if(e.accountId=r,!await h({force:!!e.force,message:`This permanently deletes the D1 database and all of its data.`}))return;let i=await d(`Deleting`,async()=>n.send(ie,{account_id:r,database_id:e[`database-id`]}));u(i,{successLabel:`Deleted`})})};var se={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function ce(e){return e.usage(`$0 d1 edit <database-id>
|
|
7
|
+
|
|
8
|
+
Partially update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>o(e,`read-replication-mode`,`text`)).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 le={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:ce,handler:async e=>p({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({read_replication:{mode:e[`read-replication-mode`]}}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),o=await t(e),f=e.local?l:await c();if(e.accountId=f,e.body!==void 0){let t=n,r=await d(`Updating`,async()=>o.send(se,{body:t,account_id:f,database_id:e[`database-id`]}));u(r,{successLabel:`Updated`});return}let p=i({read_replication:{mode:e[`read-replication-mode`]}}),m=await d(`Updating`,async()=>o.send(se,{body:p,account_id:f,database_id:e[`database-id`]}));u(m,{successLabel:`Updated`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,query:[`fields`],joined:[`fields`]};function de(e){return e.usage(`$0 d1 get <database-id>
|
|
9
|
+
|
|
10
|
+
Get details for a specific D1 database.`).positional(`database-id`,{type:`string`,description:`Database ID`,demandOption:!0}).option(`fields`,{type:`string`,array:!0,description:`Comma-separated list of fields to include in the response. When omitted,
|
|
11
|
+
all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <database-id>`,describe:`Get D1 Database`,builder:de,handler:async e=>p({command:`d1 get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={fields:e.fields};if(e.dryRun){let t=await s();a({command:`cf d1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();e.accountId=i;let o=await d(`Loading`,async()=>r.send(ue,{account_id:i,database_id:e[`database-id`],...n}));u(o,{successLabel:`Loaded`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/insights/databases`,query:[`order_by`,`database_name`,`exact`,`since`,`until`,`limit`]};function me(e){return e.usage("$0 d1 insights databases\n\nList the databases in your account with the highest usage in a time window, sorted by `order_by` from highest to lowest. Totals are computed from the same data as D1 billing and the GraphQL Analytics API. They include every batch in the window: queries, imports and exports, successful and failed. Totals from other insights endpoints that read per-statement data can be lower than these numbers. Deleted databases are included if they had usage in the window. Databases with no usage in the window are not included. Usage is available a few minutes after a batch completes. For more complex filtering, or other metrics, groupings or time windows, run your own SQL on the `events.d1Queries` dataset with `cf sql query`. For examples, see https://developers.cloudflare.com/d1/observability/find-expensive-queries/").option(`order-by`,{type:`string`,description:`The usage metric to sort by, from highest to lowest.`,choices:[`rows_read`,`rows_written`,`queries`]}).option(`database-name`,{type:`string`,description:`Only count usage from databases whose name contains this value, case-insensitive. Usage recorded before 2026-10-30 has no database name and is not matched.`}).option(`exact`,{type:`boolean`,description:"If true, `database_name` must match the full database name, case-sensitive."}).option(`since`,{type:`string`,description:"Start of the window (inclusive), in RFC 3339 format. Defaults to 24 hours before `until`. Must be before `until`, and at most 90 days ago. The window from `since` to `until` must be at most 31 days."}).option(`until`,{type:`string`,description:`End of the window (exclusive), in RFC 3339 format. Defaults to the current time.`}).option(`limit`,{type:`number`,description:"Maximum number of databases to return. Results are not paginated, so only the top `limit` databases are returned."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`databases`,describe:`List D1 Databases by Usage`,builder:me,handler:async e=>p({command:`d1 insights databases`,classification:{safeFlags:[`order-by`,`exact`,`dry-run`]}},e,async()=>{let n={order_by:e[`order-by`],database_name:e[`database-name`],exact:e.exact,since:e.since,until:e.until,limit:e.limit};if(e.dryRun){let e=await s();a({command:`cf d1 insights databases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/insights/databases`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();e.accountId=i;let o=await d(`Loading`,async()=>r.send(pe,{account_id:i,...n}));u(o,{successLabel:`Loaded`})})};var ge={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/insights/queries`,query:[`order_by`,`database_id`,`since`,`until`,`limit`]};function _e(e){return e.usage("$0 d1 insights queries\n\nList the SQL statements with the highest usage in a time window, across all databases in your account or for one database, sorted by `order_by` from highest to lowest. Each item is one query text in one database. The same text run in two databases is two items. Values are estimates computed from sampled per-statement data. They include statements that failed with a SQL error, and deleted databases. They do not include imports and exports, so they can be lower than the totals from `GET /accounts/{account_id}/d1/insights/databases`, billing, and the GraphQL Analytics API. Usage is available a few minutes after a query completes. For more complex filtering, or other metrics, groupings or time windows, run your own SQL on the `events.d1Queries` dataset with `cf sql query`. For examples, see https://developers.cloudflare.com/d1/observability/find-expensive-queries/").option(`order-by`,{type:`string`,description:"The usage metric to sort by, from highest to lowest. `duration` sorts by `total_duration_ms`.",choices:[`rows_read`,`duration`,`executions`]}).option(`database-id`,{type:`string`,description:`Only return queries for this database. Defaults to all databases in the account. A database with no usage in the window, or that is not in the account, returns an empty list.`}).option(`since`,{type:`string`,description:"Start of the window (inclusive), in RFC 3339 format. Defaults to 24 hours before `until`. Must be before `until`, and at most 90 days ago. The window from `since` to `until` must be at most 7 days."}).option(`until`,{type:`string`,description:`End of the window (exclusive), in RFC 3339 format. Defaults to the current time.`}).option(`limit`,{type:`number`,description:"Maximum number of queries to return. Results are not paginated, so only the top `limit` queries are returned."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`queries`,describe:`List Top D1 Queries`,builder:_e,handler:async e=>p({command:`d1 insights queries`,classification:{safeFlags:[`order-by`,`dry-run`]}},e,async()=>{let n={order_by:e[`order-by`],database_id:e[`database-id`],since:e.since,until:e.until,limit:e.limit};if(e.dryRun){let e=await s();a({command:`cf d1 insights queries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/insights/queries`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();e.accountId=i;let o=await d(`Loading`,async()=>r.send(ge,{account_id:i,...n}));u(o,{successLabel:`Loaded`})})},ye={command:`insights`,describe:`show usage insights for the D1 databases in your account`,builder:e=>e.command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var be={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database`,query:[`name`,`page`,`per_page`]};function xe(e){return e.usage(`$0 d1 list
|
|
12
|
+
|
|
13
|
+
List D1 databases in your account.`).option(`name`,{type:`string`,description:`a database name to search for.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List D1 Databases`,builder:xe,handler:async e=>p({command:`d1 list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await s();a({command:`cf d1 list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database`,pathParams:{},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();e.accountId=i;let o=await d(`Loading`,async()=>r.send(be,{account_id:i,...n}));u(o,{successLabel:`Loaded`})})};var Ce={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/query`,body:`json`};function we(e){return e.usage(`$0 d1 query <database-id>
|
|
14
|
+
|
|
15
|
+
Execute a SQL query against a D1 database and return results as objects.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"sql": string, "params"?: [string]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).implies(`params`,[`sql`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const Te={command:`query <database-id>`,describe:`Query D1 Database`,builder:we,handler:async e=>p({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/query`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({params:e.params,sql:o(e.sql,`sql`,`text`),batch:n(e.batch,`batch`)}):r(e.body)});return}let f=e.body===void 0?void 0:r(e.body),p=await t(e),m=e.local?l:await c();if(e.accountId=m,e.body!==void 0){let t=f,n=await d(`Loading`,async()=>p.send(Ce,{body:t,account_id:m,database_id:e[`database-id`]}));u(n,{successLabel:`Loaded`});return}let h=i({params:e.params,sql:o(e.sql,`sql`,`text`),batch:n(e.batch,`batch`)}),g=await d(`Loading`,async()=>p.send(Ce,{body:h,account_id:m,database_id:e[`database-id`]}));u(g,{successLabel:`Loaded`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/raw`,body:`json`};function Ee(e){return e.usage(`$0 d1 raw <database-id>
|
|
16
|
+
|
|
17
|
+
Execute a SQL query against a D1 database and return result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"sql": string, "params"?: [string]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).implies(`params`,[`sql`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const De={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:Ee,handler:async e=>p({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/raw`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({params:e.params,sql:o(e.sql,`sql`,`text`),batch:n(e.batch,`batch`)}):r(e.body)});return}let f=e.body===void 0?void 0:r(e.body),p=await t(e),m=e.local?l:await c();if(e.accountId=m,e.body!==void 0){let t=f,n=await d(`Loading`,async()=>p.send(b,{body:t,account_id:m,database_id:e[`database-id`]}));u(n,{successLabel:`Loaded`});return}let h=i({params:e.params,sql:o(e.sql,`sql`,`text`),batch:n(e.batch,`batch`)}),g=await d(`Loading`,async()=>p.send(b,{body:h,account_id:m,database_id:e[`database-id`]}));u(g,{successLabel:`Loaded`})})};var Oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/bookmark`,query:[`timestamp`]};function ke(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
|
|
18
|
+
|
|
19
|
+
Retrieve the current bookmark, or the nearest bookmark at or before a provided timestamp. Bookmarks can be used with the restore endpoint to revert the database to a previous point in time.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`timestamp`,{type:`string`,description:`An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`get-bookmark <database-id>`,describe:`Get D1 database bookmark`,builder:ke,handler:async e=>p({command:`d1 time-travel get-bookmark`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={timestamp:e.timestamp};if(e.dryRun){let t=await s();a({command:`cf d1 time-travel get-bookmark`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/bookmark`,pathParams:{"database-id":String(e[`database-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();e.accountId=i;let o=await d(`Loading`,async()=>r.send(Oe,{account_id:i,database_id:e[`database-id`],...n}));u(o,{successLabel:`Loaded`})})};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/restore`,query:[`bookmark`,`timestamp`]};function Me(e){return e.usage(`$0 d1 time-travel restore <database-id>
|
|
20
|
+
|
|
21
|
+
Restore a D1 database to a previous point in time either via a bookmark or a timestamp.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`bookmark`,{type:`string`,description:"A bookmark to restore the database to. Required if `timestamp` is not provided."}).option(`timestamp`,{type:`string`,description:"An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided."}).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 Ne={command:`restore <database-id>`,describe:`Restore D1 Database to a bookmark or point in time`,builder:Me,handler:async e=>p({command:`d1 time-travel restore`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={bookmark:e.bookmark,timestamp:e.timestamp};if(e.dryRun){let t=await s();a({command:`cf d1 time-travel restore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/restore`,pathParams:{"database-id":String(e[`database-id`]??``)},query:n,bodyKind:`none`});return}let r=await t(e),i=e.local?l:await c();if(e.accountId=i,!await h({force:!!e.force,message:`This reverts the D1 database to a previous point in time. Data written after the bookmark will be lost.`}))return;let o=await d(`Processing`,async()=>r.send(je,{account_id:i,database_id:e[`database-id`],...n}));u(o,{successLabel:`Done`})})},Pe={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(Ae).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/undelete`,body:`json`};function Ie(e){return e.usage("$0 d1 undelete <database-id>\n\nRestore a deleted D1 database. The database is restored with the name it had when it was deleted, unless `new_name` is provided. The restored database counts against the account's limits. Undeleting a database that is not deleted succeeds without changes, unless `new_name` differs from its current name which errors. A database can only be undeleted within 7 days (7 * 24 hours) of its deletion. Once a database is undeleted, Time Travel (point-in-time recovery) cannot restore it to a bookmark or timestamp at or before the undeletion. Only states after the undeletion can be restored.").positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`new-name`,{type:`string`,description:`Restore the database with this name instead of the name it had when it was deleted. Required if another database in the account already uses that name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Le={command:`undelete <database-id>`,describe:`Undelete D1 Database`,builder:Ie,handler:async e=>p({command:`d1 undelete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await s();a({command:`cf d1 undelete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/undelete`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({new_name:o(e[`new-name`],`new-name`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),f=await t(e),p=e.local?l:await c();if(e.accountId=p,!await h({force:!!e.force,message:`After undeleting, Time Travel cannot restore the D1 database to a point in time at or before the undeletion.`}))return;if(e.body!==void 0){let t=n,r=await d(`Processing`,async()=>f.send(Fe,{body:t,account_id:p,database_id:e[`database-id`]}));u(r,{successLabel:`Done`});return}let m=i({new_name:o(e[`new-name`],`new-name`,`text`)}),g=await d(`Processing`,async()=>f.send(Fe,{body:m,account_id:p,database_id:e[`database-id`]}));u(g,{successLabel:`Done`})})},Re=(e,t,n)=>{let r=e instanceof RegExp?ze(e,n):e,i=t instanceof RegExp?ze(t,n):t,a=r!==null&&i!=null&&Be(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},ze=(e,t)=>{let n=t.match(e);return n?n[0]:null},Be=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},Ve=`\0SLASH`+Math.random()+`\0`,He=`\0OPEN`+Math.random()+`\0`,x=`\0CLOSE`+Math.random()+`\0`,Ue=`\0COMMA`+Math.random()+`\0`,We=`\0PERIOD`+Math.random()+`\0`,Ge=new RegExp(Ve,`g`),Ke=new RegExp(He,`g`),qe=new RegExp(x,`g`),Je=new RegExp(Ue,`g`),Ye=new RegExp(We,`g`),Xe=/\\\\/g,Ze=/\\{/g,Qe=/\\}/g,$e=/\\,/g,et=/\\\./g;function S(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function tt(e){return e.replace(Xe,Ve).replace(Ze,He).replace(Qe,x).replace($e,Ue).replace(et,We)}function nt(e){return e.replace(Ge,`\\`).replace(Ke,`{`).replace(qe,`}`).replace(Je,`,`).replace(Ye,`.`)}function rt(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function it(e){let t=[],n=``;for(;;){let r=Re(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],rt(t,r),t}let{pre:i,body:a,post:o}=r,s=i.split(`,`);if(s[0]=n+s[0],s[s.length-1]+=`{`+a+`}`,!o.length)return rt(t,s),t;n=s.pop(),rt(t,s),e=o}}function at(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),w(tt(e),n,r,i,0,a,!0).map(nt)}function ot(e){return`{`+e+`}`}function st(e){return/^-?0\d/.test(e)}function ct(e,t){return e<=t}function lt(e,t){return e>=t}function C(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!a||u){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function ut(e,t,n,r){let i=e.split(/\.\./),a=[];
|
|
22
|
+
/* c8 ignore start */
|
|
23
|
+
if(i[0]===void 0||i[1]===void 0)return a;
|
|
24
|
+
/* c8 ignore stop */
|
|
25
|
+
let o=S(i[0]),s=S(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(S(i[2])),1):1,u=ct;s<o&&(l*=-1,u=lt);let d=i.some(st),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function w(e,t,n,r,i,a,o){if(i>r)return[e];let s=[``],c=0,l=!1,u=!0;for(;;){let d=Re(`{`,`}`,e);if(!d)return C(s,e,[``],t,n,l);let f=d.pre;if(/\$$/.test(f)){if(s=C(s,f+`{`+d.body+`}`,[``],t,n,l&&!d.post.length),u=!1,!d.post.length)break;e=d.post;continue}let p=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(d.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(d.body),h=p||m,g=d.body.indexOf(`,`)>=0;if(!h&&!g){if(c<a&&d.post.match(/,(?!,).*\}/)){c++,e=d.pre+`{`+d.body+x+d.post,o=!0;continue}return C(s,f+`{`+d.body+`}`+d.post,[``],t,n,l)}u&&=(l=o&&!h,!1);let _;if(h)_=ut(d.body,m,t,n);else{let o=it(d.body);if(o.length===1&&o[0]!==void 0&&(o=w(o[0],t,n,r,i+1,a,!1).map(ot),o.length===1)){if(s=C(s,f+o[0],[``],t,n,l&&!d.post.length),!d.post.length)break;e=d.post;continue}let c=l&&!d.post.length&&!f;for(let e=0;c&&e<s.length;e++)s[e]&&(c=!1);_=[];let u=0;outer:for(let e=0;e<o.length;e++){let s=w(o[e],t,n,r,i+1,a,!1);for(let e=0;e<s.length;e++){let r=s[e];if(!c||r){if(_.length>=t||u+r.length>n)break outer;_.push(r),u+=r.length}}}}if(s=C(s,f,_,t,n,l&&!d.post.length),!d.post.length)break;e=d.post}return s}const T=(e,t)=>e===t?{t:`lit`,ch:String(e)}:{t:`class`,re:RegExp(`^[${e}-${t}]$`)},E=(e,t)=>t.map(t=>[T(e,e),...t]),D=(e,t)=>{if(!e)return[[]];let n=+e[0],r=+t[0],i=e.slice(1),a=t.slice(1);if(n===r)return E(n,D(i,a));let o=`0`.repeat(i.length),s=`9`.repeat(i.length),c=[];i!==o&&c.push(...E(n++,D(i,s)));let l=a===s?[]:E(r--,D(o,a));return n<=r&&c.push([T(n,r),...Array.from(i,()=>T(0,9))]),c.push(...l),c},dt=(e,t,n)=>{if(n)return D(String(e).padStart(n,`0`),String(t).padStart(n,`0`));let r=[];for(let n=String(e).length;n<=String(t).length;n++){let i=Math.max(e,n===1?0:10**(n-1)),a=Math.min(t,10**n-1);r.push(...D(String(i),String(a)))}return r},ft=(e,t)=>{let n=Number(e),r=Number(t);if(!Number.isSafeInteger(n)||!Number.isSafeInteger(r))return;n>r&&([n,r]=[r,n]);let i=/^-?0\d/.test(e)||/^-?0\d/.test(t)?Math.max(e.length,t.length):0,a=[];if(n<0){let e=dt(Math.max(-r,1),-n,i&&i-1);a.push(...e.map(e=>[{t:`lit`,ch:`-`},...e]))}return r>=0&&a.push(...dt(Math.max(n,0),r,i)),a},pt={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`],"[:alpha:]":[`\\p{L}\\p{Nl}`],"[:ascii:]":[`\\x00-\\x7f`],"[:blank:]":[`\\p{Zs}\\t`],"[:cntrl:]":[`\\p{Cc}`],"[:digit:]":[`\\p{Nd}`],"[:graph:]":[`\\p{Z}\\p{C}`,!0],"[:lower:]":[`\\p{Ll}`],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}\\p{S}`],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`],"[:upper:]":[`\\p{Lu}`],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`],"[:xdigit:]":[`A-Fa-f0-9`]},O=e=>e.replace(/[[\]\\-]/g,`\\$&`),k=/$./,mt=(e,t,n=!1,r)=>{let i=e=>{let t=r?e.normalize(r):e;return[...t].length===1?t:e},a=t;
|
|
26
|
+
/* c8 ignore start */
|
|
27
|
+
if(e.charAt(a)!==`[`)throw Error(`not in a brace expression`);
|
|
28
|
+
/* c8 ignore stop */
|
|
29
|
+
let o=[],s=[],c=a+1,l=!1,u=!1,d=!1,f=a,p=``;WHILE:for(;c<e.length;){let t=String.fromCodePoint(e.codePointAt(c));if((t===`!`||t===`^`)&&c===a+1){d=!0,c++;continue}if(t===`]`&&l&&!u){f=c+1;break}if(l=!0,t===`\\`&&!u){u=!0,c++;continue}if(t===`[`&&!u){for(let[t,[n,r]]of Object.entries(pt))if(e.startsWith(t,c)){if(p)return[k,e.length-a];c+=t.length,r?s.push(n):o.push(n);continue WHILE}}u=!1;let n=i(t);p?(n.codePointAt(0)>p.codePointAt(0)?o.push(O(p)+`-`+O(n)):n===p&&o.push(O(n)),p=``,c+=t.length):e.startsWith(`-]`,c+t.length)?(o.push(O(n+`-`)),c+=t.length+1):e.startsWith(`-`,c+t.length)?(p=n,c+=t.length+1):(o.push(O(n)),c+=t.length)}if(f<c)return[k,0];if(!o.length&&!s.length)return[k,e.length-a];let m=`[`+(d?`^`:``)+o.join(``)+`]`,h=`[`+(d?``:`^`)+s.join(``)+`]`,g=`^`+(o.length&&s.length?`(`+m+`|`+h+`)`:o.length?m:h);return[new RegExp(g,n?`iu`:`u`),f-a]},A={t:`match`,id:0},j=e=>({t:`lit`,ch:e}),ht=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,`\\$&`),gt=e=>RegExp(`^${ht(e)}$`,`iu`),M=/* @__PURE__ */ new Map,_t=e=>{let t=M.get(e);return t||(t=gt(e),M.size>=1e3&&M.clear(),M.set(e,t)),t},N=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let n=t.charCodeAt(0);if(n>=128)return e.re.test(t);let r=e.ascii??=/* @__PURE__ */ new Uint8Array(128);return r[n]||=e.re.test(t)?1:2,r[n]===1},vt=(e,t,n,r,i)=>{let a=[];for(let o=0;o<e.length;){let s=String.fromCodePoint(e.codePointAt(o));if(i){let t=s===`\\`&&e.startsWith(i,o+1)?1:0;if(t||s===i){let n=o+t+i.length,r=e.indexOf(i,n),s=/^(-?\d+)\.\.(-?\d+)$/.exec(e.slice(n,r)),c=r!==-1&&s&&ft(s[1],s[2]);if(c){a.push({t:`ext`,type:`@`,alts:c}),o=r+i.length;continue}}}if(s===`\\`){let t=e.codePointAt(o+1),n=t===void 0?s:String.fromCodePoint(t);a.push(j(n)),o+=1+n.length}else{if(s===`[`){let[n,i]=mt(e,o,t,r);if(i){a.push({t:`class`,re:n}),o+=i;continue}}!n&&`!?+*@`.includes(s)&&e[o+1]===`(`?(a.push({t:`open`,type:s}),o+=2):(a.push(!n&&s===`|`?{t:`bar`}:!n&&s===`)`?{t:`close`}:s===`*`?{t:`star`}:s===`?`?{t:`any`}:j(s)),o+=s.length)}}return a},yt=e=>{let t=/* @__PURE__ */ new Map,n=[];return e.forEach((e,r)=>{e.t===`open`?n.push(r):e.t===`close`&&n.length&&t.set(n.pop(),r)}),t},bt=(e,t,n,r,i)=>{let a=[],o=[a];for(let s=n;s<r;s++){let n=e[s],r=t.get(s);if(n.t===`open`&&r!==void 0){let i=bt(e,t,s+1,r,!1);a.push({t:`ext`,type:n.type,alts:i}),s=r}else n.t===`bar`&&!i?o.push(a=[]):n.t===`open`?a.push(j(n.type),j(`(`)):n.t===`bar`?a.push(j(`|`)):n.t===`close`?a.push(j(`)`)):a.push(n)}return o},xt=(e,t)=>{let n=[],r=``,i=()=>{for(let e of r.normalize(t))n.push(j(e));r=``};for(let a of e)a.t===`lit`?r+=a.ch:(i(),n.push(a.t===`ext`?{...a,alts:a.alts.map(e=>xt(e,t))}:a));return i(),n},St=(e,t)=>{let n=1,r=e=>({t:`split`,id:n++,out:e}),i=(e,t)=>e.reduceRight((e,t)=>a(t,e),t),a=(e,a)=>{switch(e.t){case`lit`:let r=t?_t(e.ch):void 0;return{t:`lit`,id:n++,ch:e.ch,re:r,next:a};case`any`:case`star`:return{t:e.t,id:n++,next:a};case`class`:return{t:`class`,id:n++,re:e.re,next:a}}let o=t=>e.alts.map(e=>i(e,t));switch(e.type){case`@`:return r(o(a));case`?`:return r([a,...o(a)]);case`!`:return{t:`neg`,id:n++,sub:r(o(A)),next:a}}let s=r([]),c=r(o(s));return s.out.push(a,c),e.type===`*`?s:c};return[i(e,A),n]},Ct=e=>{let t=[],n=/* @__PURE__ */ new Set,r=e=>e.t===`match`?`match`:String(e.id),i=(e,a)=>{if(e.t===`match`||n.has(e))return;n.add(e);let o=n=>t.push(`${a}${e.id}: ${n}`);switch(e.t){case`split`:o(`split -> ${e.out.map(r).join(`, `)}`);for(let t of e.out)i(t,a);return;case`neg`:return o(`!(${r(e.sub)}) -> ${r(e.next)}`),i(e.sub,a+` `),i(e.next,a);case`lit`:o(`${JSON.stringify(e.ch)} -> ${r(e.next)}`);break;case`class`:o(`${e.re} -> ${r(e.next)}`);break;default:o(`${e.t===`any`?`?`:`*`} -> ${r(e.next)}`)}i(e.next,a)};return i(e,``),[`start -> ${r(e)}`,...t].join(`
|
|
30
|
+
`)};var wt=class{gen;threads=[];match=!1;runs=[];ids=[];constructor(e){this.gen=e}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}};const Tt=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((e,n)=>e!==t.ids[n])?!1:e.runs.every(e=>t.runs.some(t=>t.neg===e.neg&&Tt(t.state,e.state))),Et=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0});var P=class{dots;dotStart;#e;constructor(e,t,n){this.dots=e,this.dotStart=t,this.#e=n}state(){return new wt(++this.#e.gen)}done(e){return e.ids=e.threads.map(e=>e.id).sort((e,t)=>e-t),e.match&&e.ids.unshift(A.id),e}#t(e,t){let{seen:n}=this.#e;return n[t.id]!==e.gen&&(n[t.id]=e.gen,!0)}#n(e,t){let{has:n}=this.#e;return n[t.id]!==e.gen&&(n[t.id]=e.gen,e.threads.push(t),!0)}restricted(e,t){return t&&(this.dots||this.dotStart&&e===0)}add(e,t,n,r){switch(t.t){case`split`:if(!this.#t(e,t))return;for(let i of t.out)this.add(e,i,n,r);return;case`neg`:if(!this.#t(e,t))return;let i=this.state();return this.add(i,t.sub,n,!1),this.done(i),this.addRun(e,{t:`run`,neg:t,state:i},n,r);case`star`:if(this.restricted(n,r))return;this.#n(e,t)&&this.add(e,t.next,n,r);return;case`match`:e.match=!0;return;default:this.#n(e,t)}}addRun(e,t,n,r){for(let n of e.runs)if(n.neg===t.neg&&Tt(n.state,t.state))return;e.runs.push(t),t.state.match||this.add(e,t.neg.next,n,r)}step(e,t,n,r){let i=this.state();for(let a of e.threads)switch(a.t){case`lit`:N(a,t)&&this.add(i,a.next,n+1,r);break;case`any`:this.restricted(n,r)||this.add(i,a.next,n+1,r);break;case`class`:!this.restricted(n,r)&&a.re.test(t)&&this.add(i,a.next,n+1,r);break;case`star`:this.restricted(n,r)||this.add(i,a,n+1,r)}if(!this.restricted(n,r))for(let a of e.runs){if(a.state.dead){this.addRun(i,a,n+1,r);continue}let e=this.step(a.state,t,n,!1);this.addRun(i,{t:`run`,neg:a.neg,state:e},n+1,r)}return this.done(i)}};const Dt=e=>{let t=e.ids.join();return e.runs.length?`${t}|${e.runs.map(e=>`${e.neg.id}(${Dt(e.state)})`).sort().join(`|`)}`:t};var Ot=class{#e;#t=/* @__PURE__ */ new Map;#n=0;#r;#i;#a;#o;constructor(e,t){this.#e=e,this.#a=new P(!1,!1,t),this.#o=new P(!1,!0,t)}#s(e){return{state:e,match:e.match,dead:e.dead,next:/* @__PURE__ */ new Map}}#c(e){let t=Dt(e),n=this.#t.get(t);if(n)return n;this.#n>262144&&this.#l();let r=this.#s(e);return this.#t.set(t,r),this.#n+=t.length+1,r}#l(){this.#t.clear(),this.#n=0,this.#r=void 0,this.#i=void 0}start(e){if(e){if(this.#i)return this.#i;let e=this.#o.state();return this.#o.add(e,this.#e,0,!0),this.#i=this.#s(this.#o.done(e))}if(this.#r)return this.#r;let t=this.#a.state();return this.#a.add(t,this.#e,0,!0),this.#r=this.#c(this.#a.done(t))}next(e,t){let n=t.charCodeAt(0),r=n<128?void 0:e.next.get(t);if(r)return r;let i=e===this.#i?this.#c(this.#o.step(e.state,t,0,!0)):this.#c(this.#a.step(e.state,t,1,!0));return n<128?(e.ascii||(e.ascii=Array(128),this.#n+=128),e.ascii[n]=i):e.next.set(t,i),this.#n++,i}};const kt=e=>{let t=[];for(let n=e;n.t!==`match`;n=n.next){if(n.t===`split`||n.t===`neg`)return;t.push(n)}return t},At=(e,t,n,r)=>{let i=0,a=n,o=-1,s=0;for(;a<r;){let n=e[i];if(n?.t===`star`){o=i++,s=a;continue}let r=t[a];if(n&&(n.t===`any`||n.t===`lit`&&N(n,r)||n.t===`class`&&n.re.test(r)))i++,a++;else{if(o===-1)return!1;i=o+1,a=++s}}for(;e[i]?.t===`star`;)i++;return i===e.length},jt=e=>{let t=0,n=0;for(let r of e){let[e,i]=Mt(r);t+=e,n+=i}return[t,n]},Mt=e=>{if(e.t===`star`)return[0,1/0];if(e.t!==`ext`)return[1,1];if(e.type===`!`)return[0,1/0];let t=e.alts.map(jt),n=Math.min(...t.map(e=>e[0])),r=Math.max(...t.map(e=>e[1])),i=r===0?0:1/0;return e.type===`@`?[n,r]:e.type===`?`?[0,r]:e.type===`*`?[0,i]:[n,i]},Nt=(e,t,n)=>{for(let r=0;r<e.length;r++)if(!N(e[r],t[n+r]))return!1;return!0},Pt=/[/\ud800-\udfff]/,Ft=/[\ud800-\udfff]/,F=e=>Ft.test(e)?[...e]:e,It=e=>{if(e.includes(`/`))throw Error(`can only match a single path portion, got: `+e)};var Lt=class{pattern;options;#e;#t;#n;#r;#i;#a=!1;#o;#s;#c=!1;#l=0;#u=1/0;#d=[];#f=[];#p;#m;#h=!1;#g;#_;constructor(e,t={}){if(e.includes(`/`))throw Error(`can only match a single path portion, got pattern: `+e);this.pattern=e,this.options=t;let{nocase:n=!1,noext:r=!1,normalize:i}=t;this.#_=i===!0?`NFC`:i||void 0;let a=/^[?*+@]\(\)$/.test(e),o=vt(e,n,r||a,this.#_,t.rangeMark),[s]=bt(o,yt(o),0,o.length,!0);this.#_&&(s=xt(s,this.#_));let[c,l]=St(s,n);if(this.#e=c,this.#t=l,s.every(e=>e.t===`lit`))this.#i=s.map(e=>e.ch).join(``),this.#a=n;else{let e=e=>e.t===`lit`?n?{ch:e.ch,re:_t(e.ch)}:{ch:e.ch}:void 0;for(let t of s){let n=e(t);if(!n)break;this.#d.push(n)}for(let t=s.length-1;t>=0;t--){let n=e(s[t]);if(!n)break;this.#f.unshift(n)}this.#h=!!(this.#d.length||this.#f.length),n||(this.#p=this.#d.map(e=>e.ch).join(``),this.#m=this.#f.map(e=>e.ch).join(``)),this.#s=kt(this.#e)?.slice(this.#d.length,-this.#f.length||void 0),this.#c=!!this.#s?.every(e=>e.t===`star`||e.t===`any`);let[t,r]=jt(s);this.#l=t,this.#u=r}}test(e){return this.#_?(It(e),this.#v(e.normalize(this.#_))):Pt.test(e)?(It(e),this.#v(e,[...e])):this.#v(e,e)}testUnchecked(e){return this.#v(this.#_?e.normalize(this.#_):e)}#v(e,t){if(this.#i!==void 0)return this.#a?(this.#o??=gt(this.#i)).test(e):e===this.#i;let n=this.#l,r=this.#u;if(t===void 0){let i=e.length,a=i+1>>1;if(i<n||a>r)return!1;(a<n||i>r)&&(t=F(e))}if(t!==void 0&&(t.length<n||t.length>r))return!1;let i=this.#d.length;if(this.#h){if(this.#p!==void 0&&this.#m!==void 0){if(!e.startsWith(this.#p)||!e.endsWith(this.#m))return!1}else{t??=F(e);let n=t.length-this.#f.length;if(!Nt(this.#d,t,0)||!Nt(this.#f,t,n))return!1}}let a=!this.options.dot&&e.startsWith(`.`);if(this.#s){if(e===`.`||e===`..`||a&&!i)return!1;if(this.#c)return!0;t??=F(e);let n=t.length-this.#f.length;return At(this.#s,t,i,n)}if(t??=F(e),e===`.`||e===`..`){this.#n??=Et(this.#t);let e=this.#r??=new P(!0,!1,this.#n),n=e.state();e.add(n,this.#e,0,!0);let r=e.done(n);for(let n=0;n<t.length;n++)r=e.step(r,t[n],n,!0);return r.match}this.#n??=Et(this.#t);let o=this.#g??=new Ot(this.#e,this.#n),s=o.start(a),c=t===e;for(let n=0;n<t.length;n++){if(s.dead)return!1;let r=c?e.charCodeAt(n):t[n].charCodeAt(0);s=s.ascii?.[r]??o.next(s,t[n])}return s.match}toString(){return Ct(this.#e)}};const I=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Rt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),zt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`),L=(e,t,n={})=>(I(t),!n.nocomment&&t.charAt(0)===`#`?!1:Bt(t,n).match(e)),R=/* @__PURE__ */ new Map,Bt=(e,t)=>{let n=e+`\0`+JSON.stringify(t),r=R.get(n);return r?R.delete(n):(r=new Q(e,{...t}),R.size>=256&&R.delete(R.keys().next().value)),R.set(n,r),r},Vt=typeof process==`object`&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,Ht={win32:{sep:`\\`},posix:{sep:`/`}};L.sep=Vt===`win32`?Ht.win32.sep:Ht.posix.sep;const z=Symbol(`globstar **`);L.GLOBSTAR=z,L.filter=(e,t={})=>n=>L(n,e,t);const B=(e,t={})=>Object.assign({},e,t);L.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return L;let t=L;return Object.assign((n,r,i={})=>t(n,r,B(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,B(e,n))}static defaults(n){return t.defaults(B(e,n)).Minimatch}},unescape:(n,r={})=>t.unescape(n,B(e,r)),escape:(n,r={})=>t.escape(n,B(e,r)),filter:(n,r={})=>t.filter(n,B(e,r)),defaults:n=>t.defaults(B(e,n)),braceExpand:(n,r={})=>t.braceExpand(n,B(e,r)),match:(n,r,i={})=>t.match(n,r,B(e,i)),sep:t.sep,GLOBSTAR:z})};const V=(e,t={})=>(I(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:at(e,{max:t.braceExpandMax}));L.braceExpand=V;const Ut=/(?<![\\$])\{(-?\d+)\.\.(-?\d+)\}/g;L.match=(e,t,n={})=>{let r=new Q(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const Wt=/[?*]|[+@!]\(.*?\)|\[|\]/,Gt=(e,t)=>{let n=t+1;(e.charAt(n)===`!`||e.charAt(n)===`^`)&&n++;let r=!1;for(;n<e.length;n++){let t=e.charAt(n);if(t===`]`&&r)return n;r=!0,t===`\\`&&n++}return-1},Kt=(e,t)=>{if(!t&&(e===`+()`||e===`@()`))return e;let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`\\`)n+=e.charAt(++r)||i;else if(i===`*`||i===`?`)return;else if(i===`[`){let t=Gt(e,r);if(t===-1){n+=i;continue}let a=e.slice(r+1,t);if(a.startsWith(`\\`)&&(a=a.slice(1)),[...a].length!==1||`!^`.includes(e.charAt(r+1)))return;n+=a,r=t}else if(!t&&`+@!`.includes(i)&&e.charAt(r+1)===`(`&&e.includes(`)`,r+2))return;else n+=i}return n},qt=e=>{if(/^[?*+@]\(\)$/.test(e)||e.includes(`[:`))return!1;let t=0;for(let n=0;n<e.length;n++){let r=e.charAt(n);if(r===`\\`){if(++n===e.length)return!1}else if(r===`[`){let t=Gt(e,n);t!==-1&&(n=t)}else if(`+@!?*`.includes(r)&&e.charAt(n+1)===`(`)t++,n++;else if(r===`)`){if(!t--)return!1}else if(r===`|`&&!t)return!1}return!t};let H,Jt;const U=(e,t)=>typeof e==`string`?t===e:t!==``&&e.testUnchecked(t),Yt=(e,t,n,r,i)=>U(e,t)?n:r!==void 0&&U(e,r)?i:-1,W=e=>e===`.`||e===`..`,G=e=>typeof e==`string`&&/^[a-z]:$/i.test(e),K=e=>typeof e==`string`&&/^unc$/i.test(e),q=e=>{if(e[0]!==``||e[1]!==``)return-1;let t=e[2]===`?`?K(e[3])?4:-1:2,n=e[t],r=e[t+1];return t!==-1&&n!==void 0&&n!==``&&n!==z&&r!==void 0&&r!==``&&r!==z?t:-1},J=(e,t)=>!W(e)&&(t||!e.startsWith(`.`)),Y=(e,t,n,r,i)=>{for(let a=t;a<n;){if(e.charCodeAt(a)===46){if(!r)return!0;let t=e.charCodeAt(a+1)===46?a+2:a+1;if(t>=n||X(e.charCodeAt(t),i))return!0}let t=Xt(e,a,i);if(t===-1)return!1;for(a=t+1;a<n&&X(e.charCodeAt(a),i);)a++}return!1},X=(e,t)=>t===`/`?e===47:t===`\\`?e===92:e===47||e===92,Xt=(e,t,n)=>{if(n!==`both`)return e.indexOf(n,t);let r=e.indexOf(`/`,t),i=e.indexOf(`\\`,t);return r===-1?i:i===-1?r:Math.min(r,i)},Zt=(e,t,n)=>n===`both`?Math.max(e.lastIndexOf(`/`,t),e.lastIndexOf(`\\`,t)):e.lastIndexOf(n,t),Z={};var Q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;#e;#t;#n;#r;#i=[];#a=[];#o=[];#s=/* @__PURE__ */ new Map;#c=!1;#l;#u=/* @__PURE__ */ new WeakMap;constructor(e,t={}){I(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Vt,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.#e=!this.preserveMultipleSlashes,this.#n=(t.optimizationLevel??1)>=2;let n=t.normalize;this.#r=n===!0?`NFC`:n||void 0,this.make();let r=this.set.map(e=>this.#f(e));this.#o=this.set.map((e,t)=>this.#e&&e.length-1>r[t]),this.#i=this.set.map((e,t)=>{let n=this.#o[t]?e.length-1:e.length,i=e.slice(r[t]+1,n).filter(e=>typeof e==`string`&&!!e);return[...new Set(i)]}),this.#t=this.#i.some(e=>e.length),this.#a=this.set.map((e,n)=>{let[i,a,o]=e;if(this.#o[n]&&e.length===2&&i===z&&a!==z)return`tail`;if(this.#o[n]&&t.matchBase&&e.length===1&&i!==z&&i!==``)return`base`;if(this.#e&&r[n]===-1){if(e.length===3&&i===z&&o===z&&a!==z&&a!==``&&this.maxGlobstarRecursion>0)return`mid`;if(e.length===2&&a===z&&i!==z&&i!==``)return`head`}})}#d(e){return this.#r?e.normalize(this.#r):e}#f(e){if(!this.isWindows)return-1;if(G(e[0]))return 0;if(e[0]===``&&e[1]===``&&e[2]===`?`&&G(e[3]))return 3;let t=q(e);return t===-1?-1:t+1}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.#w())];let n=this.globSet.map(e=>this.#T(e));this.globParts=this.preprocess(n),this.#c=!0;let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[2]===`?`&&K(e[3])?6:4,n=e[0]===``&&e[1]===``&&(e[2]===`?`||!Wt.test(e[2]))&&e.slice(3,t).every(e=>!Wt.test(e)),r=/^[a-z]:/i.test(e[0]);if(n)return[...e.slice(0,t).map(e=>this.#d(e)),...e.slice(t).map(e=>this.parse(e))];if(r)return[this.#d(e[0]),...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&(G(t[3])||K(this.globParts[e][3]))&&(K(this.globParts[e][3])&&(t[3]=`UNC`),t[2]=`?`)}t.noext||this.mergeRows(),this.#c=!1,this.set.forEach((e,t)=>{for(let n=0;n<e.length;n++)e[n]===Z&&(e[n]=this.parse(this.globParts[t][n]))})}mergeRows(){let e=!0;for(;e;){e=!1;let t=Math.max(0,...this.set.map(e=>e.length));for(let n=0;n<t;n++){let t=/* @__PURE__ */ new Map;this.set.forEach((e,r)=>{if(!(e[n]instanceof Lt||e[n]===Z)||!qt(this.globParts[r][n]))return;let i=[...this.globParts[r]];i[n]=``;let a=`${e.length}/${i.join(`/`)}`,o=t.get(a);o?o.push(r):t.set(a,[r])});let r=/* @__PURE__ */ new Set;for(let e of t.values()){if(e.length<2)continue;let[t,...i]=e,a=`@(${e.map(e=>this.globParts[e][n]).join(`|`)})`;this.globParts[t][n]=a,this.set[t][n]=this.parse(a);for(let e of i)r.add(e)}r.size&&(e=!0,this.set=this.set.filter((e,t)=>!r.has(t)),this.globParts=this.globParts.filter((e,t)=>!r.has(t)))}}}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>{let t=this.#f(e)+1;return e=e.reduce((e,n)=>{let r=e[e.length-1];return n===`**`&&r===`**`?e:n===`..`&&e.length>t&&r&&r!==`..`&&r!==`.`&&r!==`**`?(e.pop(),e):(e.push(n),e)},[]),e.length===0?[``]:e})}#p(e){let t=!this.isWindows||!e.includes(`\\`)?`/`:e.includes(`/`)?`both`:`\\`,n=this.#e?0:-1,r=``,i=0,a,o=0,s=!!this.options.dot;ROWS:for(let c=0;c<this.set.length;c++){let l=this.set[c],u=l[l.length-1],d=n!==-1&&this.#o[c]&&u!==z;if(d&&n===0){let s=Zt(e,e.length,t);if(i=s+1,r=e.slice(i),r===``&&s>=0){let n=s;for(;n>0&&X(e.charCodeAt(n-1),t);)n--;o=n===0?0:Zt(e,n-1,t)+1,a=e.slice(o,n)}let c=this.#n&&(W(r)||r===``&&a!==void 0&&W(a));n=c?-1:1,d=!c}let f=-1;if(d&&typeof u==`string`&&(f=Yt(u,r,i,a,o),f===-1))continue;if(this.#t){for(let t of this.#i[c])if(!e.includes(t))continue ROWS}if(d&&typeof u==`object`&&(f=Yt(u,r,i,a,o),f===-1))continue;let p=this.#a[c];if(p===`base`&&d)return`yes`;if(p===`tail`&&d){if(this.#n&&Y(e,0,f,!0,t))return`maybe`;if(!Y(e,0,f,s,t))return`yes`}else if(p===`mid`||p===`head`){let n=this.#h(e,l,p===`head`,s,t);if(n!==`no`)return n}else return`maybe`}return`no`}#m(e,t,n){let r=!!this.options.dot,i=e.length;if(n===`head`){if(i<2||!U(t[0],e[0]))return!1;for(let t=1;t<i;t++)if(!J(e[t],r))return!1;return!0}let a=t[1];if(n===`tail`){let t=i-1;if(!U(a,e[t])&&(e[t]!==``||i===1||!U(a,e[--t])))return!1;for(let n=0;n<t;n++)if(!J(e[n],r))return!1;return!0}for(let t=0;t<i;t++){if(U(a,e[t])&&t+1<i){let n=t+1;for(;n<i&&J(e[n],r);)n++;if(n===i)return!0}if(!J(e[t],r))return!1}return!1}#h(e,t,n,r,i){if(this.#n&&Y(e,0,e.length,!0,i))return`maybe`;let a=t[+!n],o=0;for(let t=Xt(e,o,i);t!==-1;t=Xt(e,o,i)){let s=t+1;for(;s<e.length&&X(e.charCodeAt(s),i);)s++;if((typeof a==`string`?t-o===a.length&&e.startsWith(a,o):t>o&&a.testUnchecked(e.slice(o,t)))&&!Y(e,s,e.length,r,i))return`yes`;if(n||Y(e,o,s,r,i))return`no`;o=s}return`no`}#g(e){let t=H;return t?.f===e&&t.isWindows===this.isWindows&&t.preserveMultipleSlashes===this.preserveMultipleSlashes&&t.normalize===this.#r?t:void 0}#_(e){let{isWindows:t,preserveMultipleSlashes:n}=this,r=this.#T(t?e.split(`\\`).join(`/`):e),i=this.#r;return i&&(r=r.map(e=>e.normalize(i))),H={f:e,isWindows:t,preserveMultipleSlashes:n,normalize:i,parts:r},H}#v(e){let t=[...e],n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let e=1;e<t.length-1;e++){let r=t[e];e===1&&r===``&&t[0]===``||r!==`.`&&r!==``||(n=!0,t.splice(e,1),e--)}t[0]===`.`&&t.length===2&&(t[1]===`.`||t[1]===``)&&(n=!0,t.pop())}let e=this.#f(t)+1,r=e;for(;(r=t.indexOf(`..`,r+1))!==-1;){let i=t[r-1];i&&i!==`.`&&i!==`..`&&i!==`**`&&(n=!0,t.splice(r-1,2),r=Math.max(r-2,e))}}while(n);return t.length===0?[``]:t}firstPhasePreProcess(e){let{braceExpandMax:t=1e5}=this.options,n=0,r=!1;do{r=!1;for(let i of e){let a=-1;for(;(a=i.indexOf(`**`,a+1))!==-1;){let o=a;for(;i[o+1]===`**`;)o++;o>a&&i.splice(a+1,o-a);let s=i[a+1],c=i[a+2],l=i[a+3];if(s!==`..`||!c||c===`.`||c===`..`||!l||l===`.`||l===`..`)continue;let u=i.length-1;if(e.length>=t||n+u>1e6)throw RangeError(`optimizationLevel 2: too many patterns from '**/..'`);r=!0,i.splice(a,1);let d=i.slice(0);d[a]=`**`,n+=u,e.push(d),a--}if(!this.preserveMultipleSlashes){for(let e=1;e<i.length-1;e++){let t=i[e];e===1&&t===``&&i[0]===``||t!==`.`&&t!==``||(r=!0,i.splice(e,1),e--)}i[0]===`.`&&i.length===2&&(i[1]===`.`||i[1]===``)&&(r=!0,i.pop())}let o=this.#f(i)+1,s=o;for(;(s=i.indexOf(`..`,s+1))!==-1;){let e=i[s-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){r=!0;let e=s===1&&i[s+1]===`**`?[`.`]:[];i.splice(s-1,2,...e),i.length===0&&i.push(``),s=Math.max(s-2,o)}}}}while(r);return e}secondPhasePreProcess(e){let t=/* @__PURE__ */ new Set,n=e.filter(e=>{let n=e.join(`/`);return!t.has(n)&&(t.add(n),!0)}),r=/* @__PURE__ */ new Map;for(let e of n){let t=[];for(let n=0;n<e.length;n++)e[n]===`*`&&t.push(n);t.length&&r.set(t.join(`,`),t)}if(!r.size||n.length*r.size>1e5)return n;let{dot:i}=this.options;return n.filter(e=>{for(let n of r.values()){if(n[n.length-1]>=e.length)continue;let r=[...e],a=!0,o=!1;for(let t of n){let n=e[t];if(n!==`*`){if(!n||n===`**`||!i&&n.startsWith(`.`)){a=!1;break}r[t]=`*`,o=!0}}if(a&&o&&t.has(r.join(`/`)))return!1}return!0})}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}#y(e,t,n,r){let i=0,a=0,o=this.isWindows?q(t):-1,s=o===-1?-1:q(n);if(s!==-1){let e=n[s],r=n[s+1];typeof e!=`string`||typeof r!=`string`?(i=o,a=s):t[o].toLowerCase()===e.toLowerCase()&&t[o+1].toLowerCase()===r.toLowerCase()&&(i=o+2,a=s+2)}else if(this.isWindows){let t=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!t&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),s=!o&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),c=r?3:t?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[t,r]=[e[c],n[l]];t.toLowerCase()===r.toLowerCase()&&(a=l+1,i=c+1)}}return e=t,n.includes(z)?this.#b(e,n,r,i,a):this.#C(e,n,r,i,a)}#b(e,t,n,r,i){let{head:a,body:o,tail:s,segments:c}=this.#x(t,n,i);if(a.length){let t=r+a.length;if(!this.#C(e,a,n,r,0,t))return!1;r+=a.length,i+=a.length}let l=0;if(s.length){if(s.length+r>e.length)return!1;let t=e.length-s.length;if(this.#C(e,s,n,t,0))l=s.length;else{if(e[e.length-1]!==``||r+s.length===e.length||(t--,!this.#C(e,s,n,t,0)))return!1;l=s.length+1}}if(!o.length){let t=!!l;for(let n=r;n<e.length-l;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}return!!this.#S(e,c,e.length-l,r,0,n,0,!!l,/* @__PURE__ */ new Set)}#x(e,t,n){let r=this.#u.get(e);r||(r=[],this.#u.set(e,r));let i=n*2+ +!!t,a=r[i];if(a)return a;let o=e.indexOf(z,n),s=e.lastIndexOf(z),c=e.slice(n,o),l=e.slice(o+1,t?void 0:s),u=t?[]:e.slice(s+1),d=[[[],0]],f=d[0],p=0,m=[0];for(let e of l)e===z?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);d.forEach((e,t)=>{e[1]=p-m[t]});let h={head:c,body:l,tail:u,segments:d};return r[i]=h,h}#S(e,t,n,r,i,a,o,s,c){let l=t[i];if(!l){if(a)return r>=n||r===n-1&&e[r]===``;for(let t=r;t<n;t++){s=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return s}let[u,d]=l,f=a?n:n-d;for(;r<=f;){let l=i*(e.length+1)+r;if(c.has(l))return!1;if(c.add(l),this.#C(e,u,a,r,0,r+u.length)&&o<this.maxGlobstarRecursion){let l=this.#S(e,t,n,r+u.length,i+1,a,o+1,s,c);if(l!==!1)return l}if(r===f)break;let d=e[r];if(d===`.`||d===`..`||!this.options.dot&&d.startsWith(`.`))return!1;r++}return a||null}#C(e,t,n,r,i,a=e.length){let o,s,c,l;for(o=r,s=i,l=Math.min(a,e.length),c=t.length;o<l&&s<c;o++,s++){let n=t[s],r=e[o];
|
|
31
|
+
/* c8 ignore stop */
|
|
32
|
+
if(n===!1||n===z||!U(n,r))return!1}if(o===l&&s===c)return!0;if(o===l)return n;if(s===c)return o===l-1&&e[o]===``;throw Error(`wtf?`)
|
|
33
|
+
/* c8 ignore stop */
|
|
34
|
+
}braceExpand(){return V(this.pattern,this.options)}#w(){let{pattern:e}=this;if(this.options.nobrace)return this.braceExpand();let t=57344;for(;e.includes(String.fromCharCode(t));)if(++t>63743)return this.braceExpand();let n=String.fromCharCode(t),r=!1,i=e.replace(Ut,(e,t,i)=>{let a=Number(t),o=Number(i);return!Number.isSafeInteger(a)||!Number.isSafeInteger(o)||Math.abs(a-o)+1<100?e:(r=!0,`${n}${t}..${i}${n}`)});if(!r)return this.braceExpand();let a=V(i,this.options);for(let e of a)for(let t of e.split(`/`)){let e=t.indexOf(`[`);if(e!==-1&&e<t.lastIndexOf(n))return this.braceExpand()}return this.#l=n,a}parse(e){I(e);let t=this.options;if(e===`**`)return z;if(e===``)return``;let{nocase:n,nocaseMagicOnly:r,noext:i=!1,dot:a,normalize:o}=t,s=this.#l,c=s&&e.includes(s)?void 0:Kt(e,i);if(c!==void 0&&(!n||r||e.toUpperCase()===e.toLowerCase()))return this.#d(c);if(this.#c)return Z;let l=this.#s.get(e);return l||(l=new Lt(e,{nocase:n,noext:i,dot:a,normalize:o,...s&&{rangeMark:s}}),this.#s.set(e,l)),l}#T(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options,r=this.#g(e);if(!r){if(!t&&!this.#r&&(this.#e||this.#t)&&Jt!==e){Jt=e;let t=this.#p(e);if(t===`no`)return!n.flipNegate&&this.negate;if(t===`yes`)return n.flipNegate?!0:!this.negate}r=this.#_(e)}let i=r.parts,a=this.#n?r.resolved??=this.#v(i):i,o=this.set,s=i[i.length-1];if(!s)for(let e=i.length-2;!s&&e>=0;e--)s=i[e];for(let e=0;e<o.length;e++){let r=o[e],c=t?void 0:this.#a[e];if(c===`base`?U(r[0],s):c?this.#m(a,r,c):n.matchBase&&r.length===1?this.#y([s],[s],r,t):this.#y(i,a,r,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return L.defaults(e).Minimatch}};L.Minimatch=Q,L.escape=Rt,L.unescape=zt;function $(e){let t=e.replace(/\\/g,`/`),n=y.posix.normalize(t);return n.endsWith(`/`)?n.slice(0,-1):n}function Qt(e,t){if(t===`.`)return e;let n=`${t}/`;if(!e.startsWith(n))throw Error(`Expected migrations pattern ${JSON.stringify(e)} to start with ${JSON.stringify(n)}`);return e.slice(n.length)}function $t(e){return`"${e.replace(/"/g,`""`)}"`}function en(e){return`CREATE TABLE IF NOT EXISTS ${$t(e)}(
|
|
35
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
36
|
+
name TEXT UNIQUE,
|
|
37
|
+
applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
|
|
38
|
+
);`}function tn(e){return`SELECT *
|
|
39
|
+
FROM ${$t(e)}
|
|
40
|
+
ORDER BY id`}function nn(e){if(e.pattern!==void 0&&e.dir===void 0)throw Error(`You have set --pattern "${e.pattern}" but have not set --dir.\n\nWhen --pattern is set, --dir must also be set, and --pattern must start with "<dir>/".`);let t=$(e.dir??`./migrations`),n=$(`${t}/*.sql`),r;if(e.pattern===void 0)r=n;else{r=$(e.pattern);try{Qt(r,t)}catch{throw Error(`--pattern "${e.pattern}" must start with "${t}/" to match --dir "${t}".\nEither change --pattern so it starts with "${t}/" (for example, "${n}"), or change --dir to match the start of your pattern.`)}}return{migrationsPath:y.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function rn(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=v.readdirSync(e,{withFileTypes:!0})}catch{continue}for(let o of a){let a=i===``?o.name:`${i}/${o.name}`;o.isDirectory()?t.match(a,!0)&&r.push({abs:y.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(sn)}function an(e){let t=e.split(`/`)[0]??``;return parseInt(t.split(`_`)[0]??``,10)}function on(e,t){let n=an(e),r=an(t);if(n!==r){if(Number.isFinite(n)&&Number.isFinite(r))return n-r;if(Number.isFinite(n))return-1;if(Number.isFinite(r))return 1}return e<t?-1:+(e>t)}function sn(e,t){let n=e.split(`/`),r=t.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=on(n[e]??``,r[e]??``);if(t!==0)return t}return n.length-r.length}function cn(e){let t=Qt(e.migrationsPattern,e.migrationsDir);return rn(e.migrationsPath,new Q(t,{dot:!1}))}function ln(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function un(e){let t=cn(e).map(e=>an(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function dn(e){if(rn(e.migrationsPath,new Q(`*/migration.sql`,{dot:!1})).length!==0)return $(`${e.migrationsDir}/*/migration.sql`)}function fn(e){let t=``,n,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=e[a+1];n===void 0?r?o===`\r`&&s===`
|
|
41
|
+
`?(t+=`
|
|
42
|
+
`,a++,r=!1):(t+=o,r=o!==`
|
|
43
|
+
`):i?o===`\r`&&s===`
|
|
44
|
+
`?(t+=`
|
|
45
|
+
`,a++):(t+=o,o===`*`&&s===`/`&&(t+=s,a++,i=!1)):o===`-`&&s===`-`?(t+=`--`,a++,r=!0):o===`/`&&s===`*`?(t+=`/*`,a++,i=!0):o===`'`||o===`"`||o==="`"?(t+=o,n=o):o===`[`?(t+=o,n=`]`):o===`\r`&&s===`
|
|
46
|
+
`?(t+=`
|
|
47
|
+
`,a++):t+=o:(t+=o,o===n&&(s===n?(t+=s,a++):n=void 0))}return t}function pn({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${v.readFileSync(y.join(e,t),`utf8`)}
|
|
48
|
+
INSERT INTO ${$t(n)} (name)
|
|
49
|
+
values ('${t.replace(/'/g,`''`)}');`}function mn(e){return e.option(`dir`,{type:`string`,description:`Directory containing migration files (default: ./migrations)`}).option(`pattern`,{type:`string`,description:`Glob for discovering migration files under --dir. Defaults to "<dir>/*.sql"; Drizzle's nested layout uses "<dir>/*/migration.sql"`})}function hn(e){return mn(e).option(`table`,{type:`string`,description:`Table recording applied migrations`,default:`d1_migrations`})}async function gn(e,t,n,r,i,a=!1){return d(i,async()=>{let i={account_id:t,database_id:n,body:{sql:fn(r)}};return a?((await e.send(b,i))?.result??[]).map(e=>{let t=e.results?.columns??[],n=e.results?.rows??[];return{...e,results:n.map(e=>Object.fromEntries(t.map((t,n)=>[t,e[n]])))}}):(await e.send(Ce,i))?.result??[]})}async function _n(e){if(!_(e.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(e.database)}. Database names and binding names are not accepted.`);let n=nn({dir:e.dir,pattern:e.pattern,table:e.table});if(!v.existsSync(n.migrationsPath))throw Error(`No migrations directory at ${n.migrationsPath}.`+(e.dir===void 0?` Pass --dir to point at one.`:``));return{client:await t(e),accountId:e.local?l:await c(),databaseId:e.database,config:n,local:e.local===!0}}async function vn(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await gn(t,n,r,en(i.migrationsTableName),`Preparing`,e.local);let a=(await gn(t,n,r,tn(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=cn(i);if(o.length===0){let e=dn(i);e!==void 0&&process.stderr.write(`No files matched --pattern "${i.migrationsPattern}", but "${e}" does match. If an ORM such as drizzle manages your migrations, pass --pattern "${e}".\n`)}return{applied:a,all:o,unapplied:ln(o,a)}}function yn(e){return hn(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const bn={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:yn,handler:async e=>{let t=await _n(e),n=(await vn(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0)u([],{successLabel:`No migrations to apply`,quiet:e.quiet});else if(await g(`About to apply ${n.length} migration(s)\nYour database may not be available to serve requests during the migration, continue?`)){for(let e of n){let n=pn({migrationsPath:t.config.migrationsPath,migrationName:e.name,migrationsTableName:t.config.migrationsTableName}),r=!0,i=[];try{let i=await gn(t.client,t.accountId,t.databaseId,n,`Applying ${e.name}`,t.local);for(let e of i)e.success||(r=!1)}catch(e){r=!1,i=[e instanceof Error?e.message:String(e)]}if(e.status=r?`✅`:`❌`,i.length>0)throw Error(i.join(`
|
|
50
|
+
`))}u(n,{quiet:e.quiet})}}};function xn(e){return mn(e.positional(`message`,{type:`string`,description:`Describes what the migration does`,demandOption:!0}))}const Sn={command:`create <message>`,describe:`Create a new empty D1 migration file`,builder:xn,handler:async e=>{if(e.local)throw Error("--local is not supported with `cf d1 migrations create`. This command only creates a migration file on your local filesystem, so you do not need --local.");let t=nn({dir:e.dir,pattern:e.pattern}),n=Cn(un(t),4),r=e.message.replaceAll(` `,`_`);if(/[\\/]/.test(r))throw Error(`The migration name ${JSON.stringify(e.message)} contains a path separator ("/" or "\\"). Remove it and try again.`);if(/[:*?"<>|]/.test(r))throw Error(`The migration name ${JSON.stringify(e.message)} contains a character that cannot be used in a file name (: * ? " < > |). Remove it and try again.`);let i=`${n}_${r}.sql`,a=$(`${t.migrationsDir}/${i}`);if(!new Q(t.migrationsPattern,{dot:!1}).match(a))throw Error(`Would create "${a}", but --pattern "${t.migrationsPattern}" would not match it, so \`cf d1 migrations apply\` would skip it.\n\`cf d1 migrations create\` only writes top-level files inside --dir. If you are using an ORM like Drizzle, use \`drizzle-kit generate\` instead — it writes the nested layout your pattern expects.`);if(!v.existsSync(t.migrationsPath)){if(!await g(`No migrations folder found.\nOk to create ${t.migrationsPath}?`))throw Error(`No migrations folder present at ${t.migrationsPath}.`);v.mkdirSync(t.migrationsPath,{recursive:!0})}let o=y.join(t.migrationsPath,i);v.writeFileSync(o,`-- Migration number: ${n} \t ${(/* @__PURE__ */ new Date()).toISOString()}\n`),u({name:i,path:o},{successLabel:`Created ${i}`,quiet:e.quiet})}};function Cn(e,t){let n=e.toString();for(;n.length<t;)n=`0`+n;return n}function wn(e){return hn(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const Tn={command:`list <database>`,describe:`View a list of unapplied migration files`,builder:wn,handler:async e=>{let{unapplied:t}=await vn(await _n(e));u(t.map(e=>({Name:e})),{quiet:e.quiet})}},En={command:`migrations`,describe:`Create, list, and apply D1 database migrations`,builder:e=>e.command(f(bn,{command:`d1 migrations apply`,classification:{safeFlags:[]}})).command(f(Sn,{command:`d1 migrations create`,classification:{safeFlags:[]}})).command(f(Tn,{command:`d1 migrations list`,classification:{safeFlags:[]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`d1`,describe:`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,builder:e=>e.command(re).command(oe).command(le).command(fe).command(Se).command(Te).command(De).command(Le).command(ye).command(ee(En,`preview`)).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Dn as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./package-
|
|
2
|
+
import{t as e}from"./package-oNVeacC9.mjs";import{createRequire as t}from"node:module";import{existsSync as n,readFileSync as r,realpathSync as i}from"node:fs";import{dirname as a,resolve as o}from"node:path";import{fileURLToPath as s}from"node:url";import{constants as c}from"node:os";import{spawn as l}from"node:child_process";const u=`CF_DELEGATION`,d=`CF_DELEGATING_CLI_VERSION`,f=`CF_DELEGATION_PID`;function p(e){if(e.env.CF_DELEGATION||b(e.ownPackageJsonPath))return null;let i;try{i=t(o(e.cwd,`package.json`)).resolve(`cf/package.json`)}catch{return null}if(e.ownPackageJsonPath&&y(i,e.ownPackageJsonPath))return null;let s;try{s=JSON.parse(r(i,`utf-8`))}catch{return null}let c=v(s.bin);if(!c)return null;let l=o(a(i),c);return n(l)?{packageJsonPath:i,binPath:l,version:typeof s.version==`string`?s.version:`unknown`}:null}async function m(e={}){let t=e.cwd??process.cwd(),n=e.argv??process.argv.slice(2),r=e.env??process.env,i=p({cwd:t,ownPackageJsonPath:e.ownPackageJsonPath===void 0?S():e.ownPackageJsonPath,env:r});return i?{delegated:!0,exitCode:await _(i.binPath,n,r)}:{delegated:!1}}async function h(){let e=process.argv.slice(2);return g(e)?{delegated:!1}:m({argv:e})}function g(e){return e.find(e=>!e.startsWith(`-`))===`complete`}function _(t,n,r){return new Promise((i,a)=>{let o=l(process.execPath,[t,...n],{stdio:[`inherit`,`inherit`,`inherit`,`ipc`],env:{...r,[u]:`1`,[d]:e,[f]:String(process.pid)}});o.on(`message`,e=>{process.send&&process.send(e)});let s=e=>()=>{o.kill(e)},p=s(`SIGINT`),m=s(`SIGTERM`);process.on(`SIGINT`,p),process.on(`SIGTERM`,m);let h=()=>{process.off(`SIGINT`,p),process.off(`SIGTERM`,m)};o.once(`exit`,(e,t)=>{h(),i(e===null?t?128+(c.signals[t]??1):0:e)}),o.once(`error`,e=>{h(),a(e)})})}function v(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=t.cf;if(typeof n==`string`)return n;for(let e of Object.values(t))if(typeof e==`string`)return e}return null}function y(e,t){try{return i(e)===i(t)}catch{return o(e)===o(t)}}function b(e){return e?e.split(/[\\/]/).some(e=>e===`_npx`||e===`dlx`||e.startsWith(`dlx-`)):!1}function x(){return b(S())}function S(){let e=a(s(import.meta.url));for(;;){let t=o(e,`package.json`);if(n(t))return t;let r=a(e);if(r===e)return null;e=r}}export{h as a,x as i,d as n,m as o,u as r,p as s,f as t};
|
package/dist/delegate.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{t as DELEGATING_PID_ENV,n as DELEGATING_VERSION_ENV,r as DELEGATION_SENTINEL,i as isEphemeralExecRun,a as maybeDelegateFromProcess,o as maybeDelegateToLocalInstall,s as resolveDelegateTarget}from"./delegate-
|
|
2
|
+
export{t as DELEGATING_PID_ENV,n as DELEGATING_VERSION_ENV,r as DELEGATION_SENTINEL,i as isEphemeralExecRun,a as maybeDelegateFromProcess,o as maybeDelegateToLocalInstall,s as resolveDelegateTarget}from"./delegate-livNdiwK.mjs";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./log-Brx-wjJW.mjs";import{n as t,t as n}from"./shared-D_2KLpP3.mjs";import{n as r,t as i}from"./static-assets-DGDoaJf1.mjs";function a(e){return t(e).positional(`directory`,r).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`force`,{type:`boolean`,alias:`f`,description:`Allow upload in CI despite conflicting remote Worker changes`,default:!1}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const o={command:`deploy [directory]`,describe:`Deploy a Worker, static site, or full-stack application to Cloudflare`,builder:a,handler:async t=>{t.force&&!t[`dry-run`]&&e.warn(`Using --force may overwrite conflicting remote Worker changes.`);let r=await i(t,{isPreview:!1});await n(r?{...t,prebuilt:!0}:t,{command:`Deploy`})}};export{o as default};
|