@vinext/cloudflare 1.0.0-beta.7 → 1.0.0-beta.9
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 +64 -22
- package/dist/cache/cdn-adapter-config.d.ts +16 -8
- package/dist/cache/cdn-adapter-config.js +57 -17
- package/dist/cache/cdn-adapter.d.ts +25 -24
- package/dist/cache/cdn-adapter.js +24 -20
- package/dist/cache/cdn-adapter.runtime.d.ts +9 -3
- package/dist/cache/cdn-adapter.runtime.js +63 -40
- package/dist/cache/cdn-adapter.worker.d.ts +31 -0
- package/dist/cache/cdn-adapter.worker.js +373 -0
- package/dist/cache/cdn-build-id.d.ts +4 -3
- package/dist/cache/cdn-build-id.js +5 -1
- package/dist/cache/kv-data-adapter.d.ts +25 -5
- package/dist/cache/kv-data-adapter.js +5 -1
- package/dist/cache/kv-data-adapter.runtime.d.ts +38 -4
- package/dist/cache/kv-data-adapter.runtime.js +115 -41
- package/dist/cache/kv-key.d.ts +4 -5
- package/dist/cache/response-store-adapter.d.ts +70 -0
- package/dist/cache/response-store-adapter.js +45 -0
- package/dist/cache/response-store-adapter.self-contained.worker.d.ts +18 -0
- package/dist/cache/response-store-adapter.self-contained.worker.js +12 -0
- package/dist/cache/response-store-adapter.service-binding.worker.d.ts +16 -0
- package/dist/cache/response-store-adapter.service-binding.worker.js +11 -0
- package/dist/cache/response-store-adapter.worker.d.ts +14 -0
- package/dist/cache/response-store-adapter.worker.js +264 -0
- package/dist/cache/response-store-cdn.runtime.d.ts +5 -0
- package/dist/cache/response-store-cdn.runtime.js +41 -0
- package/dist/cache/response-store-data.runtime.d.ts +34 -0
- package/dist/cache/response-store-data.runtime.js +289 -0
- package/dist/cacheability-artifact.d.ts +2 -3
- package/dist/cacheability-artifact.js +27 -1
- package/dist/cacheability-manifest-limits.d.ts +3 -4
- package/dist/cacheability-manifest-limits.js +1 -1
- package/dist/cacheability-probe.d.ts +8 -9
- package/dist/cacheability-probe.js +255 -91
- package/dist/cdn-warm.d.ts +31 -25
- package/dist/cdn-warm.js +228 -54
- package/dist/deploy-config.d.ts +11 -12
- package/dist/deploy-config.js +8 -3
- package/dist/deploy-help.d.ts +3 -4
- package/dist/deploy-help.js +20 -14
- package/dist/deploy.d.ts +35 -28
- package/dist/deploy.js +204 -95
- package/dist/images/images-optimizer.d.ts +3 -4
- package/dist/prerender-kv-populate.d.ts +3 -4
- package/dist/prerender-kv-populate.js +3 -2
- package/dist/tpr.d.ts +26 -74
- package/dist/tpr.js +45 -603
- package/dist/utils/cache-control-metadata.d.ts +3 -4
- package/dist/version-deploy.d.ts +17 -17
- package/dist/version-deploy.js +10 -5
- package/dist/worker-deployment-url.d.ts +3 -4
- package/dist/workers-dev-url.d.ts +2 -3
- package/dist/wrangler-config.d.ts +19 -0
- package/dist/wrangler-config.js +294 -0
- package/dist/wrangler-version-metadata.d.ts +2 -3
- package/package.json +13 -11
package/dist/deploy-config.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { VinextCacheConfig } from "vinext/internal/cache-adapters";
|
|
|
8
8
|
* Returns true when the config both imports the package and invokes
|
|
9
9
|
* `cloudflare(...)` in the plugin list.
|
|
10
10
|
*/
|
|
11
|
-
declare function viteConfigHasCloudflarePlugin(root: string): boolean;
|
|
11
|
+
export declare function viteConfigHasCloudflarePlugin(root: string): boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Detect whether the Vite config assigns a CDN or data cache adapter — i.e. the
|
|
14
14
|
* `cdn` or `data` field of the `vinext({ cache })` option is given a value.
|
|
@@ -17,18 +17,18 @@ declare function viteConfigHasCloudflarePlugin(root: string): boolean;
|
|
|
17
17
|
* an unreadable or absent config is treated as configured so a deploy is never
|
|
18
18
|
* blocked on a false negative.
|
|
19
19
|
*/
|
|
20
|
-
declare function viteConfigHasCacheAdapter(root: string): boolean;
|
|
21
|
-
type ResolvedKvDataAdapterConfig = {
|
|
20
|
+
export declare function viteConfigHasCacheAdapter(root: string): boolean;
|
|
21
|
+
export type ResolvedKvDataAdapterConfig = {
|
|
22
22
|
binding: string;
|
|
23
23
|
appPrefix?: string;
|
|
24
24
|
ttlSeconds?: number;
|
|
25
25
|
};
|
|
26
|
-
type ResolvedCdnAdapterConfig = {
|
|
26
|
+
export type ResolvedCdnAdapterConfig = {
|
|
27
27
|
versionMetadataBinding: string;
|
|
28
28
|
};
|
|
29
|
-
declare function resolveCdnAdapterConfig(cache: VinextCacheConfig | null | undefined): ResolvedCdnAdapterConfig | null;
|
|
30
|
-
declare function resolveKvDataAdapterConfig(cache: VinextCacheConfig | null | undefined): ResolvedKvDataAdapterConfig | null;
|
|
31
|
-
declare function viteConfigHasImageAdapter(root: string): boolean;
|
|
29
|
+
export declare function resolveCdnAdapterConfig(cache: VinextCacheConfig | null | undefined): ResolvedCdnAdapterConfig | null;
|
|
30
|
+
export declare function resolveKvDataAdapterConfig(cache: VinextCacheConfig | null | undefined): ResolvedKvDataAdapterConfig | null;
|
|
31
|
+
export declare function viteConfigHasImageAdapter(root: string): boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Detect whether an existing user-authored Worker entry wires up a cache
|
|
34
34
|
* backend imperatively via one of the `setCacheHandler` / `setDataCacheHandler`
|
|
@@ -43,16 +43,15 @@ declare function viteConfigHasImageAdapter(root: string): boolean;
|
|
|
43
43
|
* missing Worker entry returns false (nothing to inspect — defer to other
|
|
44
44
|
* checks).
|
|
45
45
|
*/
|
|
46
|
-
declare function workerEntryHasCacheHandler(root: string): boolean;
|
|
46
|
+
export declare function workerEntryHasCacheHandler(root: string): boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Build the error thrown when an ISR/cached app is deployed without a cache
|
|
49
49
|
* adapter configured in the Vite config. Production deployments need a
|
|
50
50
|
* persistent cache backend; vinext no longer scaffolds one into the Worker
|
|
51
51
|
* entry, so it must be declared via `vinext({ cache })`.
|
|
52
52
|
*/
|
|
53
|
-
declare function formatMissingCacheAdapterError(options: {
|
|
53
|
+
export declare function formatMissingCacheAdapterError(options: {
|
|
54
54
|
configFile?: string;
|
|
55
55
|
}): string;
|
|
56
|
-
declare function formatImageOptimizationHint(): string;
|
|
57
|
-
//#endregion
|
|
58
|
-
export { ResolvedCdnAdapterConfig, ResolvedKvDataAdapterConfig, formatImageOptimizationHint, formatMissingCacheAdapterError, resolveCdnAdapterConfig, resolveKvDataAdapterConfig, viteConfigHasCacheAdapter, viteConfigHasCloudflarePlugin, viteConfigHasImageAdapter, workerEntryHasCacheHandler };
|
|
56
|
+
export declare function formatImageOptimizationHint(): string;
|
|
57
|
+
//#endregion
|
package/dist/deploy-config.js
CHANGED
|
@@ -86,13 +86,18 @@ function viteConfigHasCacheAdapter(root) {
|
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
88
|
const block = extractCacheBlock(content);
|
|
89
|
-
if (!block)
|
|
89
|
+
if (!block) {
|
|
90
|
+
const assigned = /\bcache\s*:\s*([^,}\n]+)/.exec(content)?.[1].trim();
|
|
91
|
+
return Boolean(assigned && assigned !== "undefined" && assigned !== "null");
|
|
92
|
+
}
|
|
90
93
|
return cacheFieldAssigned(block, "cdn") || cacheFieldAssigned(block, "data");
|
|
91
94
|
}
|
|
92
95
|
function isCloudflareCdnAdapterPath(adapter) {
|
|
93
96
|
const normalized = adapter.replace(/\\/g, "/");
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
return ["cdn-adapter.runtime", "response-store-cdn.runtime"].some((runtime) => {
|
|
98
|
+
const bundledRuntime = fileURLToPath(new URL(`./cache/${runtime}.js`, import.meta.url)).replace(/\\/g, "/");
|
|
99
|
+
return normalized === `@vinext/cloudflare/cache/${runtime}` || normalized === `@vinext/cloudflare/cache/${runtime}.js` || normalized === bundledRuntime;
|
|
100
|
+
});
|
|
96
101
|
}
|
|
97
102
|
function resolveCdnAdapterConfig(cache) {
|
|
98
103
|
const cdn = cache?.cdn;
|
package/dist/deploy-help.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region src/deploy-help.d.ts
|
|
2
|
-
declare function formatDeployHelp(): string;
|
|
3
|
-
declare function printDeployHelp(): void;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { formatDeployHelp, printDeployHelp };
|
|
2
|
+
export declare function formatDeployHelp(): string;
|
|
3
|
+
export declare function printDeployHelp(): void;
|
|
4
|
+
//#endregion
|
package/dist/deploy-help.js
CHANGED
|
@@ -19,6 +19,8 @@ function formatDeployHelp() {
|
|
|
19
19
|
--skip-build Skip the build step (use existing dist/)
|
|
20
20
|
--dry-run Validate setup without building or deploying
|
|
21
21
|
--verbose Print raw output from internal Wrangler commands
|
|
22
|
+
--no-promote Do not promote the uploaded Worker version to 100%
|
|
23
|
+
traffic
|
|
22
24
|
--prerender-all Pre-render discovered routes after building (future
|
|
23
25
|
releases will auto-populate the remote cache)
|
|
24
26
|
--prerender-concurrency <count>
|
|
@@ -60,8 +62,6 @@ function formatDeployHelp() {
|
|
|
60
62
|
--dangerously-promote-on-cdn-warm-error
|
|
61
63
|
Promote even when ordinary staged warmup cannot be
|
|
62
64
|
verified (never bypasses --warm-cdn-certify)
|
|
63
|
-
--warm-cdn-no-promote Leave the warmed Worker version staged at 0% traffic;
|
|
64
|
-
production triggers are still applied before warming
|
|
65
65
|
--warm-cdn-promotion-delay <ms>
|
|
66
66
|
Delay before promotion after warmup (default: 15000)
|
|
67
67
|
--warm-cdn-include-fallbacks
|
|
@@ -69,16 +69,18 @@ function formatDeployHelp() {
|
|
|
69
69
|
-h, --help Show this help
|
|
70
70
|
|
|
71
71
|
Experimental:
|
|
72
|
-
--experimental-
|
|
73
|
-
|
|
74
|
-
--
|
|
75
|
-
--
|
|
72
|
+
--experimental-traffic-aware-warm-cache
|
|
73
|
+
Select CDN pre-warm routes from traffic
|
|
74
|
+
--traffic-aware-coverage <pct> Traffic coverage target, 0-100 (default: 90)
|
|
75
|
+
--traffic-aware-limit <count> Hard cap on selected routes (default: 1000)
|
|
76
|
+
--traffic-aware-window <hours> Analytics lookback window in hours (default: 24)
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
Traffic-aware warming uses Cloudflare zone analytics to select the
|
|
79
|
+
highest-traffic routes, then feeds those routes into the same staged CDN
|
|
80
|
+
pre-warming flow used by --experimental-warm-cdn-cache. It requires a custom
|
|
81
|
+
domain and a CLOUDFLARE_API_TOKEN with Zone Analytics read permission.
|
|
82
|
+
|
|
83
|
+
Legacy --experimental-tpr and --tpr-* aliases remain supported.
|
|
82
84
|
|
|
83
85
|
Workers Cache automatically uses tiered caching. Warmed entries can therefore
|
|
84
86
|
be reused outside the data center reached by the warmup request after cache
|
|
@@ -93,12 +95,16 @@ function formatDeployHelp() {
|
|
|
93
95
|
vinext-cloudflare deploy --config dist/server/wrangler.json Deploy using a generated Wrangler config
|
|
94
96
|
vinext-cloudflare deploy --dry-run Validate setup without building or deploying
|
|
95
97
|
vinext-cloudflare deploy --name my-app Deploy with a custom Worker name
|
|
98
|
+
vinext-cloudflare deploy --no-promote Upload a version without changing deployment traffic
|
|
96
99
|
vinext-cloudflare deploy --experimental-warm-cdn-cache Warm build-discovered paths during version deploy (experimental)
|
|
97
100
|
vinext-cloudflare deploy --experimental-warm-cdn-cache --warm-cdn-target https://example.com
|
|
98
101
|
Warm an explicit production origin
|
|
99
|
-
vinext-cloudflare deploy --experimental-
|
|
100
|
-
|
|
101
|
-
vinext-cloudflare deploy --experimental-
|
|
102
|
+
vinext-cloudflare deploy --experimental-traffic-aware-warm-cache
|
|
103
|
+
Enable traffic-aware warming
|
|
104
|
+
vinext-cloudflare deploy --experimental-traffic-aware-warm-cache --traffic-aware-coverage 95
|
|
105
|
+
Cover 95% of traffic
|
|
106
|
+
vinext-cloudflare deploy --experimental-traffic-aware-warm-cache --traffic-aware-limit 500
|
|
107
|
+
Cap at 500 routes
|
|
102
108
|
`;
|
|
103
109
|
}
|
|
104
110
|
function printDeployHelp() {
|
package/dist/deploy.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CdnWarmOptions, CdnWarmRequestPlan, PrerenderWarmPlan } from "./cdn-warm.js";
|
|
2
|
-
import { parseWranglerConfig } from "./
|
|
2
|
+
import { parseWranglerConfig } from "./wrangler-config.js";
|
|
3
|
+
import { TrafficEntry } from "./tpr.js";
|
|
3
4
|
import { WranglerDeploymentStatus, WranglerVersionTraffic } from "./version-deploy.js";
|
|
4
5
|
import { KVBulkPair } from "./prerender-kv-populate.js";
|
|
5
6
|
import { spawn } from "node:child_process";
|
|
6
7
|
import { VinextCacheConfig } from "vinext/internal/config/prerender";
|
|
7
8
|
import { ProjectInfo } from "vinext/internal/utils/project";
|
|
8
9
|
//#region src/deploy.d.ts
|
|
9
|
-
declare const DEFAULT_CDN_WARM_PROMOTION_DELAY_MS = 15000;
|
|
10
|
-
type DeployOptions = {
|
|
10
|
+
export declare const DEFAULT_CDN_WARM_PROMOTION_DELAY_MS = 15000;
|
|
11
|
+
export type DeployOptions = {
|
|
11
12
|
/** Project root directory */
|
|
12
13
|
root: string;
|
|
13
14
|
/** Deploy to preview environment (default: production) */
|
|
@@ -58,22 +59,22 @@ type DeployOptions = {
|
|
|
58
59
|
warmCdnReadinessProbeDelay?: number;
|
|
59
60
|
/** Promote even when staged CDN warmup cannot be completed */
|
|
60
61
|
dangerouslyPromoteOnCdnWarmError?: boolean;
|
|
61
|
-
/** Promote the
|
|
62
|
+
/** Promote the uploaded Worker version to 100% traffic (default: true) */
|
|
62
63
|
warmCdnPromote?: boolean;
|
|
63
64
|
/** Delay between successful warmup and promotion in milliseconds */
|
|
64
65
|
warmCdnPromotionDelay?: number;
|
|
65
66
|
/** Include PPR fallback-shell placeholder paths during CDN warmup */
|
|
66
67
|
warmCdnIncludeFallbacks?: boolean;
|
|
67
|
-
/**
|
|
68
|
+
/** Select CDN pre-warm routes using traffic analytics */
|
|
68
69
|
experimentalTPR?: boolean;
|
|
69
70
|
/** TPR: traffic coverage percentage target (0–100, default: 90) */
|
|
70
71
|
tprCoverage?: number;
|
|
71
|
-
/** TPR: hard cap on
|
|
72
|
+
/** TPR: hard cap on selected routes (default: 1000) */
|
|
72
73
|
tprLimit?: number;
|
|
73
74
|
/** TPR: analytics lookback window in hours (default: 24) */
|
|
74
75
|
tprWindow?: number;
|
|
75
76
|
};
|
|
76
|
-
declare function parseDeployArgs(args: string[]): {
|
|
77
|
+
export declare function parseDeployArgs(args: string[]): {
|
|
77
78
|
help: boolean;
|
|
78
79
|
preview: boolean;
|
|
79
80
|
env: string | undefined;
|
|
@@ -119,7 +120,7 @@ declare function parseDeployArgs(args: string[]): {
|
|
|
119
120
|
*
|
|
120
121
|
* Passing `undefined` is a no-op; the callback runs with `process.env` untouched.
|
|
121
122
|
*/
|
|
122
|
-
declare function withCloudflareEnv<T>(env: string | undefined, fn: () => Promise<T>): Promise<T>;
|
|
123
|
+
export declare function withCloudflareEnv<T>(env: string | undefined, fn: () => Promise<T>): Promise<T>;
|
|
123
124
|
type WranglerDeployArgs = {
|
|
124
125
|
args: string[];
|
|
125
126
|
env: string | undefined;
|
|
@@ -128,9 +129,9 @@ type WranglerKVBulkPutArgs = {
|
|
|
128
129
|
args: string[];
|
|
129
130
|
env: string | undefined;
|
|
130
131
|
};
|
|
131
|
-
declare function validateWranglerEnvName(env: string): string;
|
|
132
|
-
declare function buildWranglerDeployArgs(options: Pick<DeployOptions, "preview" | "env" | "name" | "config">): WranglerDeployArgs;
|
|
133
|
-
declare function buildWranglerKVBulkPutArgs(options: {
|
|
132
|
+
export declare function validateWranglerEnvName(env: string): string;
|
|
133
|
+
export declare function buildWranglerDeployArgs(options: Pick<DeployOptions, "preview" | "env" | "name" | "config">): WranglerDeployArgs;
|
|
134
|
+
export declare function buildWranglerKVBulkPutArgs(options: {
|
|
134
135
|
binding: string;
|
|
135
136
|
env?: string;
|
|
136
137
|
filePath: string;
|
|
@@ -141,42 +142,48 @@ declare function buildWranglerKVBulkPutArgs(options: {
|
|
|
141
142
|
* Invoking the JavaScript file through `process.execPath` avoids the `.cmd`
|
|
142
143
|
* shim and command shell that package managers create on Windows.
|
|
143
144
|
*/
|
|
144
|
-
declare function resolveWranglerBin(root: string, resolvePackageJson?: (root: string) => string | null): string;
|
|
145
|
-
declare function buildNodeCliInvocation(scriptPath: string, args: string[], nodeExecutable?: string): {
|
|
145
|
+
export declare function resolveWranglerBin(root: string, resolvePackageJson?: (root: string) => string | null): string;
|
|
146
|
+
export declare function buildNodeCliInvocation(scriptPath: string, args: string[], nodeExecutable?: string): {
|
|
146
147
|
file: string;
|
|
147
148
|
args: string[];
|
|
148
149
|
};
|
|
149
|
-
declare function buildWranglerInvocation(root: string, options: Pick<DeployOptions, "preview" | "env" | "name" | "config">, nodeExecutable?: string): {
|
|
150
|
+
export declare function buildWranglerInvocation(root: string, options: Pick<DeployOptions, "preview" | "env" | "name" | "config">, nodeExecutable?: string): {
|
|
150
151
|
file: string;
|
|
151
152
|
args: string[];
|
|
152
153
|
env: string | undefined;
|
|
153
154
|
};
|
|
154
|
-
declare function runWranglerKVBulkPut(root: string, options: {
|
|
155
|
+
export declare function runWranglerKVBulkPut(root: string, options: {
|
|
155
156
|
binding: string;
|
|
156
157
|
env?: string;
|
|
157
158
|
pairs: KVBulkPair[];
|
|
158
159
|
tempDir?: string;
|
|
159
160
|
}, execute?: typeof spawn, nodeExecutable?: string): Promise<void>;
|
|
160
|
-
declare function runWranglerDeploy(root: string, options: Pick<DeployOptions, "preview" | "env" | "name" | "config"
|
|
161
|
-
|
|
161
|
+
export declare function runWranglerDeploy(root: string, options: Pick<DeployOptions, "preview" | "env" | "name" | "config" | "verbose"> & {
|
|
162
|
+
promote?: boolean;
|
|
163
|
+
}, execute?: typeof spawn): Promise<string>;
|
|
164
|
+
export declare function hasCdnWarmRequests(plan: Omit<CdnWarmRequestPlan, "pagesDataPaths"> & {
|
|
162
165
|
pagesDataPaths?: readonly string[];
|
|
163
166
|
}): boolean;
|
|
164
|
-
declare function
|
|
165
|
-
|
|
167
|
+
export declare function selectTPRWarmPlan(plan: PrerenderWarmPlan, traffic: readonly TrafficEntry[], coverage: number, limit: number): PrerenderWarmPlan;
|
|
168
|
+
export declare function projectRequiresRouteCacheabilityProbeManifest(project: Pick<ProjectInfo, "isAppRouter" | "isPagesRouter">, cacheConfig: VinextCacheConfig | null): boolean;
|
|
169
|
+
type CdnWarmDeployOptions = Pick<DeployOptions, "preview" | "env" | "name" | "config" | "verbose" | "warmCdnTarget" | "warmCdnConcurrency" | "warmCdnTimeout" | "warmCdnRetries" | "warmCdnDiscoveryTimeout" | "warmCdnDiscoveryRetries" | "warmCdnProbeTimeout" | "warmCdnProbeRetries" | "warmCdnCertify" | "warmCdnReadinessTimeout" | "warmCdnReadinessRetries" | "warmCdnReadinessProbes" | "warmCdnReadinessProbeDelay" | "dangerouslyPromoteOnCdnWarmError" | "warmCdnPromote" | "warmCdnPromotionDelay"> & Pick<CdnWarmOptions, "deploymentId" | "expectedBuildId" | "expectedRscBuildId" | "loadingShellPaths" | "pagesDataPaths" | "routeHandlerPaths" | "routePatterns" | "rscPaths" | "statusSource"> & {
|
|
170
|
+
/** Allow optional route selection to discover no warmable requests. */
|
|
171
|
+
allowEmptyWarmPlan?: boolean;
|
|
166
172
|
/** Probe a staged Worker and upload the resulting manifest as a second version. */
|
|
167
173
|
cacheabilityProbe?: boolean;
|
|
168
174
|
discoverWarmPlan?: (target: {
|
|
169
175
|
headers?: HeadersInit;
|
|
170
176
|
targetUrl: string;
|
|
171
177
|
}) => Promise<PrerenderWarmPlan>;
|
|
178
|
+
/** Narrow the final warm requests without changing discovery or probe metadata. */
|
|
179
|
+
selectWarmPlan?: (plan: PrerenderWarmPlan) => PrerenderWarmPlan;
|
|
172
180
|
};
|
|
173
|
-
declare function deployWithCdnWarmup(root: string, paths: readonly string[], options: CdnWarmDeployOptions): Promise<string>;
|
|
174
|
-
declare function resolveCdnWarmupTargetUrl(root: string, deployedUrl: string | null): string | null;
|
|
175
|
-
declare function resolveCdnWarmupTargetUrl(root: string, deployedUrl: string | null, options: Pick<DeployOptions, "preview" | "env" | "config" | "warmCdnTarget">): string | null;
|
|
176
|
-
declare function getZeroPercentStagingTraffic(deployment: WranglerDeploymentStatus | null, versionId: string): WranglerVersionTraffic[] | null;
|
|
181
|
+
export declare function deployWithCdnWarmup(root: string, paths: readonly string[], options: CdnWarmDeployOptions): Promise<string>;
|
|
182
|
+
export declare function resolveCdnWarmupTargetUrl(root: string, deployedUrl: string | null): string | null;
|
|
183
|
+
export declare function resolveCdnWarmupTargetUrl(root: string, deployedUrl: string | null, options: Pick<DeployOptions, "preview" | "env" | "config" | "warmCdnTarget">): string | null;
|
|
184
|
+
export declare function getZeroPercentStagingTraffic(deployment: WranglerDeploymentStatus | null, versionId: string): WranglerVersionTraffic[] | null;
|
|
177
185
|
type ParsedWranglerConfig = NonNullable<ReturnType<typeof parseWranglerConfig>>;
|
|
178
|
-
declare function resolveWorkerNameForVersionOverride(config: ParsedWranglerConfig | null, options: Pick<DeployOptions, "preview" | "env" | "name">): string | undefined;
|
|
179
|
-
declare function buildVersionOverrideHeaders(workerName: string | undefined, versionId: string): HeadersInit | undefined;
|
|
180
|
-
declare function deploy(options: DeployOptions): Promise<void>;
|
|
181
|
-
//#endregion
|
|
182
|
-
export { DEFAULT_CDN_WARM_PROMOTION_DELAY_MS, DeployOptions, buildNodeCliInvocation, buildVersionOverrideHeaders, buildWranglerDeployArgs, buildWranglerInvocation, buildWranglerKVBulkPutArgs, deploy, deployWithCdnWarmup, getZeroPercentStagingTraffic, hasCdnWarmRequests, parseDeployArgs, projectRequiresRouteCacheabilityProbeManifest, resolveCdnWarmupTargetUrl, resolveWorkerNameForVersionOverride, resolveWranglerBin, runWranglerDeploy, runWranglerKVBulkPut, validateWranglerEnvName, withCloudflareEnv };
|
|
186
|
+
export declare function resolveWorkerNameForVersionOverride(config: ParsedWranglerConfig | null, options: Pick<DeployOptions, "preview" | "env" | "name">): string | undefined;
|
|
187
|
+
export declare function buildVersionOverrideHeaders(workerName: string | undefined, versionId: string): HeadersInit | undefined;
|
|
188
|
+
export declare function deploy(options: DeployOptions): Promise<void>;
|
|
189
|
+
//#endregion
|