-
Notifications
You must be signed in to change notification settings - Fork 198
/
wrangler.ts
99 lines (96 loc) 路 2.58 KB
/
wrangler.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { CompatibilityFlag } from "./compat";
import { ModuleRuleType } from "./runner";
// See https://developers.cloudflare.com/workers/cli-wrangler/configuration#keys
export interface WranglerEnvironmentConfig {
name?: string; // inherited
zone_id?: string; // inherited
account_id?: string; // inherited
workers_dev?: boolean; // inherited
route?: string; // NOT inherited
routes?: string[]; // NOT inherited
webpack_config?: string; // inherited
vars?: Record<string, any>; // NOT inherited
kv_namespaces?: {
binding: string;
id?: string;
preview_id?: string;
}[]; // NOT inherited
site?: {
bucket: string;
"entry-point"?: string;
include?: string[];
exclude?: string[];
}; // inherited
durable_objects?: {
bindings?: {
name: string;
class_name: string;
script_name?: string;
}[];
}; // (probably) NOT inherited
triggers?: {
crons?: string[];
}; // inherited
usage_model?: "bundled" | "unbound"; // inherited
wasm_modules?: Record<string, string>; // (probably) inherited
text_blobs?: Record<string, string>;
experimental_services?: {
name: string;
service: string;
environment: string;
}[]; // (probably) NOT inherited
miniflare?: {
globals?: Record<string, any>;
upstream?: string;
watch?: boolean;
build_watch_dirs?: string[];
kv_persist?: boolean | string;
cache?: boolean;
cache_persist?: boolean | string;
durable_objects_persist?: boolean | string;
env_path?: string;
host?: string;
port?: number;
open?: boolean | string;
cf_fetch?: boolean | string;
https?:
| boolean
| string
| {
key?: string;
cert?: string;
ca?: string;
pfx?: string;
passphrase?: string;
};
live_reload?: boolean;
update_check?: boolean;
mounts?: Record<string, string>;
route?: string;
routes?: string[];
global_async_io?: boolean;
global_timers?: boolean;
global_random?: boolean;
}; // inherited
}
export interface WranglerConfig extends WranglerEnvironmentConfig {
type?: "javascript" | "webpack" | "rust"; // top level
compatibility_date?: string;
compatibility_flags?: CompatibilityFlag[];
build?: {
command?: string;
cwd?: string;
watch_dir?: string;
upload?: {
format?: "service-worker" | "modules";
dir?: string;
main?: string;
rules?: {
type: ModuleRuleType;
globs: string[];
fallthrough?: boolean;
}[];
};
}; // top level
env?: Record<string, WranglerEnvironmentConfig>;
}