wrangler 0.0.0-e464fcdb → 0.0.0-e4bb5f36
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 +10 -12
- package/bin/wrangler.js +9 -75
- package/package.json +17 -21
- package/templates/__tests__/tsconfig.json +1 -1
- package/templates/checked-fetch.js +10 -3
- package/templates/facade.d.ts +4 -1
- package/templates/middleware/common.ts +9 -4
- package/templates/middleware/loader-modules.ts +64 -11
- package/templates/middleware/loader-sw.ts +2 -7
- package/templates/middleware/middleware-d1-beta.d.ts +3 -0
- package/templates/middleware/middleware-miniflare3-json-error.ts +1 -0
- package/templates/middleware/middleware-multiworker-dev.d.ts +4 -0
- package/templates/middleware/middleware-multiworker-dev.ts +59 -0
- package/templates/middleware/middleware-serve-static-assets.d.ts +6 -0
- package/templates/middleware/middleware-serve-static-assets.ts +56 -0
- package/templates/new-worker-scheduled.ts +1 -1
- package/templates/new-worker.ts +1 -1
- package/templates/pages-dev-util.ts +4 -1
- package/templates/pages-shim.ts +0 -3
- package/templates/pages-template-plugin.ts +12 -2
- package/templates/pages-template-worker.ts +11 -2
- package/templates/tsconfig.json +1 -1
- package/wrangler-dist/cli.d.ts +219 -128
- package/wrangler-dist/cli.js +79638 -78602
- package/import_meta_url.js +0 -3
- package/miniflare-config-stubs/.env.empty +0 -0
- package/miniflare-config-stubs/package.empty.json +0 -1
- package/miniflare-config-stubs/wrangler.empty.toml +0 -0
- package/miniflare-dist/index.mjs +0 -6442
- package/src/__tests__/access.test.ts +0 -25
- package/src/__tests__/api-dev.test.ts +0 -238
- package/src/__tests__/api-devregistry.test.ts +0 -121
- package/src/__tests__/api.test.ts +0 -102
- package/src/__tests__/config-cache-without-cache-dir.test.ts +0 -38
- package/src/__tests__/config-cache.test.ts +0 -42
- package/src/__tests__/configuration.test.ts +0 -4509
- package/src/__tests__/constellation.test.ts +0 -371
- package/src/__tests__/d1/d1.test.ts +0 -82
- package/src/__tests__/d1/execute.test.ts +0 -66
- package/src/__tests__/d1/migrate.test.ts +0 -257
- package/src/__tests__/d1/splitter.test.ts +0 -255
- package/src/__tests__/delete.test.ts +0 -272
- package/src/__tests__/deployments.test.ts +0 -369
- package/src/__tests__/dev.test.tsx +0 -1617
- package/src/__tests__/generate.test.ts +0 -237
- package/src/__tests__/get-host-from-url.test.ts +0 -16
- package/src/__tests__/guess-worker-format.test.ts +0 -120
- package/src/__tests__/helpers/clipboardy-mock.js +0 -4
- package/src/__tests__/helpers/cmd-shim.d.ts +0 -11
- package/src/__tests__/helpers/end-event-loop.ts +0 -6
- package/src/__tests__/helpers/mock-account-id.ts +0 -48
- package/src/__tests__/helpers/mock-auth-domain.ts +0 -20
- package/src/__tests__/helpers/mock-bin.ts +0 -36
- package/src/__tests__/helpers/mock-console.ts +0 -112
- package/src/__tests__/helpers/mock-dialogs.ts +0 -139
- package/src/__tests__/helpers/mock-get-pages-upload-token.ts +0 -25
- package/src/__tests__/helpers/mock-get-zone-from-host.ts +0 -11
- package/src/__tests__/helpers/mock-http-server.ts +0 -46
- package/src/__tests__/helpers/mock-istty.ts +0 -74
- package/src/__tests__/helpers/mock-known-routes.ts +0 -12
- package/src/__tests__/helpers/mock-kv.ts +0 -46
- package/src/__tests__/helpers/mock-oauth-flow.ts +0 -263
- package/src/__tests__/helpers/mock-process.ts +0 -34
- package/src/__tests__/helpers/mock-set-timeout.ts +0 -16
- package/src/__tests__/helpers/mock-stdin.ts +0 -108
- package/src/__tests__/helpers/mock-web-socket.ts +0 -29
- package/src/__tests__/helpers/msw/blob-worker.cjs +0 -19
- package/src/__tests__/helpers/msw/handlers/access.ts +0 -13
- package/src/__tests__/helpers/msw/handlers/deployments.ts +0 -160
- package/src/__tests__/helpers/msw/handlers/namespaces.ts +0 -81
- package/src/__tests__/helpers/msw/handlers/oauth.ts +0 -31
- package/src/__tests__/helpers/msw/handlers/r2.ts +0 -60
- package/src/__tests__/helpers/msw/handlers/script.ts +0 -56
- package/src/__tests__/helpers/msw/handlers/user.ts +0 -52
- package/src/__tests__/helpers/msw/handlers/zones.ts +0 -20
- package/src/__tests__/helpers/msw/index.ts +0 -52
- package/src/__tests__/helpers/msw/read-file-sync.js +0 -61
- package/src/__tests__/helpers/run-in-tmp.ts +0 -38
- package/src/__tests__/helpers/run-wrangler.ts +0 -16
- package/src/__tests__/helpers/string-dynamic-values-matcher.ts +0 -28
- package/src/__tests__/helpers/worker-scripts/child-wrangler.toml +0 -1
- package/src/__tests__/helpers/worker-scripts/hello-world-worker.js +0 -5
- package/src/__tests__/helpers/worker-scripts/hello-world-wrangler.toml +0 -1
- package/src/__tests__/helpers/worker-scripts/parent-worker.js +0 -11
- package/src/__tests__/helpers/worker-scripts/parent-wrangler.toml +0 -5
- package/src/__tests__/helpers/write-worker-source.ts +0 -31
- package/src/__tests__/helpers/write-wrangler-toml.ts +0 -17
- package/src/__tests__/https-options.test.ts +0 -163
- package/src/__tests__/index.test.ts +0 -282
- package/src/__tests__/init.test.ts +0 -3196
- package/src/__tests__/jest.setup.ts +0 -179
- package/src/__tests__/kv.test.ts +0 -1799
- package/src/__tests__/logger.test.ts +0 -207
- package/src/__tests__/logout.test.ts +0 -47
- package/src/__tests__/metrics.test.ts +0 -493
- package/src/__tests__/middleware.scheduled.test.ts +0 -145
- package/src/__tests__/middleware.test.ts +0 -816
- package/src/__tests__/mtls-certificates.test.ts +0 -589
- package/src/__tests__/package-manager.test.ts +0 -353
- package/src/__tests__/pages/deployment-list.test.ts +0 -80
- package/src/__tests__/pages/functions-build.test.ts +0 -452
- package/src/__tests__/pages/pages.test.ts +0 -81
- package/src/__tests__/pages/project-create.test.ts +0 -63
- package/src/__tests__/pages/project-list.test.ts +0 -110
- package/src/__tests__/pages/project-upload.test.ts +0 -500
- package/src/__tests__/pages/publish.test.ts +0 -2864
- package/src/__tests__/pages-deployment-tail.test.ts +0 -955
- package/src/__tests__/parse.test.ts +0 -436
- package/src/__tests__/paths.test.ts +0 -39
- package/src/__tests__/publish.test.ts +0 -8849
- package/src/__tests__/pubsub.test.ts +0 -496
- package/src/__tests__/queues.test.ts +0 -532
- package/src/__tests__/r2.test.ts +0 -374
- package/src/__tests__/route.test.ts +0 -45
- package/src/__tests__/secret.test.ts +0 -693
- package/src/__tests__/tail.test.ts +0 -958
- package/src/__tests__/test-old-node-version.js +0 -31
- package/src/__tests__/traverse-module-graph.test.ts +0 -220
- package/src/__tests__/tsconfig-sanity.ts +0 -12
- package/src/__tests__/tsconfig.json +0 -8
- package/src/__tests__/tsconfig.tsbuildinfo +0 -1
- package/src/__tests__/type-generation.test.ts +0 -234
- package/src/__tests__/user.test.ts +0 -118
- package/src/__tests__/utils-collectKeyValues.test.ts +0 -47
- package/src/__tests__/validate-dev-props.test.ts +0 -56
- package/src/__tests__/version.test.ts +0 -35
- package/src/__tests__/whoami.test.tsx +0 -172
- package/src/__tests__/worker-namespace.test.ts +0 -340
- package/src/abort.d.ts +0 -3
- package/src/api/dev.ts +0 -316
- package/src/api/index.ts +0 -11
- package/src/api/mtls-certificate.ts +0 -148
- package/src/api/pages/create-worker-bundle-contents.ts +0 -76
- package/src/api/pages/index.ts +0 -5
- package/src/api/pages/publish.tsx +0 -355
- package/src/bundle-reporter.ts +0 -68
- package/src/bundle.ts +0 -908
- package/src/cfetch/index.ts +0 -158
- package/src/cfetch/internal.ts +0 -258
- package/src/cli.ts +0 -28
- package/src/config/README.md +0 -107
- package/src/config/config.ts +0 -282
- package/src/config/diagnostics.ts +0 -80
- package/src/config/environment.ts +0 -618
- package/src/config/index.ts +0 -403
- package/src/config/validation-helpers.ts +0 -597
- package/src/config/validation.ts +0 -2342
- package/src/config-cache.ts +0 -85
- package/src/constellation/createProject.tsx +0 -51
- package/src/constellation/deleteProject.ts +0 -51
- package/src/constellation/deleteProjectModel.ts +0 -68
- package/src/constellation/index.ts +0 -75
- package/src/constellation/listCatalog.tsx +0 -35
- package/src/constellation/listModel.tsx +0 -41
- package/src/constellation/listProject.tsx +0 -28
- package/src/constellation/listRuntime.tsx +0 -28
- package/src/constellation/options.ts +0 -17
- package/src/constellation/types.ts +0 -17
- package/src/constellation/uploadModel.tsx +0 -64
- package/src/constellation/utils.ts +0 -90
- package/src/create-worker-preview.ts +0 -293
- package/src/create-worker-upload-form.ts +0 -359
- package/src/d1/backups.tsx +0 -219
- package/src/d1/constants.ts +0 -6
- package/src/d1/create.tsx +0 -103
- package/src/d1/delete.ts +0 -53
- package/src/d1/execute.tsx +0 -371
- package/src/d1/formatTimeAgo.ts +0 -14
- package/src/d1/index.ts +0 -100
- package/src/d1/list.tsx +0 -62
- package/src/d1/migrations/apply.tsx +0 -235
- package/src/d1/migrations/create.tsx +0 -79
- package/src/d1/migrations/helpers.ts +0 -171
- package/src/d1/migrations/index.ts +0 -3
- package/src/d1/migrations/list.tsx +0 -95
- package/src/d1/migrations/options.ts +0 -23
- package/src/d1/options.ts +0 -22
- package/src/d1/splitter.ts +0 -161
- package/src/d1/types.ts +0 -32
- package/src/d1/utils.ts +0 -49
- package/src/delete.ts +0 -100
- package/src/deployments.ts +0 -368
- package/src/deprecated/index.ts +0 -144
- package/src/dev/dev-vars.ts +0 -39
- package/src/dev/dev.tsx +0 -600
- package/src/dev/get-local-persistence-path.ts +0 -31
- package/src/dev/local.tsx +0 -948
- package/src/dev/remote.tsx +0 -632
- package/src/dev/start-server.ts +0 -534
- package/src/dev/use-esbuild.ts +0 -203
- package/src/dev/validate-dev-props.ts +0 -40
- package/src/dev-registry.ts +0 -202
- package/src/dev.tsx +0 -929
- package/src/dialogs.ts +0 -136
- package/src/dispatch-namespace.ts +0 -211
- package/src/docs/helpers.ts +0 -50
- package/src/docs/index.ts +0 -54
- package/src/durable.ts +0 -102
- package/src/entry.ts +0 -337
- package/src/environment-variables/factory.ts +0 -89
- package/src/environment-variables/misc-variables.ts +0 -30
- package/src/errors.ts +0 -11
- package/src/generate/index.ts +0 -298
- package/src/git-client.ts +0 -135
- package/src/global-wrangler-config-path.ts +0 -26
- package/src/https-options.ts +0 -127
- package/src/index.ts +0 -768
- package/src/init.ts +0 -1032
- package/src/inspect.ts +0 -782
- package/src/intl-polyfill.d.ts +0 -139
- package/src/is-ci.ts +0 -14
- package/src/is-interactive.ts +0 -16
- package/src/jest.d.ts +0 -4
- package/src/kv/helpers.ts +0 -433
- package/src/kv/index.ts +0 -594
- package/src/logger.ts +0 -123
- package/src/metrics/index.ts +0 -5
- package/src/metrics/metrics-config.ts +0 -239
- package/src/metrics/metrics-dispatcher.ts +0 -96
- package/src/metrics/metrics-usage-headers.ts +0 -24
- package/src/metrics/send-event.ts +0 -99
- package/src/miniflare-cli/README.md +0 -30
- package/src/miniflare-cli/assets.ts +0 -251
- package/src/miniflare-cli/index.ts +0 -210
- package/src/miniflare-cli/request-context.ts +0 -40
- package/src/miniflare-cli/tsconfig.json +0 -9
- package/src/miniflare-cli/tsconfig.tsbuildinfo +0 -1
- package/src/miniflare-cli/types.ts +0 -11
- package/src/module-collection.ts +0 -333
- package/src/mtls-certificate/cli.ts +0 -155
- package/src/open-in-browser.ts +0 -17
- package/src/package-manager.ts +0 -219
- package/src/pages/build.ts +0 -410
- package/src/pages/buildFunctions.ts +0 -140
- package/src/pages/constants.ts +0 -18
- package/src/pages/deployment-tails.ts +0 -281
- package/src/pages/deployments.tsx +0 -84
- package/src/pages/dev.ts +0 -716
- package/src/pages/errors.ts +0 -67
- package/src/pages/functions/buildPlugin.ts +0 -113
- package/src/pages/functions/buildWorker.ts +0 -291
- package/src/pages/functions/filepath-routing.test.ts +0 -234
- package/src/pages/functions/filepath-routing.ts +0 -189
- package/src/pages/functions/identifiers.ts +0 -78
- package/src/pages/functions/routes-consolidation.test.ts +0 -250
- package/src/pages/functions/routes-consolidation.ts +0 -73
- package/src/pages/functions/routes-transformation.test.ts +0 -282
- package/src/pages/functions/routes-transformation.ts +0 -115
- package/src/pages/functions/routes-validation.test.ts +0 -403
- package/src/pages/functions/routes-validation.ts +0 -202
- package/src/pages/functions/routes.ts +0 -151
- package/src/pages/functions/tsconfig.json +0 -8
- package/src/pages/functions/tsconfig.tsbuildinfo +0 -1
- package/src/pages/functions.ts +0 -86
- package/src/pages/hash.ts +0 -13
- package/src/pages/index.ts +0 -102
- package/src/pages/projects.tsx +0 -159
- package/src/pages/prompt-select-project.tsx +0 -31
- package/src/pages/publish.tsx +0 -267
- package/src/pages/types.ts +0 -46
- package/src/pages/upload.tsx +0 -469
- package/src/pages/utils.ts +0 -23
- package/src/parse.ts +0 -308
- package/src/paths.ts +0 -71
- package/src/proxy.ts +0 -694
- package/src/publish/index.ts +0 -274
- package/src/publish/publish.ts +0 -1060
- package/src/pubsub/index.ts +0 -286
- package/src/pubsub/pubsub-commands.ts +0 -623
- package/src/queues/cli/commands/consumer/add.ts +0 -71
- package/src/queues/cli/commands/consumer/index.ts +0 -19
- package/src/queues/cli/commands/consumer/remove.ts +0 -31
- package/src/queues/cli/commands/create.ts +0 -25
- package/src/queues/cli/commands/delete.ts +0 -26
- package/src/queues/cli/commands/index.ts +0 -35
- package/src/queues/cli/commands/list.ts +0 -25
- package/src/queues/client.ts +0 -136
- package/src/queues/utils.ts +0 -18
- package/src/r2/constants.ts +0 -4
- package/src/r2/helpers.ts +0 -132
- package/src/r2/index.ts +0 -289
- package/src/routes.ts +0 -140
- package/src/secret/index.ts +0 -376
- package/src/selfsigned.d.ts +0 -29
- package/src/sites.ts +0 -484
- package/src/tail/createTail.ts +0 -406
- package/src/tail/filters.ts +0 -277
- package/src/tail/index.ts +0 -211
- package/src/tail/printing.ts +0 -122
- package/src/traverse-module-graph.ts +0 -53
- package/src/tsconfig-sanity.ts +0 -16
- package/src/type-generation.ts +0 -181
- package/src/update-check.ts +0 -19
- package/src/user/access.ts +0 -68
- package/src/user/auth-variables.ts +0 -113
- package/src/user/choose-account.tsx +0 -39
- package/src/user/generate-auth-url.ts +0 -33
- package/src/user/generate-random-state.ts +0 -16
- package/src/user/index.ts +0 -2
- package/src/user/user.ts +0 -1234
- package/src/utils/collectKeyValues.ts +0 -14
- package/src/utils/render.ts +0 -93
- package/src/whoami.ts +0 -135
- package/src/worker.ts +0 -274
- package/src/yargs-types.ts +0 -37
- package/src/zones.ts +0 -191
- package/templates/__tests__/tsconfig.tsbuildinfo +0 -1
- package/templates/d1-beta-facade.js +0 -244
- package/templates/first-party-worker-module-facade.ts +0 -19
- package/templates/format-dev-errors.ts +0 -34
- package/templates/serve-static-assets.ts +0 -66
- package/templates/service-bindings-module-facade.js +0 -55
- package/templates/service-bindings-sw-facade.js +0 -42
- package/templates/tsconfig.tsbuildinfo +0 -1
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -5,11 +5,12 @@ import { ConnectionOptions } from 'tls';
|
|
|
5
5
|
import { Duplex } from 'stream';
|
|
6
6
|
import { EventEmitter } from 'events';
|
|
7
7
|
import { IpcNetConnectOpts } from 'net';
|
|
8
|
+
import type { Json } from 'miniflare';
|
|
8
9
|
import { Readable } from 'stream';
|
|
9
|
-
import { ReadableStream } from 'stream/web';
|
|
10
|
-
import { Socket } from 'net';
|
|
10
|
+
import { ReadableStream as ReadableStream_2 } from 'stream/web';
|
|
11
|
+
import { Socket as Socket_2 } from 'net';
|
|
11
12
|
import { TcpNetConnectOpts } from 'net';
|
|
12
|
-
import { TlsOptions } from 'tls';
|
|
13
|
+
import { TlsOptions as TlsOptions_2 } from 'tls';
|
|
13
14
|
import { TLSSocket } from 'tls';
|
|
14
15
|
import { URL as URL_2 } from 'url';
|
|
15
16
|
import { URLSearchParams as URLSearchParams_2 } from 'url';
|
|
@@ -22,11 +23,11 @@ declare interface BlobPropertyBag {
|
|
|
22
23
|
endings?: 'native' | 'transparent'
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
declare type
|
|
26
|
+
declare type BodyInit_2 =
|
|
26
27
|
| ArrayBuffer
|
|
27
28
|
| AsyncIterable<Uint8Array>
|
|
28
29
|
| Blob_2
|
|
29
|
-
|
|
|
30
|
+
| FormData_2
|
|
30
31
|
| Iterable<Uint8Array>
|
|
31
32
|
| NodeJS.ArrayBufferView
|
|
32
33
|
| URLSearchParams_2
|
|
@@ -34,12 +35,12 @@ declare type BodyInit =
|
|
|
34
35
|
| string
|
|
35
36
|
|
|
36
37
|
declare interface BodyMixin {
|
|
37
|
-
readonly body:
|
|
38
|
+
readonly body: ReadableStream_2 | null
|
|
38
39
|
readonly bodyUsed: boolean
|
|
39
40
|
|
|
40
41
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
41
42
|
readonly blob: () => Promise<Blob_2>
|
|
42
|
-
readonly formData: () => Promise<
|
|
43
|
+
readonly formData: () => Promise<FormData_2>
|
|
43
44
|
readonly json: () => Promise<unknown>
|
|
44
45
|
readonly text: () => Promise<string>
|
|
45
46
|
}
|
|
@@ -120,16 +121,16 @@ declare namespace buildConnector {
|
|
|
120
121
|
port: string
|
|
121
122
|
servername?: string
|
|
122
123
|
localAddress?: string | null
|
|
123
|
-
httpSocket?:
|
|
124
|
+
httpSocket?: Socket_2
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
type Callback = (...args: CallbackArgs) => void
|
|
127
|
-
type CallbackArgs = [null,
|
|
128
|
+
type CallbackArgs = [null, Socket_2 | TLSSocket] | [Error, null]
|
|
128
129
|
|
|
129
130
|
type connector = connectorAsync | connectorSync
|
|
130
131
|
|
|
131
132
|
interface connectorSync {
|
|
132
|
-
(options: buildConnector.Options):
|
|
133
|
+
(options: buildConnector.Options): Socket_2 | TLSSocket
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
interface connectorAsync {
|
|
@@ -137,6 +138,41 @@ declare namespace buildConnector {
|
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
/**
|
|
142
|
+
* An imported module.
|
|
143
|
+
*/
|
|
144
|
+
declare interface CfModule {
|
|
145
|
+
/**
|
|
146
|
+
* The module name.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* './src/index.js'
|
|
150
|
+
*/
|
|
151
|
+
name: string;
|
|
152
|
+
/**
|
|
153
|
+
* The module content, usually JavaScript or WASM code.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* export default {
|
|
157
|
+
* async fetch(request) {
|
|
158
|
+
* return new Response('Ok')
|
|
159
|
+
* }
|
|
160
|
+
* }
|
|
161
|
+
*/
|
|
162
|
+
content: string | Buffer;
|
|
163
|
+
/**
|
|
164
|
+
* The module type.
|
|
165
|
+
*
|
|
166
|
+
* If absent, will default to the main module's type.
|
|
167
|
+
*/
|
|
168
|
+
type?: CfModuleType;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* A module type.
|
|
173
|
+
*/
|
|
174
|
+
declare type CfModuleType = "esm" | "commonjs" | "compiled-wasm" | "text" | "buffer";
|
|
175
|
+
|
|
140
176
|
/** A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default. */
|
|
141
177
|
declare class Client extends Dispatcher {
|
|
142
178
|
constructor(url: string | URL_2, options?: Client.Options);
|
|
@@ -169,7 +205,7 @@ declare namespace Client {
|
|
|
169
205
|
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
|
|
170
206
|
strictContentLength?: boolean;
|
|
171
207
|
/** @deprecated use the connect option instead */
|
|
172
|
-
tls?:
|
|
208
|
+
tls?: TlsOptions_2 | null;
|
|
173
209
|
/** */
|
|
174
210
|
maxRequestsPerClient?: number;
|
|
175
211
|
/** Max response body size in bytes, -1 is disabled */
|
|
@@ -208,6 +244,74 @@ declare type CustomDomainRoute = {
|
|
|
208
244
|
|
|
209
245
|
export declare function deleteMTlsCertificate(accountId: string, certificateId: string): Promise<unknown>;
|
|
210
246
|
|
|
247
|
+
/**
|
|
248
|
+
* Publish a directory to an account/project.
|
|
249
|
+
* NOTE: You will need the `CLOUDFLARE_API_KEY` environment
|
|
250
|
+
* variable set
|
|
251
|
+
*/
|
|
252
|
+
declare function deploy({ directory, accountId, projectName, branch, skipCaching, commitMessage, commitHash, commitDirty, functionsDirectory: customFunctionsDirectory, bundle, }: PagesDeployOptions): Promise<{
|
|
253
|
+
url: string;
|
|
254
|
+
environment: "production" | "preview";
|
|
255
|
+
id: string;
|
|
256
|
+
project_id: string;
|
|
257
|
+
project_name: string;
|
|
258
|
+
build_config: {
|
|
259
|
+
build_command: string;
|
|
260
|
+
destination_dir: string;
|
|
261
|
+
root_dir: string;
|
|
262
|
+
web_analytics_tag?: string | undefined;
|
|
263
|
+
web_analytics_token?: string | undefined;
|
|
264
|
+
fast_builds?: boolean | undefined;
|
|
265
|
+
};
|
|
266
|
+
created_on: string;
|
|
267
|
+
production_branch: string;
|
|
268
|
+
deployment_trigger: {
|
|
269
|
+
type: string;
|
|
270
|
+
metadata: {
|
|
271
|
+
branch: string;
|
|
272
|
+
commit_hash: string;
|
|
273
|
+
commit_message: string;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
latest_stage: {
|
|
277
|
+
name: "build" | "deploy" | "queued" | "initialize" | "clone_repo";
|
|
278
|
+
status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
|
|
279
|
+
started_on: string | null;
|
|
280
|
+
ended_on: string | null;
|
|
281
|
+
};
|
|
282
|
+
stages: {
|
|
283
|
+
name: "build" | "deploy" | "queued" | "initialize" | "clone_repo";
|
|
284
|
+
status: "active" | "idle" | "canceled" | "success" | "failure" | "skipped";
|
|
285
|
+
started_on: string | null;
|
|
286
|
+
ended_on: string | null;
|
|
287
|
+
}[];
|
|
288
|
+
aliases: string[];
|
|
289
|
+
modified_on: string;
|
|
290
|
+
short_id: string;
|
|
291
|
+
build_image_major_version: number;
|
|
292
|
+
kv_namespaces?: any;
|
|
293
|
+
source?: {
|
|
294
|
+
type: "github" | "gitlab";
|
|
295
|
+
config: {
|
|
296
|
+
owner: string;
|
|
297
|
+
repo_name: string;
|
|
298
|
+
production_branch?: string | undefined;
|
|
299
|
+
pr_comments_enabled?: boolean | undefined;
|
|
300
|
+
deployments_enabled?: boolean | undefined;
|
|
301
|
+
production_deployments_enabled?: boolean | undefined;
|
|
302
|
+
preview_deployment_setting?: "none" | "all" | "custom" | undefined;
|
|
303
|
+
preview_branch_includes?: string[] | undefined;
|
|
304
|
+
preview_branch_excludes?: string[] | undefined;
|
|
305
|
+
};
|
|
306
|
+
} | undefined;
|
|
307
|
+
env_vars?: any;
|
|
308
|
+
durable_object_namespaces?: any;
|
|
309
|
+
is_skipped?: boolean | undefined;
|
|
310
|
+
files?: {
|
|
311
|
+
[x: string]: string | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
}>;
|
|
314
|
+
|
|
211
315
|
/**
|
|
212
316
|
* Deprecated upload configuration.
|
|
213
317
|
*/
|
|
@@ -326,7 +430,7 @@ declare namespace Dispatcher {
|
|
|
326
430
|
path: string;
|
|
327
431
|
method: HttpMethod;
|
|
328
432
|
/** Default: `null` */
|
|
329
|
-
body?: string | Buffer | Uint8Array | Readable | null |
|
|
433
|
+
body?: string | Buffer | Uint8Array | Readable | null | FormData_2;
|
|
330
434
|
/** Default: `null` */
|
|
331
435
|
headers?: IncomingHttpHeaders | string[] | null;
|
|
332
436
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
@@ -464,6 +568,15 @@ declare namespace Dispatcher {
|
|
|
464
568
|
}
|
|
465
569
|
}
|
|
466
570
|
|
|
571
|
+
declare interface DispatchNamespaceOutbound {
|
|
572
|
+
/** Name of the service handling the outbound requests */
|
|
573
|
+
service: string;
|
|
574
|
+
/** (Optional) Name of the environment handling the outbound requests. */
|
|
575
|
+
environment?: string;
|
|
576
|
+
/** (Optional) List of parameter names, for sending context from your dispatch worker to the outbound handler */
|
|
577
|
+
parameters?: string[];
|
|
578
|
+
}
|
|
579
|
+
|
|
467
580
|
declare type DurableObjectBindings = {
|
|
468
581
|
/** The name of the binding used to refer to the Durable Object */
|
|
469
582
|
name: string;
|
|
@@ -639,7 +752,7 @@ declare interface EnvironmentInheritable {
|
|
|
639
752
|
upload?: DeprecatedUpload;
|
|
640
753
|
};
|
|
641
754
|
/**
|
|
642
|
-
* Skip internal build steps and directly
|
|
755
|
+
* Skip internal build steps and directly deploy script
|
|
643
756
|
* @inheritable
|
|
644
757
|
*/
|
|
645
758
|
no_bundle: boolean | undefined;
|
|
@@ -667,6 +780,8 @@ declare interface EnvironmentInheritable {
|
|
|
667
780
|
binding: string;
|
|
668
781
|
/** The namespace to bind to. */
|
|
669
782
|
namespace: string;
|
|
783
|
+
/** Details about the outbound worker which will handle outbound requests from your namespace */
|
|
784
|
+
outbound?: DispatchNamespaceOutbound;
|
|
670
785
|
}[];
|
|
671
786
|
/**
|
|
672
787
|
* Designates this worker as an internal-only "first-party" worker.
|
|
@@ -680,15 +795,12 @@ declare interface EnvironmentInheritable {
|
|
|
680
795
|
*/
|
|
681
796
|
zone_id?: string;
|
|
682
797
|
/**
|
|
683
|
-
*
|
|
684
|
-
* Then add a binding per field in the top level message that you will send to logfwdr
|
|
798
|
+
* List of bindings that you will send to logfwdr
|
|
685
799
|
*
|
|
686
|
-
* @default `{
|
|
800
|
+
* @default `{bindings:[]}`
|
|
687
801
|
* @inheritable
|
|
688
802
|
*/
|
|
689
803
|
logfwdr: {
|
|
690
|
-
/** capnp schema filename */
|
|
691
|
-
schema: string | undefined;
|
|
692
804
|
bindings: {
|
|
693
805
|
/** The binding name used to refer to logfwdr */
|
|
694
806
|
name: string;
|
|
@@ -707,6 +819,14 @@ declare interface EnvironmentInheritable {
|
|
|
707
819
|
* @inheritable
|
|
708
820
|
*/
|
|
709
821
|
logpush: boolean | undefined;
|
|
822
|
+
/**
|
|
823
|
+
* Specify how the worker should be located to minimize round-trip time.
|
|
824
|
+
*
|
|
825
|
+
* More details: https://developers.cloudflare.com/workers/platform/smart-placement/
|
|
826
|
+
*/
|
|
827
|
+
placement: {
|
|
828
|
+
mode: "off" | "smart";
|
|
829
|
+
} | undefined;
|
|
710
830
|
}
|
|
711
831
|
|
|
712
832
|
/**
|
|
@@ -736,9 +856,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
736
856
|
* @default `{}`
|
|
737
857
|
* @nonInheritable
|
|
738
858
|
*/
|
|
739
|
-
vars:
|
|
740
|
-
[key: string]: unknown;
|
|
741
|
-
};
|
|
859
|
+
vars: Record<string, string | Json>;
|
|
742
860
|
/**
|
|
743
861
|
* A list of durable objects that your worker should be bound to.
|
|
744
862
|
*
|
|
@@ -867,6 +985,21 @@ declare interface EnvironmentNonInheritable {
|
|
|
867
985
|
/** Internal use only. */
|
|
868
986
|
database_internal_env?: string;
|
|
869
987
|
}[];
|
|
988
|
+
/**
|
|
989
|
+
* Specifies Constellation projects that are bound to this Worker environment.
|
|
990
|
+
*
|
|
991
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
|
992
|
+
* and so must be specified in every named environment.
|
|
993
|
+
*
|
|
994
|
+
* @default `[]`
|
|
995
|
+
* @nonInheritable
|
|
996
|
+
*/
|
|
997
|
+
constellation: {
|
|
998
|
+
/** The binding name used to refer to the project in the worker. */
|
|
999
|
+
binding: string;
|
|
1000
|
+
/** The id of the project. */
|
|
1001
|
+
project_id: string;
|
|
1002
|
+
}[];
|
|
870
1003
|
/**
|
|
871
1004
|
* Specifies service bindings (worker-to-worker) that are bound to this Worker environment.
|
|
872
1005
|
*
|
|
@@ -899,6 +1032,12 @@ declare interface EnvironmentNonInheritable {
|
|
|
899
1032
|
/** The name of this dataset to write to. */
|
|
900
1033
|
dataset?: string;
|
|
901
1034
|
}[];
|
|
1035
|
+
/**
|
|
1036
|
+
* A browser that will be usable from the worker.
|
|
1037
|
+
*/
|
|
1038
|
+
browser: {
|
|
1039
|
+
binding: string;
|
|
1040
|
+
} | undefined;
|
|
902
1041
|
/**
|
|
903
1042
|
* "Unsafe" tables for features that aren't directly supported by wrangler.
|
|
904
1043
|
*
|
|
@@ -925,6 +1064,18 @@ declare interface EnvironmentNonInheritable {
|
|
|
925
1064
|
metadata?: {
|
|
926
1065
|
[key: string]: string;
|
|
927
1066
|
};
|
|
1067
|
+
/**
|
|
1068
|
+
* Used for internal capnp uploads for the Workers runtime
|
|
1069
|
+
*/
|
|
1070
|
+
capnp?: {
|
|
1071
|
+
base_path: string;
|
|
1072
|
+
source_schemas: string[];
|
|
1073
|
+
compiled_schema?: never;
|
|
1074
|
+
} | {
|
|
1075
|
+
base_path?: never;
|
|
1076
|
+
source_schemas?: never;
|
|
1077
|
+
compiled_schema: string;
|
|
1078
|
+
};
|
|
928
1079
|
};
|
|
929
1080
|
mtls_certificates: {
|
|
930
1081
|
/** The binding name used to refer to the certificate in the worker */
|
|
@@ -932,6 +1083,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
932
1083
|
/** The uuid of the uploaded mTLS certificate */
|
|
933
1084
|
certificate_id: string;
|
|
934
1085
|
}[];
|
|
1086
|
+
tail_consumers?: TailConsumer[];
|
|
935
1087
|
}
|
|
936
1088
|
|
|
937
1089
|
declare namespace Errors {
|
|
@@ -1049,7 +1201,7 @@ declare namespace Errors {
|
|
|
1049
1201
|
}
|
|
1050
1202
|
}
|
|
1051
1203
|
|
|
1052
|
-
declare class
|
|
1204
|
+
declare class File_2 extends Blob_2 {
|
|
1053
1205
|
/**
|
|
1054
1206
|
* Creates a new File instance.
|
|
1055
1207
|
*
|
|
@@ -1082,7 +1234,7 @@ declare interface FilePropertyBag extends BlobPropertyBag {
|
|
|
1082
1234
|
/**
|
|
1083
1235
|
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
|
|
1084
1236
|
*/
|
|
1085
|
-
declare class
|
|
1237
|
+
declare class FormData_2 {
|
|
1086
1238
|
/**
|
|
1087
1239
|
* Appends a new value onto an existing key inside a FormData object,
|
|
1088
1240
|
* or adds the key if it does not already exist.
|
|
@@ -1147,7 +1299,7 @@ declare class FormData {
|
|
|
1147
1299
|
* Executes given callback function for each field of the FormData instance
|
|
1148
1300
|
*/
|
|
1149
1301
|
forEach: (
|
|
1150
|
-
callbackfn: (value: FormDataEntryValue, key: string, iterable:
|
|
1302
|
+
callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData_2) => void,
|
|
1151
1303
|
thisArg?: unknown
|
|
1152
1304
|
) => void
|
|
1153
1305
|
|
|
@@ -1180,7 +1332,7 @@ declare class FormData {
|
|
|
1180
1332
|
/**
|
|
1181
1333
|
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
|
|
1182
1334
|
*/
|
|
1183
|
-
declare type FormDataEntryValue = string |
|
|
1335
|
+
declare type FormDataEntryValue = string | File_2
|
|
1184
1336
|
|
|
1185
1337
|
/**
|
|
1186
1338
|
* fetches an mTLS certificate from the account mTLS certificate store by ID
|
|
@@ -1192,8 +1344,8 @@ export declare function getMTlsCertificate(accountId: string, id: string): Promi
|
|
|
1192
1344
|
*/
|
|
1193
1345
|
export declare function getMTlsCertificateByName(accountId: string, name: string): Promise<MTlsCertificateResponse>;
|
|
1194
1346
|
|
|
1195
|
-
declare class
|
|
1196
|
-
constructor (init?:
|
|
1347
|
+
declare class Headers_2 implements SpecIterable<[string, string]> {
|
|
1348
|
+
constructor (init?: HeadersInit_2)
|
|
1197
1349
|
readonly append: (name: string, value: string) => void
|
|
1198
1350
|
readonly delete: (name: string) => void
|
|
1199
1351
|
readonly get: (name: string) => string | null
|
|
@@ -1201,7 +1353,7 @@ declare class Headers implements SpecIterable<[string, string]> {
|
|
|
1201
1353
|
readonly set: (name: string, value: string) => void
|
|
1202
1354
|
readonly getSetCookie: () => string[]
|
|
1203
1355
|
readonly forEach: (
|
|
1204
|
-
callbackfn: (value: string, key: string, iterable:
|
|
1356
|
+
callbackfn: (value: string, key: string, iterable: Headers_2) => void,
|
|
1205
1357
|
thisArg?: unknown
|
|
1206
1358
|
) => void
|
|
1207
1359
|
|
|
@@ -1211,7 +1363,7 @@ declare class Headers implements SpecIterable<[string, string]> {
|
|
|
1211
1363
|
readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
|
|
1212
1364
|
}
|
|
1213
1365
|
|
|
1214
|
-
declare type
|
|
1366
|
+
declare type HeadersInit_2 = string[][] | Record<string, string | ReadonlyArray<string>> | Headers_2
|
|
1215
1367
|
|
|
1216
1368
|
/**
|
|
1217
1369
|
* The header type declaration of `undici`.
|
|
@@ -1263,9 +1415,9 @@ declare interface MTlsCertificateUploadDetails {
|
|
|
1263
1415
|
name?: string;
|
|
1264
1416
|
}
|
|
1265
1417
|
|
|
1266
|
-
declare interface
|
|
1418
|
+
declare interface PagesDeployOptions {
|
|
1267
1419
|
/**
|
|
1268
|
-
* Path to static assets to
|
|
1420
|
+
* Path to static assets to deploy to Pages
|
|
1269
1421
|
*/
|
|
1270
1422
|
directory: string;
|
|
1271
1423
|
/**
|
|
@@ -1306,79 +1458,11 @@ declare interface PagesPublishOptions {
|
|
|
1306
1458
|
functionsDirectory?: string;
|
|
1307
1459
|
/**
|
|
1308
1460
|
* Whether to run bundling on `_worker.js` before deploying.
|
|
1309
|
-
* Default:
|
|
1461
|
+
* Default: true
|
|
1310
1462
|
*/
|
|
1311
1463
|
bundle?: boolean;
|
|
1312
1464
|
}
|
|
1313
1465
|
|
|
1314
|
-
/**
|
|
1315
|
-
* Publish a directory to an account/project.
|
|
1316
|
-
* NOTE: You will need the `CLOUDFLARE_API_KEY` environment
|
|
1317
|
-
* variable set
|
|
1318
|
-
*/
|
|
1319
|
-
declare function publish({ directory, accountId, projectName, branch, skipCaching, commitMessage, commitHash, commitDirty, functionsDirectory: customFunctionsDirectory, bundle, }: PagesPublishOptions): Promise<{
|
|
1320
|
-
environment: "production" | "preview";
|
|
1321
|
-
id: string;
|
|
1322
|
-
url: string;
|
|
1323
|
-
project_id: string;
|
|
1324
|
-
project_name: string;
|
|
1325
|
-
build_config: {
|
|
1326
|
-
build_command: string;
|
|
1327
|
-
destination_dir: string;
|
|
1328
|
-
root_dir: string;
|
|
1329
|
-
web_analytics_tag?: string | undefined;
|
|
1330
|
-
web_analytics_token?: string | undefined;
|
|
1331
|
-
fast_builds?: boolean | undefined;
|
|
1332
|
-
};
|
|
1333
|
-
created_on: string;
|
|
1334
|
-
production_branch: string;
|
|
1335
|
-
deployment_trigger: {
|
|
1336
|
-
type: string;
|
|
1337
|
-
metadata: {
|
|
1338
|
-
branch: string;
|
|
1339
|
-
commit_hash: string;
|
|
1340
|
-
commit_message: string;
|
|
1341
|
-
};
|
|
1342
|
-
};
|
|
1343
|
-
latest_stage: {
|
|
1344
|
-
name: "build" | "queued" | "initialize" | "clone_repo" | "deploy";
|
|
1345
|
-
status: "active" | "canceled" | "success" | "idle" | "failure" | "skipped";
|
|
1346
|
-
started_on: string | null;
|
|
1347
|
-
ended_on: string | null;
|
|
1348
|
-
};
|
|
1349
|
-
stages: {
|
|
1350
|
-
name: "build" | "queued" | "initialize" | "clone_repo" | "deploy";
|
|
1351
|
-
status: "active" | "canceled" | "success" | "idle" | "failure" | "skipped";
|
|
1352
|
-
started_on: string | null;
|
|
1353
|
-
ended_on: string | null;
|
|
1354
|
-
}[];
|
|
1355
|
-
aliases: string[];
|
|
1356
|
-
modified_on: string;
|
|
1357
|
-
short_id: string;
|
|
1358
|
-
build_image_major_version: number;
|
|
1359
|
-
kv_namespaces?: any;
|
|
1360
|
-
source?: {
|
|
1361
|
-
type: "github" | "gitlab";
|
|
1362
|
-
config: {
|
|
1363
|
-
owner: string;
|
|
1364
|
-
repo_name: string;
|
|
1365
|
-
production_branch?: string | undefined;
|
|
1366
|
-
pr_comments_enabled?: boolean | undefined;
|
|
1367
|
-
deployments_enabled?: boolean | undefined;
|
|
1368
|
-
production_deployments_enabled?: boolean | undefined;
|
|
1369
|
-
preview_deployment_setting?: "none" | "all" | "custom" | undefined;
|
|
1370
|
-
preview_branch_includes?: string[] | undefined;
|
|
1371
|
-
preview_branch_excludes?: string[] | undefined;
|
|
1372
|
-
};
|
|
1373
|
-
} | undefined;
|
|
1374
|
-
env_vars?: any;
|
|
1375
|
-
durable_object_namespaces?: any;
|
|
1376
|
-
is_skipped?: boolean | undefined;
|
|
1377
|
-
files?: {
|
|
1378
|
-
[x: string]: string | undefined;
|
|
1379
|
-
} | undefined;
|
|
1380
|
-
}>;
|
|
1381
|
-
|
|
1382
1466
|
declare type ReferrerPolicy =
|
|
1383
1467
|
| ''
|
|
1384
1468
|
| 'no-referrer'
|
|
@@ -1390,13 +1474,13 @@ declare type ReferrerPolicy =
|
|
|
1390
1474
|
| 'strict-origin-when-cross-origin'
|
|
1391
1475
|
| 'unsafe-url';
|
|
1392
1476
|
|
|
1393
|
-
declare class
|
|
1394
|
-
constructor (input:
|
|
1477
|
+
declare class Request_2 implements BodyMixin {
|
|
1478
|
+
constructor (input: RequestInfo_2, init?: RequestInit_2)
|
|
1395
1479
|
|
|
1396
1480
|
readonly cache: RequestCache
|
|
1397
1481
|
readonly credentials: RequestCredentials
|
|
1398
1482
|
readonly destination: RequestDestination
|
|
1399
|
-
readonly headers:
|
|
1483
|
+
readonly headers: Headers_2
|
|
1400
1484
|
readonly integrity: string
|
|
1401
1485
|
readonly method: string
|
|
1402
1486
|
readonly mode: RequestMode
|
|
@@ -1408,16 +1492,16 @@ declare class Request implements BodyMixin {
|
|
|
1408
1492
|
readonly signal: AbortSignal
|
|
1409
1493
|
readonly duplex: RequestDuplex
|
|
1410
1494
|
|
|
1411
|
-
readonly body:
|
|
1495
|
+
readonly body: ReadableStream_2 | null
|
|
1412
1496
|
readonly bodyUsed: boolean
|
|
1413
1497
|
|
|
1414
1498
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
1415
1499
|
readonly blob: () => Promise<Blob_2>
|
|
1416
|
-
readonly formData: () => Promise<
|
|
1500
|
+
readonly formData: () => Promise<FormData_2>
|
|
1417
1501
|
readonly json: () => Promise<unknown>
|
|
1418
1502
|
readonly text: () => Promise<string>
|
|
1419
1503
|
|
|
1420
|
-
readonly clone: () =>
|
|
1504
|
+
readonly clone: () => Request_2
|
|
1421
1505
|
}
|
|
1422
1506
|
|
|
1423
1507
|
declare type RequestCache =
|
|
@@ -1452,13 +1536,13 @@ declare type RequestDestination =
|
|
|
1452
1536
|
|
|
1453
1537
|
declare type RequestDuplex = 'half'
|
|
1454
1538
|
|
|
1455
|
-
declare type
|
|
1539
|
+
declare type RequestInfo_2 = string | URL_2 | Request_2
|
|
1456
1540
|
|
|
1457
|
-
declare interface
|
|
1541
|
+
declare interface RequestInit_2 {
|
|
1458
1542
|
method?: string
|
|
1459
1543
|
keepalive?: boolean
|
|
1460
|
-
headers?:
|
|
1461
|
-
body?:
|
|
1544
|
+
headers?: HeadersInit_2
|
|
1545
|
+
body?: BodyInit_2
|
|
1462
1546
|
redirect?: RequestRedirect
|
|
1463
1547
|
integrity?: string
|
|
1464
1548
|
signal?: AbortSignal
|
|
@@ -1475,10 +1559,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
|
|
|
1475
1559
|
|
|
1476
1560
|
declare type RequestRedirect = 'error' | 'follow' | 'manual'
|
|
1477
1561
|
|
|
1478
|
-
declare class
|
|
1479
|
-
constructor (body?:
|
|
1562
|
+
declare class Response_2 implements BodyMixin {
|
|
1563
|
+
constructor (body?: BodyInit_2, init?: ResponseInit_2)
|
|
1480
1564
|
|
|
1481
|
-
readonly headers:
|
|
1565
|
+
readonly headers: Headers_2
|
|
1482
1566
|
readonly ok: boolean
|
|
1483
1567
|
readonly status: number
|
|
1484
1568
|
readonly statusText: string
|
|
@@ -1486,26 +1570,26 @@ declare class Response implements BodyMixin {
|
|
|
1486
1570
|
readonly url: string
|
|
1487
1571
|
readonly redirected: boolean
|
|
1488
1572
|
|
|
1489
|
-
readonly body:
|
|
1573
|
+
readonly body: ReadableStream_2 | null
|
|
1490
1574
|
readonly bodyUsed: boolean
|
|
1491
1575
|
|
|
1492
1576
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
1493
1577
|
readonly blob: () => Promise<Blob_2>
|
|
1494
|
-
readonly formData: () => Promise<
|
|
1578
|
+
readonly formData: () => Promise<FormData_2>
|
|
1495
1579
|
readonly json: () => Promise<unknown>
|
|
1496
1580
|
readonly text: () => Promise<string>
|
|
1497
1581
|
|
|
1498
|
-
readonly clone: () =>
|
|
1582
|
+
readonly clone: () => Response_2
|
|
1499
1583
|
|
|
1500
|
-
static error ():
|
|
1501
|
-
static json(data: any, init?:
|
|
1502
|
-
static redirect (url: string | URL_2, status: ResponseRedirectStatus):
|
|
1584
|
+
static error (): Response_2
|
|
1585
|
+
static json(data: any, init?: ResponseInit_2): Response_2
|
|
1586
|
+
static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response_2
|
|
1503
1587
|
}
|
|
1504
1588
|
|
|
1505
|
-
declare interface
|
|
1589
|
+
declare interface ResponseInit_2 {
|
|
1506
1590
|
readonly status?: number
|
|
1507
1591
|
readonly statusText?: string
|
|
1508
|
-
readonly headers?:
|
|
1592
|
+
readonly headers?: HeadersInit_2
|
|
1509
1593
|
}
|
|
1510
1594
|
|
|
1511
1595
|
declare type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308
|
|
@@ -1543,13 +1627,20 @@ declare interface SpecIterator<T, TReturn = any, TNext = undefined> {
|
|
|
1543
1627
|
next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
|
|
1544
1628
|
}
|
|
1545
1629
|
|
|
1630
|
+
declare type TailConsumer = {
|
|
1631
|
+
/** The name of the service tail events will be forwarded to. */
|
|
1632
|
+
service: string;
|
|
1633
|
+
/** (Optional) The environt of the service. */
|
|
1634
|
+
environment?: string;
|
|
1635
|
+
};
|
|
1636
|
+
|
|
1546
1637
|
/**
|
|
1547
1638
|
* unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
|
|
1548
1639
|
*/
|
|
1549
1640
|
export declare function unstable_dev(script: string, options?: UnstableDevOptions, apiOptions?: unknown): Promise<UnstableDevWorker>;
|
|
1550
1641
|
|
|
1551
1642
|
export declare const unstable_pages: {
|
|
1552
|
-
|
|
1643
|
+
deploy: typeof deploy;
|
|
1553
1644
|
};
|
|
1554
1645
|
|
|
1555
1646
|
export declare interface UnstableDevOptions {
|
|
@@ -1569,9 +1660,7 @@ export declare interface UnstableDevOptions {
|
|
|
1569
1660
|
compatibilityFlags?: string[];
|
|
1570
1661
|
persist?: boolean;
|
|
1571
1662
|
persistTo?: string;
|
|
1572
|
-
vars?:
|
|
1573
|
-
[key: string]: unknown;
|
|
1574
|
-
};
|
|
1663
|
+
vars?: Record<string, string | Json>;
|
|
1575
1664
|
kv?: {
|
|
1576
1665
|
binding: string;
|
|
1577
1666
|
id: string;
|
|
@@ -1588,17 +1677,19 @@ export declare interface UnstableDevOptions {
|
|
|
1588
1677
|
bucket_name: string;
|
|
1589
1678
|
preview_bucket_name?: string;
|
|
1590
1679
|
}[];
|
|
1680
|
+
moduleRoot?: string;
|
|
1681
|
+
rules?: Rule[];
|
|
1591
1682
|
logLevel?: "none" | "info" | "error" | "log" | "warn" | "debug";
|
|
1592
1683
|
inspect?: boolean;
|
|
1593
1684
|
local?: boolean;
|
|
1594
1685
|
accountId?: string;
|
|
1595
1686
|
experimental?: {
|
|
1687
|
+
processEntrypoint?: boolean;
|
|
1688
|
+
additionalModules?: CfModule[];
|
|
1596
1689
|
d1Databases?: Environment["d1_databases"];
|
|
1597
1690
|
disableExperimentalWarning?: boolean;
|
|
1598
1691
|
disableDevRegistry?: boolean;
|
|
1599
1692
|
enablePagesAssetsServiceBinding?: EnablePagesAssetsServiceBindingOptions;
|
|
1600
|
-
experimentalLocal?: boolean;
|
|
1601
|
-
experimentalLocalRemoteKv?: boolean;
|
|
1602
1693
|
forceLocal?: boolean;
|
|
1603
1694
|
liveReload?: boolean;
|
|
1604
1695
|
showInteractiveDevSession?: boolean;
|
|
@@ -1612,7 +1703,7 @@ export declare interface UnstableDevWorker {
|
|
|
1612
1703
|
port: number;
|
|
1613
1704
|
address: string;
|
|
1614
1705
|
stop: () => Promise<void>;
|
|
1615
|
-
fetch: (input?:
|
|
1706
|
+
fetch: (input?: RequestInfo_2, init?: RequestInit_2) => Promise<Response_2>;
|
|
1616
1707
|
waitUntilExit: () => Promise<void>;
|
|
1617
1708
|
}
|
|
1618
1709
|
|