@stacksjs/ts-cloud 0.11.5 → 0.11.7

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 (67) hide show
  1. package/dist/bin/{chunk-fdrbeb7p.js → chunk-5nsqz5n3.js} +46 -46
  2. package/dist/bin/{chunk-ayhqt80q.js → chunk-j447p8t4.js} +1 -1
  3. package/dist/bin/{chunk-6wxxe560.js → chunk-yw6f160x.js} +1 -1
  4. package/dist/bin/cli.js +78 -78
  5. package/dist/bin/dashboard-server.js +1 -1
  6. package/dist/cdn/cloudflare-rules.d.ts +37 -0
  7. package/dist/{chunk-t2a6r38z.js → chunk-aw0spg20.js} +64 -64
  8. package/dist/{chunk-9pa96r7f.js → chunk-ywjkyg8p.js} +1 -1
  9. package/dist/deploy/index.js +1 -1
  10. package/dist/drivers/index.js +1 -1
  11. package/dist/drivers/shared/deploy-script.d.ts +49 -0
  12. package/dist/index.js +25 -25
  13. package/dist/ui/404.html +1 -1
  14. package/dist/ui/accept-invitation.html +1 -1
  15. package/dist/ui/access-denied.html +1 -1
  16. package/dist/ui/account/automation.html +5 -5
  17. package/dist/ui/account/security.html +2 -2
  18. package/dist/ui/applications/compose.html +6 -6
  19. package/dist/ui/applications/new.html +1 -1
  20. package/dist/ui/data/backups.html +6 -6
  21. package/dist/ui/data/services.html +5 -5
  22. package/dist/ui/data/volumes.html +5 -5
  23. package/dist/ui/index.html +6 -6
  24. package/dist/ui/infrastructure/topology.html +5 -5
  25. package/dist/ui/integrations.html +1 -1
  26. package/dist/ui/operations/alerts.html +6 -6
  27. package/dist/ui/operations/configuration.html +6 -6
  28. package/dist/ui/operations/jobs.html +5 -5
  29. package/dist/ui/operations/maintenance.html +5 -5
  30. package/dist/ui/operations/observability.html +6 -6
  31. package/dist/ui/operations/previews.html +6 -6
  32. package/dist/ui/operations/queue.html +6 -6
  33. package/dist/ui/operations/regions.html +5 -5
  34. package/dist/ui/operations/releases.html +6 -6
  35. package/dist/ui/operations/spend.html +6 -6
  36. package/dist/ui/operations/workloads.html +6 -6
  37. package/dist/ui/security.html +1 -1
  38. package/dist/ui/server/actions.html +6 -6
  39. package/dist/ui/server/activity.html +2 -2
  40. package/dist/ui/server/capacity.html +6 -6
  41. package/dist/ui/server/database.html +6 -6
  42. package/dist/ui/server/deployments.html +5 -5
  43. package/dist/ui/server/diagnostics.html +2 -2
  44. package/dist/ui/server/firewall.html +6 -6
  45. package/dist/ui/server/fleet.html +6 -6
  46. package/dist/ui/server/logs.html +6 -6
  47. package/dist/ui/server/metrics.html +5 -5
  48. package/dist/ui/server/security.html +2 -2
  49. package/dist/ui/server/services.html +2 -2
  50. package/dist/ui/server/sites.html +6 -6
  51. package/dist/ui/server/ssh-keys.html +6 -6
  52. package/dist/ui/server/team.html +6 -6
  53. package/dist/ui/server/terminal.html +2 -2
  54. package/dist/ui/serverless/alarms.html +6 -6
  55. package/dist/ui/serverless/assets.html +2 -2
  56. package/dist/ui/serverless/cost.html +2 -2
  57. package/dist/ui/serverless/data.html +6 -6
  58. package/dist/ui/serverless/deployments.html +2 -2
  59. package/dist/ui/serverless/firewall.html +2 -2
  60. package/dist/ui/serverless/functions.html +6 -6
  61. package/dist/ui/serverless/logs.html +6 -6
  62. package/dist/ui/serverless/metrics.html +2 -2
  63. package/dist/ui/serverless/queues.html +6 -6
  64. package/dist/ui/serverless/secrets.html +6 -6
  65. package/dist/ui/serverless/traces.html +6 -6
  66. package/dist/ui/serverless.html +5 -5
  67. package/package.json +3 -3
@@ -1 +1 @@
1
- import{Wa as i}from"./chunk-ayhqt80q.js";import"./chunk-sj5csg49.js";import"./chunk-cbsys5v8.js";import"./chunk-s4yzes15.js";import"./chunk-3aph4c1w.js";import"./chunk-mfrf9q4b.js";import"./chunk-82mj52xr.js";import"./chunk-7zhgmp1s.js";import"./chunk-e2bybahr.js";import"./chunk-d7ke90zt.js";import"./chunk-kg61p5hw.js";import"./chunk-c0bdafbx.js";import"./chunk-fdrbeb7p.js";import"./chunk-4xhj37nj.js";import"./chunk-8khgprf6.js";import"./chunk-r6b3pq31.js";import"./chunk-xk08030d.js";import"./chunk-x6f61g36.js";import"./chunk-xhwqpgwq.js";import"./chunk-a7w13qfm.js";import"./chunk-my3ewh3a.js";import"./chunk-e5ab5twy.js";import"./chunk-btsyjhk7.js";import"./chunk-w32xv8n4.js";import"./chunk-dz1ec589.js";import"./chunk-9a88fp00.js";import"./chunk-6tfwm33r.js";import"./chunk-ja1vjdn1.js";import"./chunk-4q6tad44.js";import"./chunk-ehc63fvs.js";import n from"node:process";function r(o){let e=n.argv.indexOf(o);return e===-1?void 0:n.argv[e+1]}function t(o){return n.argv.includes(o)}async function a(){let o=await i({host:r("--host")??"127.0.0.1",port:Number(r("--port")??7676),environment:r("--env"),box:t("--box"),verbose:t("--verbose")});console.log("ts-cloud Local Dashboard"),console.log(`Serving ${o.url}`),await new Promise((e)=>{let s=()=>{o.server.stop(!0),e()};n.once("SIGINT",s),n.once("SIGTERM",s)})}a();
1
+ import{Wa as i}from"./chunk-j447p8t4.js";import"./chunk-sj5csg49.js";import"./chunk-cbsys5v8.js";import"./chunk-s4yzes15.js";import"./chunk-3aph4c1w.js";import"./chunk-mfrf9q4b.js";import"./chunk-82mj52xr.js";import"./chunk-7zhgmp1s.js";import"./chunk-e2bybahr.js";import"./chunk-d7ke90zt.js";import"./chunk-kg61p5hw.js";import"./chunk-c0bdafbx.js";import"./chunk-5nsqz5n3.js";import"./chunk-4xhj37nj.js";import"./chunk-8khgprf6.js";import"./chunk-r6b3pq31.js";import"./chunk-xk08030d.js";import"./chunk-x6f61g36.js";import"./chunk-xhwqpgwq.js";import"./chunk-a7w13qfm.js";import"./chunk-my3ewh3a.js";import"./chunk-e5ab5twy.js";import"./chunk-btsyjhk7.js";import"./chunk-w32xv8n4.js";import"./chunk-dz1ec589.js";import"./chunk-9a88fp00.js";import"./chunk-6tfwm33r.js";import"./chunk-ja1vjdn1.js";import"./chunk-4q6tad44.js";import"./chunk-ehc63fvs.js";import n from"node:process";function r(o){let e=n.argv.indexOf(o);return e===-1?void 0:n.argv[e+1]}function t(o){return n.argv.includes(o)}async function a(){let o=await i({host:r("--host")??"127.0.0.1",port:Number(r("--port")??7676),environment:r("--env"),box:t("--box"),verbose:t("--verbose")});console.log("ts-cloud Local Dashboard"),console.log(`Serving ${o.url}`),await new Promise((e)=>{let s=()=>{o.server.stop(!0),e()};n.once("SIGINT",s),n.once("SIGTERM",s)})}a();
@@ -16,6 +16,31 @@ import type { CloudflareRule } from '../dns/cloudflare';
16
16
  * so caching it as long would pin visitors to a stale deploy.
17
17
  */
18
18
  export declare const DEFAULT_STATIC_ASSET_EXTENSIONS: readonly string[];
19
+ /**
20
+ * Request headers that select a DIFFERENT body at the same url.
21
+ *
22
+ * A single-page app's router fetches the url the browser would navigate to and
23
+ * asks for a fragment of it — no `<head>`, no stylesheet link, no nav — with a
24
+ * request header. Two representations therefore share one cache key.
25
+ *
26
+ * Origins are supposed to declare that with `Vary`, and stx now does. Cloudflare
27
+ * does not honour `Vary` on anything but `Accept-Encoding`, so on the edge the
28
+ * declaration changes nothing: whichever representation is fetched first is
29
+ * stored under the bare url and served to everyone until the TTL expires. When
30
+ * that is the fragment — one visitor's prefetch is enough — every subsequent
31
+ * visitor gets an unstyled, headless page. The origin stays healthy throughout,
32
+ * which is why it survives every check that looks at the box.
33
+ *
34
+ * The edge cannot split the key, so it must not hold these at all.
35
+ */
36
+ export declare const DEFAULT_NEGOTIATED_REQUEST_HEADERS: readonly NegotiatedRequestHeader[];
37
+ /** A request header, optionally narrowed to one value, that renegotiates the body. */
38
+ export interface NegotiatedRequestHeader {
39
+ /** Header name, lowercase — Cloudflare's header map is lowercase-keyed. */
40
+ name: string;
41
+ /** Only bypass when the header carries this value. Omit to match its presence. */
42
+ value?: string;
43
+ }
19
44
  export interface CloudflareCacheRuleSettings {
20
45
  /** Generate cache rules at all. @default true */
21
46
  enabled?: boolean;
@@ -40,6 +65,13 @@ export interface CloudflareCacheRuleSettings {
40
65
  * `starts_with`, so `/api` also covers `/api/anything`.
41
66
  */
42
67
  bypassPaths?: readonly string[];
68
+ /**
69
+ * Request headers that select a different body at the same url.
70
+ *
71
+ * Defaults to {@link DEFAULT_NEGOTIATED_REQUEST_HEADERS}. Pass `[]` to cache
72
+ * these too — only correct for a site with no client-side router at all.
73
+ */
74
+ negotiatedRequestHeaders?: readonly NegotiatedRequestHeader[];
43
75
  }
44
76
  /** `http.host in {…}` for the hosts a rule applies to. */
45
77
  export declare function hostCondition(hosts: readonly string[]): string;
@@ -58,6 +90,11 @@ export declare function hostCondition(hosts: readonly string[]): string;
58
90
  * Every rule is also scoped to `hosts`. The zone may serve names that have
59
91
  * nothing to do with this site, and a catch-all matching them would quietly
60
92
  * start caching someone else's dynamic responses.
93
+ *
94
+ * The bypass rule comes first and is now always emitted, because it carries the
95
+ * renegotiating request headers as well as `bypassPaths` — a url that answers
96
+ * two bodies is not cacheable under the url alone, and the edge has no other
97
+ * key. See {@link DEFAULT_NEGOTIATED_REQUEST_HEADERS}.
61
98
  */
62
99
  export declare function buildStaticSiteCacheRules(hosts: readonly string[], settings?: CloudflareCacheRuleSettings): CloudflareRule[];
63
100
  /**