wrangler 4.141.0 → 4.143.0
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.
|
@@ -1,282 +1,8 @@
|
|
|
1
|
-
//#region ../config/dist/public-CvUXcSEm.mjs
|
|
2
|
-
const bindings = {
|
|
3
|
-
agentMemory: (options) => ({
|
|
4
|
-
type: "agent-memory",
|
|
5
|
-
...options
|
|
6
|
-
}),
|
|
7
|
-
ai: (options) => ({
|
|
8
|
-
type: "ai",
|
|
9
|
-
...options
|
|
10
|
-
}),
|
|
11
|
-
aiSearch: (options) => ({
|
|
12
|
-
type: "ai-search",
|
|
13
|
-
...options
|
|
14
|
-
}),
|
|
15
|
-
aiSearchNamespace: (options) => ({
|
|
16
|
-
type: "ai-search-namespace",
|
|
17
|
-
...options
|
|
18
|
-
}),
|
|
19
|
-
analyticsEngineDataset: (options) => ({
|
|
20
|
-
type: "analytics-engine-dataset",
|
|
21
|
-
...options
|
|
22
|
-
}),
|
|
23
|
-
artifacts: (options) => ({
|
|
24
|
-
type: "artifacts",
|
|
25
|
-
...options
|
|
26
|
-
}),
|
|
27
|
-
assets: () => ({ type: "assets" }),
|
|
28
|
-
browser: (options) => ({
|
|
29
|
-
type: "browser",
|
|
30
|
-
...options
|
|
31
|
-
}),
|
|
32
|
-
d1: (options) => ({
|
|
33
|
-
type: "d1",
|
|
34
|
-
...options
|
|
35
|
-
}),
|
|
36
|
-
dispatchNamespace: (options) => ({
|
|
37
|
-
type: "dispatch-namespace",
|
|
38
|
-
...options
|
|
39
|
-
}),
|
|
40
|
-
durableObject: (options) => ({
|
|
41
|
-
type: "durable-object",
|
|
42
|
-
...options
|
|
43
|
-
}),
|
|
44
|
-
flagship: (options) => ({
|
|
45
|
-
type: "flagship",
|
|
46
|
-
...options
|
|
47
|
-
}),
|
|
48
|
-
hyperdrive: (options) => ({
|
|
49
|
-
type: "hyperdrive",
|
|
50
|
-
...options
|
|
51
|
-
}),
|
|
52
|
-
images: (options) => ({
|
|
53
|
-
type: "images",
|
|
54
|
-
...options
|
|
55
|
-
}),
|
|
56
|
-
json: (value) => ({
|
|
57
|
-
type: "json",
|
|
58
|
-
value
|
|
59
|
-
}),
|
|
60
|
-
kv: (options) => ({
|
|
61
|
-
type: "kv",
|
|
62
|
-
...options
|
|
63
|
-
}),
|
|
64
|
-
logfwdr: (options) => ({
|
|
65
|
-
type: "logfwdr",
|
|
66
|
-
...options
|
|
67
|
-
}),
|
|
68
|
-
media: (options) => ({
|
|
69
|
-
type: "media",
|
|
70
|
-
...options
|
|
71
|
-
}),
|
|
72
|
-
mtlsCertificate: (options) => ({
|
|
73
|
-
type: "mtls-certificate",
|
|
74
|
-
...options
|
|
75
|
-
}),
|
|
76
|
-
pipeline: (options) => ({
|
|
77
|
-
type: "pipeline",
|
|
78
|
-
...options
|
|
79
|
-
}),
|
|
80
|
-
queue: (options) => ({
|
|
81
|
-
type: "queue",
|
|
82
|
-
...options
|
|
83
|
-
}),
|
|
84
|
-
rateLimit: (options) => ({
|
|
85
|
-
type: "rate-limit",
|
|
86
|
-
...options
|
|
87
|
-
}),
|
|
88
|
-
r2: (options) => ({
|
|
89
|
-
type: "r2",
|
|
90
|
-
...options
|
|
91
|
-
}),
|
|
92
|
-
secret: () => ({ type: "secret" }),
|
|
93
|
-
secretsStoreSecret: (options) => ({
|
|
94
|
-
type: "secrets-store-secret",
|
|
95
|
-
...options
|
|
96
|
-
}),
|
|
97
|
-
sendEmail: (options) => ({
|
|
98
|
-
type: "send-email",
|
|
99
|
-
...options
|
|
100
|
-
}),
|
|
101
|
-
stream: (options) => ({
|
|
102
|
-
type: "stream",
|
|
103
|
-
...options
|
|
104
|
-
}),
|
|
105
|
-
text: (value) => ({
|
|
106
|
-
type: "text",
|
|
107
|
-
value
|
|
108
|
-
}),
|
|
109
|
-
vectorize: (options) => ({
|
|
110
|
-
type: "vectorize",
|
|
111
|
-
...options
|
|
112
|
-
}),
|
|
113
|
-
versionMetadata: () => ({ type: "version-metadata" }),
|
|
114
|
-
vpcService: (options) => ({
|
|
115
|
-
type: "vpc-service",
|
|
116
|
-
...options
|
|
117
|
-
}),
|
|
118
|
-
vpcNetwork: (options) => ({
|
|
119
|
-
type: "vpc-network",
|
|
120
|
-
...options
|
|
121
|
-
}),
|
|
122
|
-
worker: (options) => ({
|
|
123
|
-
type: "worker",
|
|
124
|
-
...options
|
|
125
|
-
}),
|
|
126
|
-
workerLoader: () => ({ type: "worker-loader" })
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Triggers builder for configuring event triggers.
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* import { defineConfig, triggers } from "@cloudflare/config";
|
|
134
|
-
*
|
|
135
|
-
* export default defineConfig({
|
|
136
|
-
* worker: {
|
|
137
|
-
* name: "my-worker",
|
|
138
|
-
* compatibilityDate: "2026-09-17",
|
|
139
|
-
* triggers: [
|
|
140
|
-
* triggers.fetch({ pattern: "example.com/*", zone: "example.com" }),
|
|
141
|
-
* triggers.queue({ name: "my-queue" }),
|
|
142
|
-
* triggers.scheduled({ schedule: "0 * * * *" }),
|
|
143
|
-
* triggers.scheduled({ schedule: "30 0 * * *" }),
|
|
144
|
-
* triggers.email({ addresses: ["support@example.com"] }),
|
|
145
|
-
* triggers.connect({ protocol: "tcp", port: 5432 }),
|
|
146
|
-
* ],
|
|
147
|
-
* },
|
|
148
|
-
* });
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
const triggers = {
|
|
152
|
-
fetch: (options) => ({
|
|
153
|
-
type: "fetch",
|
|
154
|
-
...options
|
|
155
|
-
}),
|
|
156
|
-
queue: (options) => ({
|
|
157
|
-
type: "queue",
|
|
158
|
-
...options
|
|
159
|
-
}),
|
|
160
|
-
scheduled: (options) => ({
|
|
161
|
-
type: "scheduled",
|
|
162
|
-
...options
|
|
163
|
-
}),
|
|
164
|
-
email: (options) => ({
|
|
165
|
-
type: "email",
|
|
166
|
-
...options
|
|
167
|
-
}),
|
|
168
|
-
connect: (options) => ({
|
|
169
|
-
type: "connect",
|
|
170
|
-
...options
|
|
171
|
-
})
|
|
172
|
-
};
|
|
173
|
-
function durableObject(options) {
|
|
174
|
-
return {
|
|
175
|
-
type: "durable-object",
|
|
176
|
-
...options
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
function worker(options = {}) {
|
|
180
|
-
return {
|
|
181
|
-
type: "worker",
|
|
182
|
-
...options
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function workflow(options) {
|
|
186
|
-
return {
|
|
187
|
-
type: "workflow",
|
|
188
|
-
...options
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Exports builder for configuring Worker exports.
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```typescript
|
|
196
|
-
* import { defineConfig, defineContainer, defineWorker, exports } from "@cloudflare/config";
|
|
197
|
-
*
|
|
198
|
-
* const myContainer = defineContainer({
|
|
199
|
-
* name: "my-container",
|
|
200
|
-
* image: { dockerfile: "./Dockerfile" },
|
|
201
|
-
* });
|
|
202
|
-
*
|
|
203
|
-
* const worker = defineWorker({
|
|
204
|
-
* exports: {
|
|
205
|
-
* MyDurableObject: exports.durableObject({ storage: "sqlite" }),
|
|
206
|
-
* MyContainerDO: exports.durableObject({ storage: "sqlite", container: myContainer }),
|
|
207
|
-
* OldClass: exports.durableObject({ state: "deleted" }),
|
|
208
|
-
* OldName: exports.durableObject({ state: "renamed", renamedTo: "NewName" }),
|
|
209
|
-
* Outgoing: exports.durableObject({ state: "transferred", transferredTo: "target-worker" }),
|
|
210
|
-
* Incoming: exports.durableObject({ state: "expecting-transfer", storage: "sqlite", transferFrom: "source-worker" }),
|
|
211
|
-
* MyWorkflow: exports.workflow({ name: "my-workflow", limits: { steps: 100 }, schedules: "0 * * * *" }),
|
|
212
|
-
* },
|
|
213
|
-
* });
|
|
214
|
-
*
|
|
215
|
-
* export default defineConfig({ worker, containers: [myContainer] });
|
|
216
|
-
* ```
|
|
217
|
-
*/
|
|
218
|
-
const exports = {
|
|
219
|
-
durableObject,
|
|
220
|
-
worker,
|
|
221
|
-
workflow
|
|
222
|
-
};
|
|
223
|
-
/** Create a type-safe identity helper for a configuration value or factory. */
|
|
224
|
-
function createConfigDefiner() {
|
|
225
|
-
return function define(config) {
|
|
226
|
-
return config;
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Used to define the default export in `cloudflare.config.ts`.
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* ```typescript
|
|
234
|
-
* import { defineConfig } from "@cloudflare/config";
|
|
235
|
-
*
|
|
236
|
-
* export default defineConfig({
|
|
237
|
-
* worker: {
|
|
238
|
-
* name: "my-worker",
|
|
239
|
-
* compatibilityDate: "2026-09-17",
|
|
240
|
-
* },
|
|
241
|
-
* });
|
|
242
|
-
* ```
|
|
243
|
-
*/
|
|
244
|
-
const defineConfig = createConfigDefiner();
|
|
245
|
-
/**
|
|
246
|
-
* Define a Container.
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* ```typescript
|
|
250
|
-
* import { defineContainer } from "@cloudflare/config";
|
|
251
|
-
*
|
|
252
|
-
* const container = defineContainer({
|
|
253
|
-
* name: "my-container",
|
|
254
|
-
* image: { dockerfile: "./Dockerfile" },
|
|
255
|
-
* });
|
|
256
|
-
* ```
|
|
257
|
-
*/
|
|
258
|
-
const defineContainer = createConfigDefiner();
|
|
259
|
-
/**
|
|
260
|
-
* Define a Worker.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```typescript
|
|
264
|
-
* import { defineWorker } from "@cloudflare/config";
|
|
265
|
-
*
|
|
266
|
-
* const worker = defineWorker({
|
|
267
|
-
* name: "my-worker",
|
|
268
|
-
* compatibilityDate: "2026-09-17",
|
|
269
|
-
* });
|
|
270
|
-
* ```
|
|
271
|
-
*/
|
|
272
|
-
const defineWorker = createConfigDefiner();
|
|
273
|
-
|
|
274
|
-
//#endregion
|
|
275
1
|
//#region src/experimental-config/wrangler-definition.ts
|
|
276
2
|
function defineWranglerConfig(config) {
|
|
277
3
|
return config;
|
|
278
4
|
}
|
|
279
5
|
|
|
280
6
|
//#endregion
|
|
281
|
-
export {
|
|
7
|
+
export { defineWranglerConfig };
|
|
282
8
|
//# sourceMappingURL=experimental-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental-config.mjs","names":[],"sources":["
|
|
1
|
+
{"version":3,"file":"experimental-config.mjs","names":[],"sources":["../src/experimental-config/wrangler-definition.ts"],"sourcesContent":["import type { WranglerConfig } from \"./types\";\nimport type { ConfigContext } from \"@cloudflare/config/public\";\n\nexport type WranglerConfigExport =\n\t| WranglerConfig\n\t| Promise<WranglerConfig>\n\t| ((ctx: ConfigContext) => WranglerConfig | Promise<WranglerConfig>);\n\nexport function defineWranglerConfig(\n\tconfig: WranglerConfigExport\n): WranglerConfigExport {\n\treturn config;\n}\n\nexport async function resolveWranglerConfig(\n\tdef: unknown,\n\tctx: ConfigContext\n): Promise<unknown> {\n\tlet raw = def;\n\tif (typeof raw === \"function\") {\n\t\traw = (raw as (ctx: ConfigContext) => unknown)(ctx);\n\t}\n\treturn await raw;\n}\n"],"mappings":";AAQA,SAAgB,qBACf,QACuB;AACvB,QAAO"}
|