wrangler 0.0.0-bfbe49d0 → 0.0.0-bfc9a3e9
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/package.json +209 -195
- package/templates/middleware/middleware-miniflare3-json-error.ts +1 -0
- package/templates/middleware/middleware-multiworker-dev.ts +37 -28
- package/templates/modules-watch-stub.js +4 -0
- package/wrangler-dist/cli.d.ts +62 -5
- package/wrangler-dist/cli.js +30454 -27466
- package/wrangler-dist/wasm-sync.wasm +0 -0
- package/templates/middleware/middleware-d1-beta.ts +0 -244
package/package.json
CHANGED
|
@@ -1,196 +1,210 @@
|
|
|
1
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
2
|
+
"name": "wrangler",
|
|
3
|
+
"version": "0.0.0-bfc9a3e9",
|
|
4
|
+
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"wrangler",
|
|
7
|
+
"cloudflare",
|
|
8
|
+
"workers",
|
|
9
|
+
"cloudflare workers",
|
|
10
|
+
"edge",
|
|
11
|
+
"compute",
|
|
12
|
+
"serverless",
|
|
13
|
+
"serverless application",
|
|
14
|
+
"serverless module",
|
|
15
|
+
"wasm",
|
|
16
|
+
"web",
|
|
17
|
+
"assembly",
|
|
18
|
+
"webassembly",
|
|
19
|
+
"rust",
|
|
20
|
+
"emscripten",
|
|
21
|
+
"typescript",
|
|
22
|
+
"graphql",
|
|
23
|
+
"router",
|
|
24
|
+
"http",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"homepage": "https://github.com/cloudflare/workers-sdk#readme",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/cloudflare/workers-sdk/issues"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/cloudflare/workers-sdk.git",
|
|
34
|
+
"directory": "packages/wrangler"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT OR Apache-2.0",
|
|
37
|
+
"author": "wrangler@cloudflare.com",
|
|
38
|
+
"main": "wrangler-dist/cli.js",
|
|
39
|
+
"types": "wrangler-dist/cli.d.ts",
|
|
40
|
+
"bin": {
|
|
41
|
+
"wrangler": "./bin/wrangler.js",
|
|
42
|
+
"wrangler2": "./bin/wrangler.js"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"bin",
|
|
46
|
+
"miniflare-dist",
|
|
47
|
+
"wrangler-dist",
|
|
48
|
+
"templates",
|
|
49
|
+
"kv-asset-handler.js",
|
|
50
|
+
"Cloudflare_CA.pem"
|
|
51
|
+
],
|
|
52
|
+
"jest": {
|
|
53
|
+
"coverageReporters": [
|
|
54
|
+
"json",
|
|
55
|
+
"html",
|
|
56
|
+
"text",
|
|
57
|
+
"cobertura"
|
|
58
|
+
],
|
|
59
|
+
"moduleNameMapper": {
|
|
60
|
+
"clipboardy": "<rootDir>/src/__tests__/helpers/clipboardy-mock.js",
|
|
61
|
+
"miniflare/cli": "<rootDir>/../../node_modules/miniflare/dist/src/cli.js"
|
|
62
|
+
},
|
|
63
|
+
"restoreMocks": true,
|
|
64
|
+
"setupFilesAfterEnv": [
|
|
65
|
+
"<rootDir>/src/__tests__/jest.setup.ts"
|
|
66
|
+
],
|
|
67
|
+
"testRegex": "src/__tests__/.*\\.(test|spec)\\.[jt]sx?$",
|
|
68
|
+
"testTimeout": 50000,
|
|
69
|
+
"transform": {
|
|
70
|
+
"^.+\\.c?(t|j)sx?$": [
|
|
71
|
+
"esbuild-jest",
|
|
72
|
+
{
|
|
73
|
+
"sourcemap": true
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"transformIgnorePatterns": [
|
|
78
|
+
"node_modules/.pnpm/(?!find-up|locate-path|p-locate|p-limit|p-timeout|p-queue|yocto-queue|path-exists|execa|strip-final-newline|npm-run-path|path-key|onetime|mimic-fn|human-signals|is-stream|get-port|supports-color|pretty-bytes|npx-import)"
|
|
79
|
+
],
|
|
80
|
+
"snapshotFormat": {
|
|
81
|
+
"escapeString": true,
|
|
82
|
+
"printBasicPrototype": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@cloudflare/kv-asset-handler": "^0.2.0",
|
|
87
|
+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
88
|
+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
89
|
+
"blake3-wasm": "^2.1.5",
|
|
90
|
+
"chokidar": "^3.5.3",
|
|
91
|
+
"esbuild": "0.17.19",
|
|
92
|
+
"miniflare": "3.20231010.0",
|
|
93
|
+
"nanoid": "^3.3.3",
|
|
94
|
+
"path-to-regexp": "^6.2.0",
|
|
95
|
+
"selfsigned": "^2.0.1",
|
|
96
|
+
"source-map": "0.6.1",
|
|
97
|
+
"source-map-support": "0.5.21",
|
|
98
|
+
"xxhash-wasm": "^1.0.1"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@cloudflare/eslint-config-worker": "*",
|
|
102
|
+
"@cloudflare/types": "^6.18.4",
|
|
103
|
+
"@cloudflare/workers-types": "^4.20230914.0",
|
|
104
|
+
"@iarna/toml": "^3.0.0",
|
|
105
|
+
"@microsoft/api-extractor": "^7.28.3",
|
|
106
|
+
"@types/body-parser": "^1.19.2",
|
|
107
|
+
"@types/busboy": "^1.5.0",
|
|
108
|
+
"@types/command-exists": "^1.2.0",
|
|
109
|
+
"@types/express": "^4.17.13",
|
|
110
|
+
"@types/glob-to-regexp": "0.4.1",
|
|
111
|
+
"@types/is-ci": "^3.0.0",
|
|
112
|
+
"@types/javascript-time-ago": "^2.0.3",
|
|
113
|
+
"@types/jest": "^29.5.5",
|
|
114
|
+
"@types/mime": "^2.0.3",
|
|
115
|
+
"@types/minimatch": "^5.1.2",
|
|
116
|
+
"@types/prompts": "^2.0.14",
|
|
117
|
+
"@types/react": "^17.0.37",
|
|
118
|
+
"@types/serve-static": "^1.13.10",
|
|
119
|
+
"@types/shell-quote": "^1.7.2",
|
|
120
|
+
"@types/signal-exit": "^3.0.1",
|
|
121
|
+
"@types/source-map-support": "^0.5.7",
|
|
122
|
+
"@types/supports-color": "^8.1.1",
|
|
123
|
+
"@types/ws": "^8.5.3",
|
|
124
|
+
"@types/yargs": "^17.0.10",
|
|
125
|
+
"@webcontainer/env": "^1.1.0",
|
|
126
|
+
"body-parser": "^1.20.0",
|
|
127
|
+
"chalk": "^2.4.2",
|
|
128
|
+
"cli-table3": "^0.6.3",
|
|
129
|
+
"clipboardy": "^3.0.0",
|
|
130
|
+
"cmd-shim": "^4.1.0",
|
|
131
|
+
"command-exists": "^1.2.9",
|
|
132
|
+
"concurrently": "^7.2.2",
|
|
133
|
+
"devtools-protocol": "^0.0.955664",
|
|
134
|
+
"dotenv": "^16.0.0",
|
|
135
|
+
"esbuild-jest": "0.5.0",
|
|
136
|
+
"execa": "^6.1.0",
|
|
137
|
+
"express": "^4.18.1",
|
|
138
|
+
"finalhandler": "^1.2.0",
|
|
139
|
+
"find-up": "^6.3.0",
|
|
140
|
+
"get-port": "^6.1.2",
|
|
141
|
+
"glob-to-regexp": "0.4.1",
|
|
142
|
+
"http-terminator": "^3.2.0",
|
|
143
|
+
"ignore": "^5.2.0",
|
|
144
|
+
"ink": "^3.2.0",
|
|
145
|
+
"ink-select-input": "^4.2.1",
|
|
146
|
+
"ink-spinner": "^4.0.3",
|
|
147
|
+
"ink-table": "^3.0.0",
|
|
148
|
+
"ink-testing-library": "^2.1.0",
|
|
149
|
+
"ink-text-input": "^4.0.3",
|
|
150
|
+
"is-ci": "^3.0.1",
|
|
151
|
+
"javascript-time-ago": "^2.5.4",
|
|
152
|
+
"jest": "^29.7.0",
|
|
153
|
+
"jest-fetch-mock": "^3.0.3",
|
|
154
|
+
"jest-websocket-mock": "^2.5.0",
|
|
155
|
+
"mime": "^3.0.0",
|
|
156
|
+
"minimatch": "^5.1.0",
|
|
157
|
+
"msw": "^0.49.1",
|
|
158
|
+
"npx-import": "^1.1.3",
|
|
159
|
+
"open": "^8.4.0",
|
|
160
|
+
"p-queue": "^7.2.0",
|
|
161
|
+
"patch-console": "^1.0.0",
|
|
162
|
+
"pretty-bytes": "^6.0.0",
|
|
163
|
+
"prompts": "^2.4.2",
|
|
164
|
+
"react": "^17.0.2",
|
|
165
|
+
"react-error-boundary": "^3.1.4",
|
|
166
|
+
"remove-accents-esm": "^0.0.1",
|
|
167
|
+
"semiver": "^1.1.0",
|
|
168
|
+
"serve-static": "^1.15.0",
|
|
169
|
+
"shell-quote": "^1.8.1",
|
|
170
|
+
"shellac": "^0.8.0",
|
|
171
|
+
"signal-exit": "^3.0.7",
|
|
172
|
+
"strip-ansi": "^7.0.1",
|
|
173
|
+
"supports-color": "^9.2.2",
|
|
174
|
+
"timeago.js": "^4.0.2",
|
|
175
|
+
"tmp-promise": "^3.0.3",
|
|
176
|
+
"ts-dedent": "^2.2.0",
|
|
177
|
+
"undici": "5.20.0",
|
|
178
|
+
"update-check": "^1.5.4",
|
|
179
|
+
"vitest": "^0.34.4",
|
|
180
|
+
"ws": "^8.5.0",
|
|
181
|
+
"xdg-app-paths": "^8.3.0",
|
|
182
|
+
"yargs": "^17.4.1",
|
|
183
|
+
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
184
|
+
"@cloudflare/pages-shared": "^0.10.0",
|
|
185
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
|
186
|
+
},
|
|
187
|
+
"optionalDependencies": {
|
|
188
|
+
"fsevents": "~2.3.2"
|
|
189
|
+
},
|
|
190
|
+
"engines": {
|
|
191
|
+
"node": ">=16.13.0"
|
|
192
|
+
},
|
|
193
|
+
"scripts": {
|
|
194
|
+
"assert-git-version": "node -r esbuild-register scripts/assert-git-version.ts",
|
|
195
|
+
"build": "pnpm run clean && pnpm run bundle && pnpm run emit-types",
|
|
196
|
+
"bundle": "node -r esbuild-register scripts/bundle.ts",
|
|
197
|
+
"check:lint": "eslint .",
|
|
198
|
+
"check:type": "tsc",
|
|
199
|
+
"clean": "rimraf wrangler-dist miniflare-dist emitted-types",
|
|
200
|
+
"dev": "pnpm run clean && concurrently -c black,blue --kill-others-on-fail false 'pnpm run bundle --watch' 'pnpm run check:type --watch --preserveWatchOutput'",
|
|
201
|
+
"emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
|
|
202
|
+
"start": "pnpm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
|
|
203
|
+
"test": "pnpm run assert-git-version && jest",
|
|
204
|
+
"test:ci": "pnpm run test --coverage",
|
|
205
|
+
"test:debug": "pnpm run test --silent=false --verbose=true",
|
|
206
|
+
"test:e2e": "vitest --test-timeout 240000 --single-thread --dir ./e2e run",
|
|
207
|
+
"test:watch": "pnpm run test --runInBand --testTimeout=50000 --watch",
|
|
208
|
+
"type:tests": "tsc -p ./src/__tests__/tsconfig.json && tsc -p ./e2e/tsconfig.json"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -4,6 +4,42 @@
|
|
|
4
4
|
import { workers } from "config:middleware/multiworker-dev";
|
|
5
5
|
import type { WorkerRegistry } from "../../src/dev-registry";
|
|
6
6
|
|
|
7
|
+
class Fetcher {
|
|
8
|
+
#name: string;
|
|
9
|
+
#details: WorkerRegistry[string];
|
|
10
|
+
constructor(name: string, details: WorkerRegistry[string]) {
|
|
11
|
+
this.#name = name;
|
|
12
|
+
this.#details = details;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async fetch(...reqArgs: Parameters<Fetcher["fetch"]>) {
|
|
16
|
+
const reqFromArgs = new Request(...reqArgs);
|
|
17
|
+
if (this.#details.headers) {
|
|
18
|
+
for (const [key, value] of Object.entries(this.#details.headers)) {
|
|
19
|
+
// In remote mode, you need to add a couple of headers
|
|
20
|
+
// to make sure it's talking to the 'dev' preview session
|
|
21
|
+
// (much like wrangler dev already does via proxy.ts)
|
|
22
|
+
reqFromArgs.headers.set(key, value);
|
|
23
|
+
}
|
|
24
|
+
return (env[this.#name] as Fetcher).fetch(reqFromArgs);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const url = new URL(reqFromArgs.url);
|
|
28
|
+
if (this.#details.protocol !== undefined) {
|
|
29
|
+
url.protocol = this.#details.protocol;
|
|
30
|
+
}
|
|
31
|
+
if (this.#details.host !== undefined) {
|
|
32
|
+
url.host = this.#details.host;
|
|
33
|
+
}
|
|
34
|
+
if (this.#details.port !== undefined) {
|
|
35
|
+
url.port = this.#details.port.toString();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const request = new Request(url.toString(), reqFromArgs);
|
|
39
|
+
return fetch(request);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
7
43
|
export function wrap(env: Record<string, unknown>) {
|
|
8
44
|
const facadeEnv = { ...env };
|
|
9
45
|
// For every Worker definition that's available,
|
|
@@ -14,34 +50,7 @@ export function wrap(env: Record<string, unknown>) {
|
|
|
14
50
|
|
|
15
51
|
for (const [name, details] of Object.entries(workers as WorkerRegistry)) {
|
|
16
52
|
if (details) {
|
|
17
|
-
facadeEnv[name] =
|
|
18
|
-
async fetch(...reqArgs: Parameters<Fetcher["fetch"]>) {
|
|
19
|
-
const reqFromArgs = new Request(...reqArgs);
|
|
20
|
-
if (details.headers) {
|
|
21
|
-
for (const [key, value] of Object.entries(details.headers)) {
|
|
22
|
-
// In remote mode, you need to add a couple of headers
|
|
23
|
-
// to make sure it's talking to the 'dev' preview session
|
|
24
|
-
// (much like wrangler dev already does via proxy.ts)
|
|
25
|
-
reqFromArgs.headers.set(key, value);
|
|
26
|
-
}
|
|
27
|
-
return (env[name] as Fetcher).fetch(reqFromArgs);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const url = new URL(reqFromArgs.url);
|
|
31
|
-
if (details.protocol !== undefined) {
|
|
32
|
-
url.protocol = details.protocol;
|
|
33
|
-
}
|
|
34
|
-
if (details.host !== undefined) {
|
|
35
|
-
url.host = details.host;
|
|
36
|
-
}
|
|
37
|
-
if (details.port !== undefined) {
|
|
38
|
-
url.port = details.port.toString();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const request = new Request(url.toString(), reqFromArgs);
|
|
42
|
-
return fetch(request);
|
|
43
|
-
},
|
|
44
|
-
};
|
|
53
|
+
facadeEnv[name] = new Fetcher(name, details);
|
|
45
54
|
} else {
|
|
46
55
|
// This means there's no dev binding available.
|
|
47
56
|
// Let's use whatever's available, or put a shim with a message.
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Readable } from 'stream';
|
|
|
10
10
|
import { ReadableStream as ReadableStream_2 } from 'stream/web';
|
|
11
11
|
import { Socket as Socket_2 } from 'net';
|
|
12
12
|
import { TcpNetConnectOpts } from 'net';
|
|
13
|
-
import { TlsOptions } from 'tls';
|
|
13
|
+
import { TlsOptions as TlsOptions_2 } from 'tls';
|
|
14
14
|
import { TLSSocket } from 'tls';
|
|
15
15
|
import { URL as URL_2 } from 'url';
|
|
16
16
|
import { URLSearchParams as URLSearchParams_2 } from 'url';
|
|
@@ -149,6 +149,15 @@ declare interface CfModule {
|
|
|
149
149
|
* './src/index.js'
|
|
150
150
|
*/
|
|
151
151
|
name: string;
|
|
152
|
+
/**
|
|
153
|
+
* The absolute path of the module on disk, or `undefined` if this is a
|
|
154
|
+
* virtual module. Used as the source URL for this module, so source maps are
|
|
155
|
+
* correctly resolved.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* '/path/to/src/index.js'
|
|
159
|
+
*/
|
|
160
|
+
filePath: string | undefined;
|
|
152
161
|
/**
|
|
153
162
|
* The module content, usually JavaScript or WASM code.
|
|
154
163
|
*
|
|
@@ -205,7 +214,7 @@ declare namespace Client {
|
|
|
205
214
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
206
215
|
strictContentLength?: boolean;
|
|
207
216
|
/** @deprecated use the connect option instead */
|
|
208
|
-
tls?:
|
|
217
|
+
tls?: TlsOptions_2 | null;
|
|
209
218
|
/** */
|
|
210
219
|
maxRequestsPerClient?: number;
|
|
211
220
|
/** Max response body size in bytes, -1 is disabled */
|
|
@@ -266,12 +275,12 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
|
266
275
|
created_on: string;
|
|
267
276
|
production_branch: string;
|
|
268
277
|
deployment_trigger: {
|
|
278
|
+
type: string;
|
|
269
279
|
metadata: {
|
|
270
280
|
branch: string;
|
|
271
281
|
commit_hash: string;
|
|
272
282
|
commit_message: string;
|
|
273
283
|
};
|
|
274
|
-
type: string;
|
|
275
284
|
};
|
|
276
285
|
latest_stage: {
|
|
277
286
|
name: "build" | "deploy" | "queued" | "initialize" | "clone_repo";
|
|
@@ -646,8 +655,18 @@ declare interface EnvironmentInheritable {
|
|
|
646
655
|
*/
|
|
647
656
|
main: string | undefined;
|
|
648
657
|
/**
|
|
649
|
-
*
|
|
650
|
-
*
|
|
658
|
+
* If true then Wrangler will traverse the file tree below `base_dir`;
|
|
659
|
+
* Any files that match `rules` will be included in the deployed worker.
|
|
660
|
+
* Defaults to true if `no_bundle` is true, otherwise false.
|
|
661
|
+
*
|
|
662
|
+
* @inheritable
|
|
663
|
+
*/
|
|
664
|
+
find_additional_modules: boolean | undefined;
|
|
665
|
+
/**
|
|
666
|
+
* The directory in which module rules should be evaluated when including additional files into a worker deployment.
|
|
667
|
+
* This defaults to the directory containing the `main` entry point of the worker if not specified.
|
|
668
|
+
*
|
|
669
|
+
* @inheritable
|
|
651
670
|
*/
|
|
652
671
|
base_dir: string | undefined;
|
|
653
672
|
/**
|
|
@@ -959,6 +978,8 @@ declare interface EnvironmentNonInheritable {
|
|
|
959
978
|
bucket_name: string;
|
|
960
979
|
/** The preview name of this R2 bucket at the edge. */
|
|
961
980
|
preview_bucket_name?: string;
|
|
981
|
+
/** The jurisdiction that the bucket exists in. Default if not present. */
|
|
982
|
+
jurisdiction?: string;
|
|
962
983
|
}[];
|
|
963
984
|
/**
|
|
964
985
|
* Specifies D1 databases that are bound to this Worker environment.
|
|
@@ -985,6 +1006,21 @@ declare interface EnvironmentNonInheritable {
|
|
|
985
1006
|
/** Internal use only. */
|
|
986
1007
|
database_internal_env?: string;
|
|
987
1008
|
}[];
|
|
1009
|
+
/**
|
|
1010
|
+
* Specifies Vectorize indexes that are bound to this Worker environment.
|
|
1011
|
+
*
|
|
1012
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1013
|
+
* and so must be specified in every named environment.
|
|
1014
|
+
*
|
|
1015
|
+
* @default `[]`
|
|
1016
|
+
* @nonInheritable
|
|
1017
|
+
*/
|
|
1018
|
+
vectorize: {
|
|
1019
|
+
/** The binding name used to refer to the Vectorize index in the worker. */
|
|
1020
|
+
binding: string;
|
|
1021
|
+
/** The name of the index. */
|
|
1022
|
+
index_name: string;
|
|
1023
|
+
}[];
|
|
988
1024
|
/**
|
|
989
1025
|
* Specifies Constellation projects that are bound to this Worker environment.
|
|
990
1026
|
*
|
|
@@ -1000,6 +1036,21 @@ declare interface EnvironmentNonInheritable {
|
|
|
1000
1036
|
/** The id of the project. */
|
|
1001
1037
|
project_id: string;
|
|
1002
1038
|
}[];
|
|
1039
|
+
/**
|
|
1040
|
+
* Specifies Hyperdrive configs that are bound to this Worker environment.
|
|
1041
|
+
*
|
|
1042
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
1043
|
+
* and so must be specified in every named environment.
|
|
1044
|
+
*
|
|
1045
|
+
* @default `[]`
|
|
1046
|
+
* @nonInheritable
|
|
1047
|
+
*/
|
|
1048
|
+
hyperdrive: {
|
|
1049
|
+
/** The binding name used to refer to the project in the worker. */
|
|
1050
|
+
binding: string;
|
|
1051
|
+
/** The id of the database. */
|
|
1052
|
+
id: string;
|
|
1053
|
+
}[];
|
|
1003
1054
|
/**
|
|
1004
1055
|
* Specifies service bindings (worker-to-worker) that are bound to this Worker environment.
|
|
1005
1056
|
*
|
|
@@ -1038,6 +1089,12 @@ declare interface EnvironmentNonInheritable {
|
|
|
1038
1089
|
browser: {
|
|
1039
1090
|
binding: string;
|
|
1040
1091
|
} | undefined;
|
|
1092
|
+
/**
|
|
1093
|
+
* Binding to the AI project.
|
|
1094
|
+
*/
|
|
1095
|
+
ai: {
|
|
1096
|
+
binding: string;
|
|
1097
|
+
} | undefined;
|
|
1041
1098
|
/**
|
|
1042
1099
|
* "Unsafe" tables for features that aren't directly supported by wrangler.
|
|
1043
1100
|
*
|