@stacksjs/ts-cloud 0.11.6 → 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.
- package/dist/bin/cli.js +77 -77
- package/dist/cdn/cloudflare-rules.d.ts +37 -0
- package/dist/index.js +25 -25
- package/dist/ui/404.html +1 -1
- package/dist/ui/accept-invitation.html +1 -1
- package/dist/ui/access-denied.html +1 -1
- package/dist/ui/account/automation.html +5 -5
- package/dist/ui/account/security.html +2 -2
- package/dist/ui/applications/compose.html +6 -6
- package/dist/ui/applications/new.html +2 -2
- package/dist/ui/data/backups.html +6 -6
- package/dist/ui/data/services.html +6 -6
- package/dist/ui/data/volumes.html +6 -6
- package/dist/ui/index.html +6 -6
- package/dist/ui/infrastructure/topology.html +5 -5
- package/dist/ui/integrations.html +2 -2
- package/dist/ui/operations/alerts.html +6 -6
- package/dist/ui/operations/configuration.html +6 -6
- package/dist/ui/operations/jobs.html +6 -6
- package/dist/ui/operations/maintenance.html +6 -6
- package/dist/ui/operations/observability.html +6 -6
- package/dist/ui/operations/previews.html +6 -6
- package/dist/ui/operations/queue.html +6 -6
- package/dist/ui/operations/regions.html +6 -6
- package/dist/ui/operations/releases.html +6 -6
- package/dist/ui/operations/spend.html +6 -6
- package/dist/ui/operations/workloads.html +6 -6
- package/dist/ui/security.html +1 -1
- package/dist/ui/server/actions.html +5 -5
- package/dist/ui/server/activity.html +2 -2
- package/dist/ui/server/capacity.html +6 -6
- package/dist/ui/server/database.html +6 -6
- package/dist/ui/server/deployments.html +5 -5
- package/dist/ui/server/diagnostics.html +2 -2
- package/dist/ui/server/firewall.html +6 -6
- package/dist/ui/server/fleet.html +5 -5
- package/dist/ui/server/logs.html +5 -5
- package/dist/ui/server/metrics.html +5 -5
- package/dist/ui/server/security.html +2 -2
- package/dist/ui/server/services.html +2 -2
- package/dist/ui/server/sites.html +6 -6
- package/dist/ui/server/ssh-keys.html +6 -6
- package/dist/ui/server/team.html +6 -6
- package/dist/ui/server/terminal.html +2 -2
- package/dist/ui/serverless/alarms.html +6 -6
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +2 -2
- package/dist/ui/serverless/data.html +6 -6
- package/dist/ui/serverless/deployments.html +2 -2
- package/dist/ui/serverless/firewall.html +2 -2
- package/dist/ui/serverless/functions.html +6 -6
- package/dist/ui/serverless/logs.html +6 -6
- package/dist/ui/serverless/metrics.html +2 -2
- package/dist/ui/serverless/queues.html +6 -6
- package/dist/ui/serverless/secrets.html +6 -6
- package/dist/ui/serverless/traces.html +6 -6
- package/dist/ui/serverless.html +6 -6
- package/package.json +3 -3
|
@@ -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
|
/**
|