@stacksjs/ts-cloud 0.16.39 → 0.16.40

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.
Files changed (203) hide show
  1. package/dist/aws/index.js +1 -1
  2. package/dist/bin/chunk-0716rh6x.js +1 -0
  3. package/dist/bin/{chunk-dnmb3sr0.js → chunk-0scywedn.js} +1 -1
  4. package/dist/bin/{chunk-48nz63ab.js → chunk-1dqn0y04.js} +3 -3
  5. package/dist/bin/{chunk-q8hp4dfy.js → chunk-1jwmkbzx.js} +94 -94
  6. package/dist/bin/{chunk-4bp4k1x2.js → chunk-22x7vxxw.js} +2 -2
  7. package/dist/bin/{chunk-r0yapyqc.js → chunk-35x7z78g.js} +1 -1
  8. package/dist/bin/chunk-459waehf.js +1 -0
  9. package/dist/bin/chunk-45a8yv3j.js +6 -0
  10. package/dist/bin/{chunk-cqhtnsby.js → chunk-4g1z81pt.js} +5 -5
  11. package/dist/bin/chunk-4y8zhe38.js +1 -0
  12. package/dist/bin/{chunk-55cckkb2.js → chunk-4yym8xm4.js} +5 -5
  13. package/dist/bin/{chunk-ygsdntxq.js → chunk-5k3npcm6.js} +5 -5
  14. package/dist/bin/chunk-5khcwxhn.js +1 -0
  15. package/dist/bin/{chunk-zmp0mksb.js → chunk-5nmt4s5w.js} +2 -2
  16. package/dist/bin/{chunk-8zn63v9h.js → chunk-5wx26yjy.js} +3 -3
  17. package/dist/bin/chunk-68tgx5j2.js +1 -0
  18. package/dist/bin/chunk-7453cepa.js +1 -0
  19. package/dist/bin/{chunk-0ynfqf9t.js → chunk-7593hjcq.js} +1 -1
  20. package/dist/bin/{chunk-wga7gj0h.js → chunk-7p2va3nj.js} +1 -1
  21. package/dist/bin/{chunk-hjq05rxh.js → chunk-8fxksvw4.js} +5 -5
  22. package/dist/bin/{chunk-sqmays54.js → chunk-9eqpnanr.js} +1 -1
  23. package/dist/bin/{chunk-0c1fv0xt.js → chunk-9vszh4dj.js} +5 -5
  24. package/dist/bin/chunk-az504aqf.js +1 -0
  25. package/dist/bin/{chunk-5wqjqh6c.js → chunk-b2kdxqd5.js} +23 -23
  26. package/dist/bin/chunk-bb08ms5q.js +1 -0
  27. package/dist/bin/{chunk-pyr0dc6j.js → chunk-bmj1d9xc.js} +63 -63
  28. package/dist/bin/chunk-cxcgqqdb.js +1 -0
  29. package/dist/bin/{chunk-dmwfnbg0.js → chunk-dkf2kcsc.js} +6 -6
  30. package/dist/bin/chunk-ecd4swb7.js +2 -0
  31. package/dist/bin/{chunk-d8x60kvn.js → chunk-f2q239cy.js} +2 -2
  32. package/dist/bin/{chunk-gc8p1tdr.js → chunk-f64jvh96.js} +2 -2
  33. package/dist/bin/{chunk-c7z8et78.js → chunk-fkzp9sg5.js} +1 -1
  34. package/dist/bin/chunk-h0s69e9p.js +1 -0
  35. package/dist/bin/{chunk-85k5gvnc.js → chunk-jmkfx9th.js} +3 -3
  36. package/dist/bin/chunk-jrztbsnb.js +1 -0
  37. package/dist/bin/chunk-js888a3w.js +1 -0
  38. package/dist/bin/chunk-jv9qp13h.js +1 -0
  39. package/dist/bin/chunk-jxfgkhkc.js +1 -0
  40. package/dist/bin/chunk-k2mdcb66.js +1 -0
  41. package/dist/bin/{chunk-mbr9j2fw.js → chunk-k343q24p.js} +6 -6
  42. package/dist/bin/chunk-k9ate69x.js +1 -0
  43. package/dist/bin/chunk-kbwm0sqv.js +2 -0
  44. package/dist/bin/chunk-kva8aybv.js +1 -0
  45. package/dist/bin/{chunk-x0ywfbk5.js → chunk-kzpzkdpd.js} +1 -1
  46. package/dist/bin/chunk-m8p7mw67.js +1 -0
  47. package/dist/bin/{chunk-6r5mehaj.js → chunk-mex7tac5.js} +4 -4
  48. package/dist/bin/chunk-mh3rgn0e.js +1 -0
  49. package/dist/bin/{chunk-07qwk0sj.js → chunk-n7yefy09.js} +5 -5
  50. package/dist/bin/{chunk-7rpj0qhb.js → chunk-nj9x0tb8.js} +2 -2
  51. package/dist/bin/{chunk-tt3m3fda.js → chunk-nmqjmx30.js} +22 -22
  52. package/dist/bin/{chunk-ehnevjt4.js → chunk-nqn983fx.js} +99 -99
  53. package/dist/bin/chunk-p9baztvr.js +1 -0
  54. package/dist/bin/{chunk-aykdp1wv.js → chunk-pj5svs6q.js} +2 -2
  55. package/dist/bin/{chunk-qxg95ndf.js → chunk-q40k9jvk.js} +2 -2
  56. package/dist/bin/chunk-qgqgdkg0.js +1 -0
  57. package/dist/bin/chunk-s77kny9g.js +1 -0
  58. package/dist/bin/{chunk-4h60xsat.js → chunk-sfzdr2b3.js} +3 -3
  59. package/dist/bin/chunk-t5kqyr8m.js +1 -0
  60. package/dist/bin/{chunk-e0kapeev.js → chunk-v9wf266f.js} +14 -14
  61. package/dist/bin/chunk-w232tc20.js +1 -0
  62. package/dist/bin/chunk-w9rx90s2.js +1 -0
  63. package/dist/bin/{chunk-w6yx9bhb.js → chunk-zvbc92pc.js} +1 -1
  64. package/dist/bin/cli.js +173 -173
  65. package/dist/bin/dashboard-server.js +1 -1
  66. package/dist/{chunk-yrcv3hrj.js → chunk-0evxayn1.js} +7 -7
  67. package/dist/chunk-1yhrkahz.js +1 -0
  68. package/dist/chunk-27y037yh.js +1 -0
  69. package/dist/chunk-2ns1w1fe.js +1 -0
  70. package/dist/chunk-2vrv31sk.js +37 -0
  71. package/dist/{chunk-n1r9313b.js → chunk-3s8dtcz8.js} +2 -2
  72. package/dist/chunk-3w7q4sjs.js +2 -0
  73. package/dist/{chunk-tbn385ak.js → chunk-5n1y5ehd.js} +94 -94
  74. package/dist/chunk-74yycwrd.js +1 -0
  75. package/dist/{chunk-t52wetq8.js → chunk-7eaech9q.js} +1 -1
  76. package/dist/{chunk-2n4ktft4.js → chunk-97gre81w.js} +1 -1
  77. package/dist/{chunk-zvyrpmvd.js → chunk-9e4afej1.js} +1 -1
  78. package/dist/{chunk-3cyszqzh.js → chunk-9mv07nz0.js} +2 -2
  79. package/dist/{chunk-ffjgw5m6.js → chunk-bez9ytaz.js} +108 -108
  80. package/dist/{chunk-kpjhfgbh.js → chunk-bfbahave.js} +4 -4
  81. package/dist/{chunk-xr7ew64s.js → chunk-bwtxb2hf.js} +3 -3
  82. package/dist/{chunk-dg834141.js → chunk-cgcthvq9.js} +5 -5
  83. package/dist/chunk-e9z4gzmg.js +1 -0
  84. package/dist/{chunk-ffba3270.js → chunk-jbtnyhrh.js} +2 -2
  85. package/dist/{chunk-gcqq9m4b.js → chunk-kexwq2h0.js} +4 -4
  86. package/dist/{chunk-p4rknh9f.js → chunk-mxprxjd4.js} +1 -1
  87. package/dist/{chunk-c45ay9fx.js → chunk-my61jkg1.js} +5 -5
  88. package/dist/{chunk-kkeb1dk1.js → chunk-qbbap3bt.js} +1 -1
  89. package/dist/{chunk-jsnhb1p4.js → chunk-qg03hfb6.js} +19 -19
  90. package/dist/{chunk-bx3jmgd0.js → chunk-r3m1fjd4.js} +2 -2
  91. package/dist/{chunk-nzmangkw.js → chunk-v6hysd5c.js} +5 -5
  92. package/dist/{chunk-kyn6a4zf.js → chunk-varjr6np.js} +1 -1
  93. package/dist/chunk-vd2jqt9w.js +1 -0
  94. package/dist/{chunk-n8g8t8hf.js → chunk-w78e5n94.js} +3 -3
  95. package/dist/{chunk-q08s698e.js → chunk-yjh3y68t.js} +71 -71
  96. package/dist/{chunk-0rvnerbw.js → chunk-ype3pqh5.js} +5 -5
  97. package/dist/{chunk-j1aq97br.js → chunk-ysx5m6cs.js} +2 -2
  98. package/dist/{chunk-qhtgfjhd.js → chunk-yt6m703r.js} +23 -23
  99. package/dist/deploy/index.js +1 -1
  100. package/dist/dns/index.js +1 -1
  101. package/dist/drivers/index.js +1 -1
  102. package/dist/index.d.ts +1 -0
  103. package/dist/index.js +42 -42
  104. package/dist/operations/index.js +1 -1
  105. package/dist/protection/index.js +1 -1
  106. package/dist/r2/index.d.ts +8 -0
  107. package/dist/r2/provider.d.ts +303 -0
  108. package/dist/r2/provider.test.d.ts +1 -0
  109. package/dist/r2/reconcile.d.ts +98 -0
  110. package/dist/r2/reconcile.test.d.ts +1 -0
  111. package/dist/r2/test-fetch.d.ts +32 -0
  112. package/dist/spend/index.js +1 -1
  113. package/dist/ui/404.html +1 -1
  114. package/dist/ui/accept-invitation.html +1 -1
  115. package/dist/ui/access-denied.html +1 -1
  116. package/dist/ui/account/automation.html +6 -6
  117. package/dist/ui/account/security.html +2 -2
  118. package/dist/ui/applications/compose.html +6 -6
  119. package/dist/ui/applications/new.html +2 -2
  120. package/dist/ui/data/backups.html +6 -6
  121. package/dist/ui/data/services.html +6 -6
  122. package/dist/ui/data/volumes.html +6 -6
  123. package/dist/ui/index.html +6 -6
  124. package/dist/ui/infrastructure/topology.html +5 -5
  125. package/dist/ui/integrations.html +2 -2
  126. package/dist/ui/operations/alerts.html +6 -6
  127. package/dist/ui/operations/configuration.html +6 -6
  128. package/dist/ui/operations/jobs.html +6 -6
  129. package/dist/ui/operations/maintenance.html +6 -6
  130. package/dist/ui/operations/observability.html +6 -6
  131. package/dist/ui/operations/previews.html +6 -6
  132. package/dist/ui/operations/queue.html +6 -6
  133. package/dist/ui/operations/regions.html +6 -6
  134. package/dist/ui/operations/releases.html +6 -6
  135. package/dist/ui/operations/spend.html +6 -6
  136. package/dist/ui/operations/workloads.html +6 -6
  137. package/dist/ui/security.html +2 -2
  138. package/dist/ui/server/actions.html +6 -6
  139. package/dist/ui/server/activity.html +2 -2
  140. package/dist/ui/server/capacity.html +6 -6
  141. package/dist/ui/server/database.html +6 -6
  142. package/dist/ui/server/deployments.html +6 -6
  143. package/dist/ui/server/diagnostics.html +2 -2
  144. package/dist/ui/server/firewall.html +5 -5
  145. package/dist/ui/server/fleet.html +6 -6
  146. package/dist/ui/server/logs.html +6 -6
  147. package/dist/ui/server/metrics.html +6 -6
  148. package/dist/ui/server/security.html +2 -2
  149. package/dist/ui/server/services.html +1 -1
  150. package/dist/ui/server/sites.html +6 -6
  151. package/dist/ui/server/ssh-keys.html +6 -6
  152. package/dist/ui/server/team.html +6 -6
  153. package/dist/ui/server/terminal.html +2 -2
  154. package/dist/ui/serverless/alarms.html +6 -6
  155. package/dist/ui/serverless/assets.html +2 -2
  156. package/dist/ui/serverless/cost.html +2 -2
  157. package/dist/ui/serverless/data.html +6 -6
  158. package/dist/ui/serverless/deployments.html +2 -2
  159. package/dist/ui/serverless/firewall.html +1 -1
  160. package/dist/ui/serverless/functions.html +6 -6
  161. package/dist/ui/serverless/logs.html +6 -6
  162. package/dist/ui/serverless/metrics.html +2 -2
  163. package/dist/ui/serverless/queues.html +6 -6
  164. package/dist/ui/serverless/secrets.html +6 -6
  165. package/dist/ui/serverless/traces.html +6 -6
  166. package/dist/ui/serverless.html +6 -6
  167. package/package.json +3 -3
  168. package/dist/bin/chunk-0c5vn8rp.js +0 -1
  169. package/dist/bin/chunk-1wf1s8db.js +0 -1
  170. package/dist/bin/chunk-4dtrry0t.js +0 -1
  171. package/dist/bin/chunk-6kcxf3b2.js +0 -1
  172. package/dist/bin/chunk-6ksbfg6t.js +0 -1
  173. package/dist/bin/chunk-7rkg1yph.js +0 -1
  174. package/dist/bin/chunk-989j6ezd.js +0 -1
  175. package/dist/bin/chunk-bgdvhp6m.js +0 -1
  176. package/dist/bin/chunk-cvc9bxd4.js +0 -2
  177. package/dist/bin/chunk-czzrfhn7.js +0 -1
  178. package/dist/bin/chunk-d5arnf2f.js +0 -1
  179. package/dist/bin/chunk-e06m9m6z.js +0 -1
  180. package/dist/bin/chunk-e51ajfyr.js +0 -1
  181. package/dist/bin/chunk-e6mfcw0v.js +0 -6
  182. package/dist/bin/chunk-fh5bjm3d.js +0 -1
  183. package/dist/bin/chunk-fw6hbyeg.js +0 -1
  184. package/dist/bin/chunk-h7gfd2yq.js +0 -1
  185. package/dist/bin/chunk-jxnw879g.js +0 -1
  186. package/dist/bin/chunk-k3yq569a.js +0 -1
  187. package/dist/bin/chunk-nhrwct94.js +0 -1
  188. package/dist/bin/chunk-pa4fymr0.js +0 -1
  189. package/dist/bin/chunk-s9xven24.js +0 -1
  190. package/dist/bin/chunk-w8jfw39t.js +0 -2
  191. package/dist/bin/chunk-wgv9nv0z.js +0 -1
  192. package/dist/bin/chunk-y5980ycr.js +0 -1
  193. package/dist/bin/chunk-y5ez6ba7.js +0 -1
  194. package/dist/bin/chunk-ya71t2ed.js +0 -1
  195. package/dist/bin/chunk-zb1nh252.js +0 -1
  196. package/dist/chunk-1ty76ybd.js +0 -1
  197. package/dist/chunk-2mypcz4a.js +0 -1
  198. package/dist/chunk-5vk7nss8.js +0 -2
  199. package/dist/chunk-fe5sbczg.js +0 -1
  200. package/dist/chunk-gtc1gvfj.js +0 -1
  201. package/dist/chunk-j5t1amn0.js +0 -1
  202. package/dist/chunk-s20830hg.js +0 -1
  203. package/dist/chunk-v83qx041.js +0 -37
@@ -1 +1 @@
1
- import{Dh,Ph,Nh,Xg,Yg,Zg,kh,ep,tp,Bh,xh,rp,Oh,_h,Vc,np,Lh,$h,ip,Mh,Fh,Uh,Qh,Hh,Gh,Vh,Ai,qc,sp,op,ap,cp,dp,lp,up,gp,pp,mp,fp,qh,jh,zh,Kh,Wh,Jh,Xh}from"../chunk-jsnhb1p4.js";import"../chunk-kpjhfgbh.js";import"../chunk-ffba3270.js";import"../chunk-tbn385ak.js";import"../chunk-c45ay9fx.js";export{Yg as ENVIRONMENT_LABEL,Xg as PROJECT_LABEL,Zg as ROLE_LABEL,$h as applyPlan,Hh as attachConflicts,Gh as attachIsViable,Qh as attachPreconditions,Wh as buildCertificatePackScript,jh as buildCertificateStateScript,Jh as buildCertificateUnpackScript,pp as buildDrainSourceScript,Dh as buildDrainedSiteScanScript,gp as buildHealthGateScript,sp as buildPauseWorkersScript,dp as buildRestoreScript,Fh as buildSetHostnameScript,cp as buildSnapshotScript,mp as buildSourceStateScript,lp as buildTargetStateScript,op as buildWorkersStateScript,Kh as certificatesMatch,Vh as formatAttachPlan,Nh as formatDrainedSiteRefusal,Oh as formatInventory,Lh as formatPlan,zh as parseCertificateState,Ph as parseDrainedSites,fp as parseSourceDrained,up as parseTargetReady,ap as parseWorkersPaused,Vc as pendingSteps,np as planIsDestructive,Mh as planServerRename,Xh as planSiteMove,Bh as probeHostRoutes,xh as reconcile,Uh as resolveAttachTarget,_h as resolvePlan,ep as routesFromFragments,Ai as siteMoveArchivePath,qh as siteMoveCertArchivePath,qc as siteUnitGlob,tp as tenantsOf,kh as toInventoryServer,rp as unaccountedSites,ip as validateServerName};
1
+ import{Nh,kh,Bh,Zg,ep,tp,xh,rp,np,Oh,_h,ip,Lh,$h,jc,sp,Mh,Fh,op,Uh,Qh,Hh,Gh,Vh,qh,jh,Ii,zc,ap,cp,dp,lp,up,gp,pp,mp,fp,hp,Ap,zh,Kh,Wh,Jh,Xh,Yh,Zh}from"../chunk-qg03hfb6.js";import"../chunk-bfbahave.js";import"../chunk-jbtnyhrh.js";import"../chunk-5n1y5ehd.js";import"../chunk-my61jkg1.js";export{ep as ENVIRONMENT_LABEL,Zg as PROJECT_LABEL,tp as ROLE_LABEL,Fh as applyPlan,Vh as attachConflicts,qh as attachIsViable,Gh as attachPreconditions,Xh as buildCertificatePackScript,Kh as buildCertificateStateScript,Yh as buildCertificateUnpackScript,fp as buildDrainSourceScript,Nh as buildDrainedSiteScanScript,mp as buildHealthGateScript,ap as buildPauseWorkersScript,up as buildRestoreScript,Qh as buildSetHostnameScript,lp as buildSnapshotScript,hp as buildSourceStateScript,gp as buildTargetStateScript,cp as buildWorkersStateScript,Jh as certificatesMatch,jh as formatAttachPlan,Bh as formatDrainedSiteRefusal,Lh as formatInventory,Mh as formatPlan,Wh as parseCertificateState,kh as parseDrainedSites,Ap as parseSourceDrained,pp as parseTargetReady,dp as parseWorkersPaused,jc as pendingSteps,sp as planIsDestructive,Uh as planServerRename,Zh as planSiteMove,Oh as probeHostRoutes,_h as reconcile,Hh as resolveAttachTarget,$h as resolvePlan,rp as routesFromFragments,Ii as siteMoveArchivePath,zh as siteMoveCertArchivePath,zc as siteUnitGlob,np as tenantsOf,xh as toInventoryServer,ip as unaccountedSites,op as validateServerName};
@@ -1 +1 @@
1
- import{Dl,_o,Vi,qi,Lo,Pl,Nl,kl,ji,$o,Mo,Bl,xl,Fo,aS}from"../chunk-kkeb1dk1.js";import{Z,mi,js,Hc,fi,Kg}from"../chunk-v83qx041.js";import{Dd,qr,Pd,Nd,kd,Oi,Hp,jr}from"../chunk-yrcv3hrj.js";import{Ro,Do,Po,Il,Zr,bl,Cl,Gi,No,ko}from"../chunk-tbn385ak.js";import"../chunk-c45ay9fx.js";export{Do as CHAIN_HEADER,$o as DEFAULT_ATTACK_MODE_HOURS,Dd as DEFAULT_DDOS_THRESHOLDS,Zr as DEFAULT_RECURSION_LIMITS,Ro as DEPTH_HEADER,ji as MAX_CONTROL_HOURS,kl as PROTECTION_SETTING,Mo as ProtectionControlStore,Dl as RATE_LIMIT_KEY_SEPARATOR,Lo as RateLimiter,Gi as RecursionGuard,Po as TRACE_HEADER,Fo as applyControlsToDdos,xl as applyControlsToRateLimits,jr as applyMitigationFactor,Nl as defaultRateLimitRules,Bl as describePosture,Z as escapeSecLang,Il as functionFingerprint,_o as globMatches,js as globToRegex,Cl as inspectInvocation,mi as isSafePattern,qr as isValidCidr,aS as mergeControlsIntoConfig,bl as parseChain,Hp as planMitigation,No as propagationHeaders,Pl as rateLimitHeaders,qi as rateLimitKey,ko as recursionBlockedResponse,Oi as renderDdosInstallScript,kd as renderNftablesRuleset,Nd as renderSysctlFile,Hc as renderWafConfig,fi as renderWafInstallScript,Vi as ruleMatches,Pd as sysctlHardening,Kg as wafEventTelemetry};
1
+ import{Nl,$o,zi,Ki,Mo,kl,Bl,xl,Wi,Fo,Uo,Ol,_l,Qo,dS}from"../chunk-qbbap3bt.js";import{ee,Ai,Ks,Vc,yi,Jg}from"../chunk-2vrv31sk.js";import{Nd,Kr,kd,Bd,xd,$i,Vp,Wr}from"../chunk-0evxayn1.js";import{Po,No,ko,Cl,rn,El,vl,ji,Bo,xo}from"../chunk-5n1y5ehd.js";import"../chunk-my61jkg1.js";export{No as CHAIN_HEADER,Fo as DEFAULT_ATTACK_MODE_HOURS,Nd as DEFAULT_DDOS_THRESHOLDS,rn as DEFAULT_RECURSION_LIMITS,Po as DEPTH_HEADER,Wi as MAX_CONTROL_HOURS,xl as PROTECTION_SETTING,Uo as ProtectionControlStore,Nl as RATE_LIMIT_KEY_SEPARATOR,Mo as RateLimiter,ji as RecursionGuard,ko as TRACE_HEADER,Qo as applyControlsToDdos,_l as applyControlsToRateLimits,Wr as applyMitigationFactor,Bl as defaultRateLimitRules,Ol as describePosture,ee as escapeSecLang,Cl as functionFingerprint,$o as globMatches,Ks as globToRegex,vl as inspectInvocation,Ai as isSafePattern,Kr as isValidCidr,dS as mergeControlsIntoConfig,El as parseChain,Vp as planMitigation,Bo as propagationHeaders,kl as rateLimitHeaders,Ki as rateLimitKey,xo as recursionBlockedResponse,$i as renderDdosInstallScript,xd as renderNftablesRuleset,Bd as renderSysctlFile,Vc as renderWafConfig,yi as renderWafInstallScript,zi as ruleMatches,kd as sysctlHardening,Jg as wafEventTelemetry};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Cloudflare R2: bucket management through the account API, S3 credentials
3
+ * derived from an API token, and the deploy-time reconcile for `infrastructure.r2`.
4
+ */
5
+ export type { R2ApiLifecycleRule, R2Bucket, R2BucketScope, R2CustomDomain, R2ManagedDomain, R2ProviderOptions, R2S3Credentials, } from './provider';
6
+ export { R2_NOT_ENABLED_ERROR_CODE, R2ApiError, r2Endpoint, R2NotEnabledError, R2Provider, r2S3Credentials, sameCorsRules, sameLifecycleRules, } from './provider';
7
+ export type { R2BucketSummary, R2ConfigSource, R2ReconcileSummary, ReconcileR2BucketsOptions, } from './reconcile';
8
+ export { cacheRuleParameters, domainStatus, managedRuleInSync, reconcileR2Buckets, toApiLifecycleRule, } from './reconcile';
@@ -0,0 +1,303 @@
1
+ /**
2
+ * Cloudflare R2, through Cloudflare's account REST API.
3
+ *
4
+ * R2 has two front doors and they are easy to confuse:
5
+ *
6
+ * - **The S3-compatible endpoint** (`https://{account}.r2.cloudflarestorage.com`)
7
+ * reads and writes objects. It speaks SigV4 with an access key pair, and is
8
+ * what an application uses at runtime; see {@link r2S3Credentials}.
9
+ * - **The account API** (`/accounts/{id}/r2/...`) manages the buckets
10
+ * themselves: creation, CORS, lifecycle, custom domains, the `r2.dev` URL.
11
+ * It takes the account API token directly, as a Bearer token.
12
+ *
13
+ * This module is the second one. It mirrors {@link CloudflarePagesProvider}:
14
+ * account-scoped, a thin authenticated `request`, and one method per API
15
+ * concern. The `ensure*` methods read before they write, so a deploy that runs
16
+ * them on every release only touches what actually drifted.
17
+ */
18
+ import type { R2CorsRule, R2Jurisdiction, R2LocationHint, R2MinTls } from '@ts-cloud/core';
19
+ /**
20
+ * Cloudflare's answer when the account has never turned R2 on.
21
+ *
22
+ * R2 has to be enabled once, by a human, in the dashboard (it asks for a
23
+ * payment method even on the free tier), and no API call can do it. Every R2
24
+ * endpoint then fails with this code, which reads like a permissions problem
25
+ * unless it is called out.
26
+ */
27
+ export declare const R2_NOT_ENABLED_ERROR_CODE = 10042;
28
+ type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
29
+ /** A failed call to the R2 account API, with Cloudflare's error codes kept. */
30
+ export declare class R2ApiError extends Error {
31
+ readonly status: number;
32
+ readonly errors: Array<{
33
+ code: number;
34
+ message: string;
35
+ }>;
36
+ constructor(message: string, status: number, errors?: Array<{
37
+ code: number;
38
+ message: string;
39
+ }>);
40
+ /** Whether Cloudflare reported this error code. */
41
+ hasCode(code: number): boolean;
42
+ }
43
+ /**
44
+ * R2 is not enabled on the account. Only fixable in the dashboard.
45
+ *
46
+ * Thrown in place of the raw API error so a deploy can print one sentence the
47
+ * operator can act on, rather than "Cloudflare API error: 10042".
48
+ */
49
+ export declare class R2NotEnabledError extends R2ApiError {
50
+ readonly accountId: string;
51
+ constructor(accountId: string, status: number, errors?: Array<{
52
+ code: number;
53
+ message: string;
54
+ }>);
55
+ }
56
+ export interface R2Bucket {
57
+ name: string;
58
+ creation_date?: string;
59
+ location?: R2LocationHint;
60
+ jurisdiction?: R2Jurisdiction;
61
+ storage_class?: 'Standard' | 'InfrequentAccess';
62
+ }
63
+ /** A lifecycle rule as the API stores it (nested transitions). */
64
+ export interface R2ApiLifecycleRule {
65
+ id: string;
66
+ enabled: boolean;
67
+ conditions: {
68
+ prefix: string;
69
+ };
70
+ deleteObjectsTransition?: {
71
+ condition: {
72
+ type: 'Age';
73
+ maxAge: number;
74
+ } | {
75
+ type: 'Date';
76
+ date: string;
77
+ };
78
+ };
79
+ abortMultipartUploadsTransition?: {
80
+ condition: {
81
+ type: 'Age';
82
+ maxAge: number;
83
+ };
84
+ };
85
+ storageClassTransitions?: Array<{
86
+ storageClass: 'InfrequentAccess';
87
+ condition: {
88
+ type: 'Age';
89
+ maxAge: number;
90
+ } | {
91
+ type: 'Date';
92
+ date: string;
93
+ };
94
+ }>;
95
+ }
96
+ /** A custom domain attached to a bucket, as the list endpoint returns it. */
97
+ export interface R2CustomDomain {
98
+ domain: string;
99
+ enabled: boolean;
100
+ zoneId?: string;
101
+ zoneName?: string;
102
+ minTLS?: R2MinTls;
103
+ ciphers?: string[];
104
+ status?: {
105
+ ownership?: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error' | 'unknown';
106
+ ssl?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error' | 'unknown';
107
+ };
108
+ }
109
+ /** The bucket's `*.r2.dev` URL and whether it serves. */
110
+ export interface R2ManagedDomain {
111
+ bucketId?: string;
112
+ domain: string;
113
+ enabled: boolean;
114
+ }
115
+ export interface R2ProviderOptions {
116
+ /** Account API token with `Workers R2 Storage: Edit`. */
117
+ apiToken: string;
118
+ /** Account the buckets live under. */
119
+ accountId: string;
120
+ /** Override `fetch`, for tests. */
121
+ fetch?: FetchLike;
122
+ }
123
+ /** Options shared by every bucket-scoped call. */
124
+ export interface R2BucketScope {
125
+ /**
126
+ * The bucket's jurisdiction. A bucket created in `eu` (or any non-default
127
+ * jurisdiction) does not exist as far as a request without the matching
128
+ * header is concerned: it 404s rather than erroring helpfully.
129
+ */
130
+ jurisdiction?: R2Jurisdiction;
131
+ }
132
+ /**
133
+ * Cloudflare R2 bucket management, scoped to one account.
134
+ */
135
+ export declare class R2Provider {
136
+ readonly name = "cloudflare-r2";
137
+ private readonly apiToken;
138
+ private readonly accountId;
139
+ private readonly fetchImpl;
140
+ constructor(options: R2ProviderOptions);
141
+ /**
142
+ * Make an authenticated request against the account-scoped R2 API.
143
+ *
144
+ * @param method - HTTP method
145
+ * @param endpoint - Path below `/accounts/{id}/r2`, starting with a slash
146
+ * @param body - JSON body
147
+ * @param scope - Jurisdiction header, when the bucket has one
148
+ * @returns The whole envelope, so list calls can read the cursor
149
+ * @throws {R2NotEnabledError} When R2 has never been enabled on the account
150
+ * @throws {R2ApiError} When Cloudflare reports any other failure
151
+ */
152
+ private requestEnvelope;
153
+ private request;
154
+ /** Path of one bucket, with the name escaped. */
155
+ private bucketPath;
156
+ /**
157
+ * Every bucket in the account (in the default jurisdiction, or in `scope`'s).
158
+ *
159
+ * Follows the cursor, so an account with more buckets than one page still
160
+ * answers completely.
161
+ */
162
+ listBuckets(scope?: R2BucketScope): Promise<R2Bucket[]>;
163
+ /**
164
+ * Look up a bucket by name.
165
+ *
166
+ * @returns The bucket, or `null` when it does not exist
167
+ */
168
+ getBucket(name: string, scope?: R2BucketScope): Promise<R2Bucket | null>;
169
+ /**
170
+ * Create a bucket, or return the existing one.
171
+ *
172
+ * The location hint and jurisdiction only matter at creation: R2 cannot move
173
+ * a bucket, so an existing bucket is returned as-is even if they differ.
174
+ *
175
+ * @returns The bucket, and whether this call is what created it
176
+ */
177
+ ensureBucket(name: string, options?: {
178
+ locationHint?: R2LocationHint;
179
+ jurisdiction?: R2Jurisdiction;
180
+ }): Promise<{
181
+ bucket: R2Bucket;
182
+ created: boolean;
183
+ }>;
184
+ /**
185
+ * The bucket's CORS rules. A bucket that never had a policy answers with an
186
+ * error rather than an empty list; that is reported as `[]`.
187
+ */
188
+ getCors(bucket: string, scope?: R2BucketScope): Promise<R2CorsRule[]>;
189
+ /**
190
+ * Replace the bucket's CORS rules. An empty list deletes the policy, since
191
+ * that is the only way the API expresses "no CORS".
192
+ */
193
+ putCors(bucket: string, rules: R2CorsRule[], scope?: R2BucketScope): Promise<void>;
194
+ /**
195
+ * Set CORS only when it differs from what is there.
196
+ *
197
+ * @returns Whether anything was written
198
+ */
199
+ ensureCors(bucket: string, rules: R2CorsRule[], scope?: R2BucketScope): Promise<boolean>;
200
+ /** The bucket's lifecycle rules. */
201
+ getLifecycle(bucket: string, scope?: R2BucketScope): Promise<R2ApiLifecycleRule[]>;
202
+ /** Replace the bucket's lifecycle rules wholesale. */
203
+ putLifecycle(bucket: string, rules: R2ApiLifecycleRule[], scope?: R2BucketScope): Promise<void>;
204
+ /**
205
+ * Set lifecycle rules only when they differ from what is there.
206
+ *
207
+ * @returns Whether anything was written
208
+ */
209
+ ensureLifecycle(bucket: string, rules: R2ApiLifecycleRule[], scope?: R2BucketScope): Promise<boolean>;
210
+ /** Custom domains attached to the bucket. */
211
+ listCustomDomains(bucket: string, scope?: R2BucketScope): Promise<R2CustomDomain[]>;
212
+ /**
213
+ * Attach a custom domain.
214
+ *
215
+ * Cloudflare creates the proxied DNS record for the hostname itself, and
216
+ * refuses when the hostname already has a record: that record has to go
217
+ * first. This is the raw create; {@link ensureCustomDomain} is the
218
+ * idempotent form.
219
+ */
220
+ attachCustomDomain(bucket: string, options: {
221
+ domain: string;
222
+ zoneId: string;
223
+ enabled?: boolean;
224
+ minTLS?: R2MinTls;
225
+ }, scope?: R2BucketScope): Promise<R2CustomDomain>;
226
+ /** Change an attached domain's `enabled` or `minTLS`. */
227
+ updateCustomDomain(bucket: string, domain: string, changes: {
228
+ enabled?: boolean;
229
+ minTLS?: R2MinTls;
230
+ }, scope?: R2BucketScope): Promise<R2CustomDomain>;
231
+ /**
232
+ * Attach a domain if it is missing, or bring an attached one back to enabled
233
+ * with the requested minimum TLS.
234
+ *
235
+ * @param existing - The bucket's current domains, when the caller already
236
+ * listed them (saves a request per domain)
237
+ * @returns What happened, and the domain's state afterwards
238
+ */
239
+ ensureCustomDomain(bucket: string, options: {
240
+ domain: string;
241
+ zoneId: string;
242
+ minTLS?: R2MinTls;
243
+ }, scope?: R2BucketScope, existing?: R2CustomDomain[]): Promise<{
244
+ action: 'attached' | 'updated' | 'unchanged';
245
+ domain: R2CustomDomain;
246
+ }>;
247
+ /** The bucket's `*.r2.dev` URL and whether it is serving. */
248
+ getManagedDomain(bucket: string, scope?: R2BucketScope): Promise<R2ManagedDomain>;
249
+ /**
250
+ * Turn the bucket's public `*.r2.dev` URL on or off, only writing when it
251
+ * differs.
252
+ *
253
+ * @returns Whether anything was written, and the domain's state afterwards
254
+ */
255
+ setManagedDomain(bucket: string, enabled: boolean, scope?: R2BucketScope): Promise<{
256
+ changed: boolean;
257
+ domain: R2ManagedDomain;
258
+ }>;
259
+ }
260
+ /** S3-compatible endpoint for an account's R2 buckets. */
261
+ export declare function r2Endpoint(accountId: string): string;
262
+ export interface R2S3Credentials {
263
+ accessKeyId: string;
264
+ secretAccessKey: string;
265
+ /** `https://{accountId}.r2.cloudflarestorage.com` */
266
+ endpoint: string;
267
+ /** R2 ignores the region; SigV4 still needs one, and `auto` is what R2 documents. */
268
+ region: 'auto';
269
+ }
270
+ /**
271
+ * Derive S3-compatible credentials from a Cloudflare API token.
272
+ *
273
+ * Cloudflare documents this mapping instead of issuing a separate key pair:
274
+ * the Access Key ID is the token's **id**, and the Secret Access Key is the
275
+ * SHA-256 of the token's **value**, as lowercase hex. The id is not part of
276
+ * the token string, so it has to be asked for.
277
+ *
278
+ * The token's id is read from the account-scoped verify endpoint first. That
279
+ * order matters: an account-owned token answers 401 at `/user/tokens/verify`,
280
+ * which looks exactly like a revoked token. The user endpoint is tried second
281
+ * so a user-owned token still works.
282
+ *
283
+ * The token needs R2 permissions for the derived keys to be any use; that is
284
+ * not checked here, because the S3 endpoint will say so on first use.
285
+ *
286
+ * @throws {Error} When neither verify endpoint accepts the token
287
+ */
288
+ export declare function r2S3Credentials(options: {
289
+ apiToken: string;
290
+ accountId: string;
291
+ fetch?: FetchLike;
292
+ }): Promise<R2S3Credentials>;
293
+ /**
294
+ * Do two CORS policies say the same thing?
295
+ *
296
+ * Rule order is kept (R2 uses the first rule that matches a request), but the
297
+ * values inside a rule are compared as sets. Ids are only compared when the
298
+ * desired side sets them, since the API may assign its own.
299
+ */
300
+ export declare function sameCorsRules(current: R2CorsRule[], desired: R2CorsRule[]): boolean;
301
+ /** Do two lifecycle rule lists say the same thing? Order-insensitive, keyed by id. */
302
+ export declare function sameLifecycleRules(current: R2ApiLifecycleRule[], desired: R2ApiLifecycleRule[]): boolean;
303
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Make the Cloudflare R2 buckets a config declares exist, and look the way it
3
+ * says.
4
+ *
5
+ * Runs on every deploy, so it is a reconcile rather than a create: each step
6
+ * reads first and writes only what drifted, and a bucket that is already right
7
+ * costs a handful of GETs and reports no changes. The order per bucket is the
8
+ * order things depend on each other: the bucket, then the settings that live
9
+ * on it (CORS, lifecycle, the `r2.dev` URL), then the custom domains, and last
10
+ * the cache rule that is scoped to those domains' hostnames.
11
+ *
12
+ * What is NOT done, deliberately: nothing is ever deleted. A bucket or custom
13
+ * domain dropped from config is left in place, because removing either loses
14
+ * data or takes a public URL down, and a config edit should not be able to do
15
+ * that silently.
16
+ */
17
+ import type { R2BucketConfig, R2Config, R2LifecycleRule } from '@ts-cloud/core';
18
+ import type { CloudflareRule } from '../dns/cloudflare';
19
+ import type { R2ApiLifecycleRule, R2CustomDomain } from './provider';
20
+ /** What a deploy needs to know about one bucket after the reconcile. */
21
+ export interface R2BucketSummary {
22
+ /** Bucket name. */
23
+ name: string;
24
+ /**
25
+ * Human-readable changes, e.g. `created`, `cors updated`,
26
+ * `custom domain tiles.example.com attached`. Empty when already in sync.
27
+ * In a dry run each entry starts with `would`.
28
+ */
29
+ changes: string[];
30
+ /** Every declared custom domain and its state (`active`, `pending`, ...). */
31
+ domains: Array<{
32
+ domain: string;
33
+ status?: string;
34
+ }>;
35
+ }
36
+ export interface R2ReconcileSummary {
37
+ buckets: R2BucketSummary[];
38
+ /** Problems that did not stop the reconcile: a domain that would not attach, a cache rule the token could not write. */
39
+ warnings: string[];
40
+ }
41
+ export interface ReconcileR2BucketsOptions {
42
+ /** Account API token with `Workers R2 Storage: Edit` (plus `Zone: Read` and cache-rule edit for custom domains and `cache`). */
43
+ apiToken?: string;
44
+ /** Account the buckets live under. */
45
+ accountId?: string;
46
+ /**
47
+ * Zone id to use for custom domains inside that zone. Domains outside it,
48
+ * or every domain when this is unset, have their zone looked up by apex.
49
+ */
50
+ zoneId?: string;
51
+ /** Progress lines. */
52
+ log?: (message: string) => void;
53
+ /** Read everything, write nothing, and report what would change. */
54
+ dryRun?: boolean;
55
+ /** Override `fetch` for the R2 calls, for tests. */
56
+ fetch?: (input: string, init?: RequestInit) => Promise<Response>;
57
+ }
58
+ /** Anything carrying an `r2` block, at the top level or under `infrastructure`. */
59
+ export interface R2ConfigSource {
60
+ infrastructure?: {
61
+ r2?: R2Config;
62
+ };
63
+ r2?: R2Config;
64
+ }
65
+ /**
66
+ * Reconcile every bucket in `config`'s `r2` block.
67
+ *
68
+ * Skips cleanly (logs and returns an empty summary) when there is no `r2`
69
+ * block, and when the token or account id is missing (with a warning, since a
70
+ * declared bucket that silently never appears is the worst outcome).
71
+ *
72
+ * Per-bucket problems that leave the rest of the bucket usable (a domain that
73
+ * will not attach, a cache rule the token cannot write) become warnings. A
74
+ * bucket that cannot be created, or any other API failure, throws.
75
+ *
76
+ * @throws {R2NotEnabledError} When R2 has never been enabled on the account
77
+ */
78
+ export declare function reconcileR2Buckets(config: R2ConfigSource, options?: ReconcileR2BucketsOptions): Promise<R2ReconcileSummary>;
79
+ /** `action_parameters` for a `set_cache_settings` rule, or null when nothing is set. */
80
+ export declare function cacheRuleParameters(cache: NonNullable<R2BucketConfig['cache']>): Record<string, unknown> | null;
81
+ /**
82
+ * Is `rule` already in effect in `existing`, so a PUT would change nothing?
83
+ *
84
+ * Not a plain equality check, because of how the managed merge stores rules:
85
+ * rules with identical behaviour from different projects are folded into one
86
+ * rule over the union of their hosts. So the rule is in sync when some managed
87
+ * rule behaves identically and covers all of its hosts, and no OTHER managed
88
+ * rule still claims any of them (which the merge would strip on write).
89
+ */
90
+ export declare function managedRuleInSync(existing: CloudflareRule[], rule: CloudflareRule): boolean;
91
+ /** Config lifecycle rule (flat) to the API's nested transition shape. */
92
+ export declare function toApiLifecycleRule(rule: R2LifecycleRule): R2ApiLifecycleRule;
93
+ /**
94
+ * One status word for a custom domain: `active` once both ownership and the
95
+ * edge certificate are, the failing state when either has failed, otherwise
96
+ * `pending`.
97
+ */
98
+ export declare function domainStatus(domain: R2CustomDomain): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A routed fake `fetch` for the R2 tests: no network, every request recorded.
3
+ *
4
+ * Routes are keyed `METHOD /path` with the path below `/client/v4` and the
5
+ * query string dropped. A handler returns the `result` (wrapped in Cloudflare's
6
+ * success envelope), or a {@link CloudflareFailure} for an error envelope. An
7
+ * unrouted request fails the test loudly instead of silently answering.
8
+ */
9
+ export interface RecordedRequest {
10
+ method: string;
11
+ path: string;
12
+ query: URLSearchParams;
13
+ headers: Record<string, string>;
14
+ body: any;
15
+ }
16
+ export declare class CloudflareFailure {
17
+ readonly status: number;
18
+ readonly errors: Array<{
19
+ code: number;
20
+ message: string;
21
+ }>;
22
+ constructor(status: number, errors: Array<{
23
+ code: number;
24
+ message: string;
25
+ }>);
26
+ }
27
+ export type RouteHandler = (request: RecordedRequest) => unknown;
28
+ export declare function fakeCloudflare(routes: Record<string, RouteHandler | unknown>): {
29
+ fetch: (input: string, init?: RequestInit) => Promise<Response>;
30
+ calls: RecordedRequest[];
31
+ writes: () => RecordedRequest[];
32
+ };
@@ -1 +1 @@
1
- import{cA,ro,dA,N,lA,od,bp,no,uA,gA,pA,ad,Ei,io,cd,qt,ft,mA,Fr,fA,dd,Cp,Ep,so,ld,ud,ht,vp,vi,gd,oo,Ur,Tp,Ti,pd,md,wi,wp,fd,hd,Ad,yd,ao,Rp,Dp,hA,Pp,Sd,Ri,Np,kp,co,Qr,lo,uo,go,Id,Bp,bd,po,AA,jt,yA,Cd,Hr,Ed,SA,vd,xp,EA,Vr,Lp,ho,vA,$p,Mp,Fp,TA,Up,Qp,wA,Ao,yo}from"../chunk-qhtgfjhd.js";import"../chunk-tbn385ak.js";import"../chunk-c45ay9fx.js";export{co as AnomalyConfigStore,Up as AwsSpendTransport,Qp as ComputeSpendTransport,so as CounterTracker,dd as DEFAULT_METER_MAPPINGS,ad as DEFAULT_PRICE_BOOK,vp as DEFAULT_THRESHOLDS,Qr as DETECTABLE_SIGNALS,dA as ENFORCEMENT_ACTIONS,wi as ENFORCEMENT_DESCRIPTIONS,N as ENFORCEMENT_SEVERITY,Bp as FOCUS_VERSION,ro as METERS,cA as METER_KEYS,lA as MICRO_CENTS,Tp as MIN_PROJECTION_CONFIDENCE,xp as RecordingSpendTransport,Np as SENSITIVITY_THRESHOLDS,Fp as SPEND_CYCLE_SECONDS,Cd as SPEND_GATE_SETTING,vA as SPEND_LEASE_SETTING,uo as SignalSource,Ed as SpendCapError,Hr as SpendGate,$p as SpendLoopLease,ho as SpendNotificationRouter,Mp as SpendRunner,jt as SpendService,vi as SpendStore,EA as URGENT_SPEND_EVENTS,wp as USER_VISIBLE_ACTIONS,ud as aggregateDeltas,Ri as anomalyOptionsForSignal,SA as assertSpendAllows,ft as budgetWindow,wA as compositeSpendTransport,vd as createEnforcementHandlers,Pp as detectAnomalies,Sd as detectLatestAnomaly,pd as evaluateBudget,hA as ewma,Cp as findMapping,bp as findPriceEntry,Vr as formatCents,Ur as formatTimeToExhaustion,Ti as governingLimitCents,Ao as handleSpendRequest,Fr as hourBucket,fA as hourBucketsBetween,yd as isOperationAllowed,Ei as isValidTimeZone,Id as lookbackHoursForSignal,ao as median,Rp as medianAbsoluteDeviation,md as mergeDecisions,pA as mergePriceBooks,ld as meterTelemetry,go as optionsForSignal,oo as percentOfLimit,fd as planEnforcement,mA as previousBudgetWindow,no as priceUsage,uA as priceUsageLines,gd as projectSpend,Dp as robustZScore,gA as roundCents,kp as routeMatches,hd as runEnforcement,ht as scopeKey,lo as signalDefinition,Lp as spendNotificationText,yo as spendOpenApiPaths,TA as startSpendLoop,AA as streamFocusJsonl,Ad as strongestActiveAction,od as tieredMicroCents,po as toFocusJsonl,bd as toFocusRecords,Ep as usageDeltaKey,qt as utcInstantOfLocal,yA as zeroFill,cd as zoneOffsetMs,io as zonedParts};
1
+ import{lA,io,uA,N,gA,cd,Ep,so,pA,mA,fA,dd,wi,oo,ld,Kt,ft,hA,Hr,AA,ud,vp,Tp,ao,gd,pd,ht,wp,Ri,md,co,Gr,Rp,Di,fd,hd,Pi,Dp,Ad,yd,Sd,Id,lo,Pp,Np,yA,kp,bd,Ni,Bp,xp,uo,Vr,go,po,mo,Cd,Op,Ed,fo,SA,Wt,IA,vd,qr,Td,bA,wd,_p,TA,zr,Mp,yo,wA,Fp,Up,Qp,RA,Hp,Gp,DA,So,Io}from"../chunk-yt6m703r.js";import"../chunk-5n1y5ehd.js";import"../chunk-my61jkg1.js";export{uo as AnomalyConfigStore,Hp as AwsSpendTransport,Gp as ComputeSpendTransport,ao as CounterTracker,ud as DEFAULT_METER_MAPPINGS,dd as DEFAULT_PRICE_BOOK,wp as DEFAULT_THRESHOLDS,Vr as DETECTABLE_SIGNALS,uA as ENFORCEMENT_ACTIONS,Pi as ENFORCEMENT_DESCRIPTIONS,N as ENFORCEMENT_SEVERITY,Op as FOCUS_VERSION,io as METERS,lA as METER_KEYS,gA as MICRO_CENTS,Rp as MIN_PROJECTION_CONFIDENCE,_p as RecordingSpendTransport,Bp as SENSITIVITY_THRESHOLDS,Qp as SPEND_CYCLE_SECONDS,vd as SPEND_GATE_SETTING,wA as SPEND_LEASE_SETTING,po as SignalSource,Td as SpendCapError,qr as SpendGate,Fp as SpendLoopLease,yo as SpendNotificationRouter,Up as SpendRunner,Wt as SpendService,Ri as SpendStore,TA as URGENT_SPEND_EVENTS,Dp as USER_VISIBLE_ACTIONS,pd as aggregateDeltas,Ni as anomalyOptionsForSignal,bA as assertSpendAllows,ft as budgetWindow,DA as compositeSpendTransport,wd as createEnforcementHandlers,kp as detectAnomalies,bd as detectLatestAnomaly,fd as evaluateBudget,yA as ewma,vp as findMapping,Ep as findPriceEntry,zr as formatCents,Gr as formatTimeToExhaustion,Di as governingLimitCents,So as handleSpendRequest,Hr as hourBucket,AA as hourBucketsBetween,Id as isOperationAllowed,wi as isValidTimeZone,Cd as lookbackHoursForSignal,lo as median,Pp as medianAbsoluteDeviation,hd as mergeDecisions,fA as mergePriceBooks,gd as meterTelemetry,mo as optionsForSignal,co as percentOfLimit,Ad as planEnforcement,hA as previousBudgetWindow,so as priceUsage,pA as priceUsageLines,md as projectSpend,Np as robustZScore,mA as roundCents,xp as routeMatches,yd as runEnforcement,ht as scopeKey,go as signalDefinition,Mp as spendNotificationText,Io as spendOpenApiPaths,RA as startSpendLoop,SA as streamFocusJsonl,Sd as strongestActiveAction,cd as tieredMicroCents,fo as toFocusJsonl,Ed as toFocusRecords,Tp as usageDeltaKey,Kt as utcInstantOfLocal,IA as zeroFill,ld as zoneOffsetMs,oo as zonedParts};
package/dist/ui/404.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html lang="en" data-theme="dark">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
- <meta name="stx-build" content="muw2rgfkt828iy">
5
+ <meta name="stx-build" content="muw8matxqv773g">
6
6
 
7
7
  <!-- stx SEO Tags -->
8
8
  <meta name="title" content="Page not found · ts-cloud">
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="muw2r2b6hpfy3w"><meta name="title" content="stx Project"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="stx Project"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="stx Project"><meta name="twitter:description" content="A website built with stx templating engine"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ts-cloud - Accept invitation</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_stx/style.448ab192.css"><style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.616c25f3.css"></head><body class="auth-page"><main class="auth-card" id="main-content"><a class="brand" href="/"><span class="dot"></span><span>ts-cloud</span></a><div><span class="context-label">Organization invitation</span><h1>Join your team</h1><p>Choose the dashboard username and password you will use after this invitation is accepted.</p></div><form id="accept-invitation-form" class="auth-form"><div class="field-block"><label for="invite-name">Name</label><input id="invite-name" name="name" autocomplete="name" placeholder="Chris Breuer"></div><div class="field-block"><label for="invite-username">Username</label><input id="invite-username" name="username" autocomplete="username" minlength="2" maxlength="32" required></div><div class="field-block"><label for="invite-password">Password</label><input id="invite-password" name="password" type="password" autocomplete="new-password" minlength="12" required><small>At least 12 characters.</small></div><button class="btn" type="submit">Accept invitation</button><div id="invitation-status" class="auth-status" role="status"></div></form><p class="note">If this link expired or was already used, ask an organization owner to resend the invitation.</p></main> <script data-stx-scoped data-stx-run="always">
1
+ <!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="muw8lwgexgvl1d"><meta name="title" content="stx Project"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="stx Project"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="stx Project"><meta name="twitter:description" content="A website built with stx templating engine"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ts-cloud - Accept invitation</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_stx/style.448ab192.css"><style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.616c25f3.css"></head><body class="auth-page"><main class="auth-card" id="main-content"><a class="brand" href="/"><span class="dot"></span><span>ts-cloud</span></a><div><span class="context-label">Organization invitation</span><h1>Join your team</h1><p>Choose the dashboard username and password you will use after this invitation is accepted.</p></div><form id="accept-invitation-form" class="auth-form"><div class="field-block"><label for="invite-name">Name</label><input id="invite-name" name="name" autocomplete="name" placeholder="Chris Breuer"></div><div class="field-block"><label for="invite-username">Username</label><input id="invite-username" name="username" autocomplete="username" minlength="2" maxlength="32" required></div><div class="field-block"><label for="invite-password">Password</label><input id="invite-password" name="password" type="password" autocomplete="new-password" minlength="12" required><small>At least 12 characters.</small></div><button class="btn" type="submit">Accept invitation</button><div id="invitation-status" class="auth-status" role="status"></div></form><p class="note">If this link expired or was already used, ask an organization owner to resend the invitation.</p></main> <script data-stx-scoped data-stx-run="always">
2
2
  ;(function() {
3
3
  'use strict';
4
4
  (() => {
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="muw2r2b6hpfy3w"><meta name="title" content="Access unavailable · ts-cloud"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="Access unavailable · ts-cloud"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Access unavailable · ts-cloud"><meta name="twitter:description" content="A website built with stx templating engine"> <script data-stx-runtime src="/_stx/runtime.dbee66d1.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Access unavailable · ts-cloud</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_stx/style.448ab192.css"><style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.906ee17c.css"></head><body data-stx-auto><a data-stx-scope="stx_scope_nav_50" class="skip-link" href="#main-content">Skip to content</a><button class="nav-toggle-button" type="button" aria-label="Open navigation" aria-controls="primary-navigation" aria-expanded="false"><span></span><span></span><span></span></button><button class="nav-scrim" type="button" aria-label="Close navigation"></button><aside class="app-sidebar" id="primary-navigation" aria-label="Primary navigation"><a class="brand" href="/?env=production"><span class="dot"></span><span>ts-cloud</span></a><div class="sidebar-context"><span class="context-label">Project</span><strong>ts-cloud</strong></div><div class="environment-picker" aria-label="Environment"><span class="context-label">Environment</span><details><summary class="environment-current production"><span>PROD</span><strong>production</strong></summary></details></div><button class="command-trigger" type="button" aria-keyshortcuts="Meta+K Control+K"><span>Search resources</span><kbd>⌘ K</kbd></button><div class="nav-groups"><section class="nav-group"><h2>Overview</h2><a class="" href="/?env=production">Dashboard</a><a href="/server/activity?env=production">Activity</a></section><section class="nav-group"><h2>Applications</h2><a class="" href="/server/sites?env=production">Services</a><a class="" href="/server/deployments?env=production">Deployments</a><a class="" href="/server/logs?env=production">Logs</a><a class="" href="/integrations?env=production">Git integrations</a><a class="" href="/applications/new?env=production">Create application</a><a class="" href="/applications/compose?env=production">Compose applications</a></section><section class="nav-group"><h2>Operations</h2><a class="" href="/operations/queue?env=production">Deployment queue</a><a class="" href="/operations/previews?env=production">Preview environments</a><a class="" href="/operations/releases?env=production">Releases & promotion</a><a class="" href="/operations/regions?env=production">Regions & failover</a><a class="" href="/operations/maintenance?env=production">Maintenance & DR</a><a class="" href="/operations/workloads?env=production">Workloads</a><a class="" href="/operations/observability?env=production">Observability</a><a class="" href="/operations/alerts?env=production">Alerts & health</a><a class="" href="/operations/spend?env=production">Spend & budgets</a><a href="/server/metrics?env=production">Metrics</a><a href="/server/services?env=production">Runtime services</a><a class="" href="/operations/jobs?env=production">Workers & schedules</a><a class="" href="/operations/configuration?env=production">Environment &amp; secrets</a><a class="" href="/data/backups?env=production">Backups &amp; recovery</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/actions?env=production">Run operations</a></section><section class="nav-group"><h2>Infrastructure</h2><a class="" href="/infrastructure/topology?env=production">Infrastructure map</a><a class="" href="/data/services?env=production">Data services</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/firewall?env=production">Network & firewall</a><a href="/server/ssh-keys?env=production">SSH keys</a><a class="" href="/server/fleet?env=production">Fleet inventory</a><a class="" href="/server/capacity?env=production">Capacity & placement</a><a href="/security?env=production">Security posture</a><a href="/server/terminal?env=production">Terminal</a></section><section class="nav-group"><h2>Organization</h2><a class="" href="/server/team?env=production">People & access</a><a class="" href="/account/automation?env=production">API & automation</a></section><section class="nav-group"><h2>Account</h2><a class="" href="/account/security?env=production">Sign-in & security</a></section></div><form method="post" action="/api/logout" class="signout"><button type="submit">Sign out</button></form></aside><dialog class="command-palette" aria-labelledby="command-title"><div class="command-search"><span aria-hidden="true">⌕</span><input type="search" placeholder="Search services, domains, deployments…" aria-label="Search resources" autocomplete="off"><button type="button" class="command-close" aria-label="Close search">Esc</button></div><h2 id="command-title" class="sr-only">Search resources and navigation</h2><div class="command-status" role="status">Start typing to search this project.</div><section class="saved-views" aria-labelledby="saved-views-title"><div class="saved-views-heading"><h3 id="saved-views-title">Saved views</h3><form class="save-view-form"><label class="sr-only" for="save-view-name">Saved view name</label><input id="save-view-name" maxlength="64" placeholder="Name this view" autocomplete="off"><button type="submit">Save current filters</button></form></div><div class="saved-view-list"></div></section><form class="tag-result-form"><label for="tag-result-name">Tag selected resource</label><input id="tag-result-name" maxlength="32" placeholder="customer-facing" pattern="[A-Za-z0-9][A-Za-z0-9 -]{0,31}" autocomplete="off"><input class="tag-color" type="color" value="#5a8be0" aria-label="Tag color"><button type="submit">Add tag</button></form><div class="command-results" role="listbox" aria-label="Search results"></div><footer><span>↑ ↓ navigate</span><span>Enter open</span><span>Esc close</span></footer></dialog><div class="context-bar" aria-label="Current scope"><div class="context-path"><div class="context-breadcrumb"><span>ts-cloud</span><i>/</i><strong>production</strong></div><div class="context-filters" aria-label="Active filters"></div></div><span class="scope-safety production">Production scope</span></div> <script data-stx-scoped data-stx-run="always">
1
+ <!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta name="stx-build" content="muw8lwgexgvl1d"><meta name="title" content="Access unavailable · ts-cloud"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="Access unavailable · ts-cloud"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Access unavailable · ts-cloud"><meta name="twitter:description" content="A website built with stx templating engine"> <script data-stx-runtime src="/_stx/runtime.dbee66d1.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Access unavailable · ts-cloud</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_stx/style.448ab192.css"><style data-stx-cloak>[x-cloak]{display:none !important}</style><link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.906ee17c.css"></head><body data-stx-auto><a data-stx-scope="stx_scope_nav_50" class="skip-link" href="#main-content">Skip to content</a><button class="nav-toggle-button" type="button" aria-label="Open navigation" aria-controls="primary-navigation" aria-expanded="false"><span></span><span></span><span></span></button><button class="nav-scrim" type="button" aria-label="Close navigation"></button><aside class="app-sidebar" id="primary-navigation" aria-label="Primary navigation"><a class="brand" href="/?env=production"><span class="dot"></span><span>ts-cloud</span></a><div class="sidebar-context"><span class="context-label">Project</span><strong>ts-cloud</strong></div><div class="environment-picker" aria-label="Environment"><span class="context-label">Environment</span><details><summary class="environment-current production"><span>PROD</span><strong>production</strong></summary></details></div><button class="command-trigger" type="button" aria-keyshortcuts="Meta+K Control+K"><span>Search resources</span><kbd>⌘ K</kbd></button><div class="nav-groups"><section class="nav-group"><h2>Overview</h2><a class="" href="/?env=production">Dashboard</a><a href="/server/activity?env=production">Activity</a></section><section class="nav-group"><h2>Applications</h2><a class="" href="/server/sites?env=production">Services</a><a class="" href="/server/deployments?env=production">Deployments</a><a class="" href="/server/logs?env=production">Logs</a><a class="" href="/integrations?env=production">Git integrations</a><a class="" href="/applications/new?env=production">Create application</a><a class="" href="/applications/compose?env=production">Compose applications</a></section><section class="nav-group"><h2>Operations</h2><a class="" href="/operations/queue?env=production">Deployment queue</a><a class="" href="/operations/previews?env=production">Preview environments</a><a class="" href="/operations/releases?env=production">Releases & promotion</a><a class="" href="/operations/regions?env=production">Regions & failover</a><a class="" href="/operations/maintenance?env=production">Maintenance & DR</a><a class="" href="/operations/workloads?env=production">Workloads</a><a class="" href="/operations/observability?env=production">Observability</a><a class="" href="/operations/alerts?env=production">Alerts & health</a><a class="" href="/operations/spend?env=production">Spend & budgets</a><a href="/server/metrics?env=production">Metrics</a><a href="/server/services?env=production">Runtime services</a><a class="" href="/operations/jobs?env=production">Workers & schedules</a><a class="" href="/operations/configuration?env=production">Environment &amp; secrets</a><a class="" href="/data/backups?env=production">Backups &amp; recovery</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/actions?env=production">Run operations</a></section><section class="nav-group"><h2>Infrastructure</h2><a class="" href="/infrastructure/topology?env=production">Infrastructure map</a><a class="" href="/data/services?env=production">Data services</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/firewall?env=production">Network & firewall</a><a href="/server/ssh-keys?env=production">SSH keys</a><a class="" href="/server/fleet?env=production">Fleet inventory</a><a class="" href="/server/capacity?env=production">Capacity & placement</a><a href="/security?env=production">Security posture</a><a href="/server/terminal?env=production">Terminal</a></section><section class="nav-group"><h2>Organization</h2><a class="" href="/server/team?env=production">People & access</a><a class="" href="/account/automation?env=production">API & automation</a></section><section class="nav-group"><h2>Account</h2><a class="" href="/account/security?env=production">Sign-in & security</a></section></div><form method="post" action="/api/logout" class="signout"><button type="submit">Sign out</button></form></aside><dialog class="command-palette" aria-labelledby="command-title"><div class="command-search"><span aria-hidden="true">⌕</span><input type="search" placeholder="Search services, domains, deployments…" aria-label="Search resources" autocomplete="off"><button type="button" class="command-close" aria-label="Close search">Esc</button></div><h2 id="command-title" class="sr-only">Search resources and navigation</h2><div class="command-status" role="status">Start typing to search this project.</div><section class="saved-views" aria-labelledby="saved-views-title"><div class="saved-views-heading"><h3 id="saved-views-title">Saved views</h3><form class="save-view-form"><label class="sr-only" for="save-view-name">Saved view name</label><input id="save-view-name" maxlength="64" placeholder="Name this view" autocomplete="off"><button type="submit">Save current filters</button></form></div><div class="saved-view-list"></div></section><form class="tag-result-form"><label for="tag-result-name">Tag selected resource</label><input id="tag-result-name" maxlength="32" placeholder="customer-facing" pattern="[A-Za-z0-9][A-Za-z0-9 -]{0,31}" autocomplete="off"><input class="tag-color" type="color" value="#5a8be0" aria-label="Tag color"><button type="submit">Add tag</button></form><div class="command-results" role="listbox" aria-label="Search results"></div><footer><span>↑ ↓ navigate</span><span>Enter open</span><span>Esc close</span></footer></dialog><div class="context-bar" aria-label="Current scope"><div class="context-path"><div class="context-breadcrumb"><span>ts-cloud</span><i>/</i><strong>production</strong></div><div class="context-filters" aria-label="Active filters"></div></div><span class="scope-safety production">Production scope</span></div> <script data-stx-scoped data-stx-run="always">
2
2
  (function() {
3
3
  var { batch, computed, configureFetch, defineEmits, defineExpose, definePageMeta, defineProps, defineSlots, defineStore, derived, effect, goBack, goForward, inject, invalidateRoute, isDerived, isSignal, navigate, nextTick, onBeforeMount, onBeforeUnmount, onDestroy, onMount, onMounted, onUnmounted, peek, provide, reactive, ref, refresh, registerStoresClient, setRouteParams, state, untrack, useAsync, useClickOutside, useColorMode, useCookie, useCounter, useDark, useDebounce, useDebouncedValue, useEventListener, useFetch, useFocus, useHead, useId, useInterval, useLocalStorage, useMediaQuery, useMutation, useOptimistic, usePreferredContrast, usePreferredDark, usePreferredLight, usePreferredReducedMotion, useQuery, useReactiveProp, useRef, useRoute, useRouteParam, useRouteParams, useScrollLock, useSearchParams, useSeoMeta, useSessionStorage, useSlots, useStore, useThrottle, useTimeout, useToggle, useWebSocket, watch, watchEffect, watchMultiple, withDefaults } = window.stx;
4
4
  var __destroyHooks = [];