wrangler 4.45.3 → 4.46.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.45.3",
3
+ "version": "4.46.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -53,22 +53,24 @@
53
53
  "blake3-wasm": "2.1.5",
54
54
  "esbuild": "0.25.4",
55
55
  "path-to-regexp": "6.3.0",
56
- "unenv": "2.0.0-rc.21",
57
- "workerd": "1.20251011.0",
56
+ "unenv": "2.0.0-rc.24",
57
+ "workerd": "1.20251105.0",
58
58
  "@cloudflare/kv-asset-handler": "0.4.0",
59
- "@cloudflare/unenv-preset": "2.7.8",
60
- "miniflare": "4.20251011.1"
59
+ "miniflare": "4.20251105.0",
60
+ "@cloudflare/unenv-preset": "2.7.9"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@cloudflare/types": "6.18.4",
65
- "@cloudflare/workers-types": "^4.20251011.0",
65
+ "@cloudflare/workers-types": "^4.20251014.0",
66
66
  "@cspotcode/source-map-support": "0.8.1",
67
67
  "@iarna/toml": "^3.0.0",
68
+ "@netlify/build-info": "^10.0.9",
68
69
  "@sentry/node": "^7.86.0",
69
70
  "@sentry/types": "^7.86.0",
70
71
  "@sentry/utils": "^7.86.0",
71
72
  "@types/command-exists": "^1.2.0",
73
+ "@types/cross-spawn": "^6.0.2",
72
74
  "@types/glob-to-regexp": "^0.4.1",
73
75
  "@types/is-ci": "^3.0.0",
74
76
  "@types/javascript-time-ago": "^2.0.3",
@@ -94,6 +96,7 @@
94
96
  "cmd-shim": "^4.1.0",
95
97
  "command-exists": "^1.2.9",
96
98
  "concurrently": "^8.2.2",
99
+ "cross-spawn": "^7.0.3",
97
100
  "date-fns": "^4.1.0",
98
101
  "devtools-protocol": "^0.0.1182435",
99
102
  "dotenv": "^16.3.1",
@@ -142,17 +145,17 @@
142
145
  "xxhash-wasm": "^1.0.1",
143
146
  "yaml": "^2.8.1",
144
147
  "yargs": "^17.7.2",
145
- "@cloudflare/containers-shared": "0.2.13",
146
148
  "@cloudflare/cli": "1.1.3",
149
+ "@cloudflare/containers-shared": "0.3.0",
147
150
  "@cloudflare/eslint-config-shared": "1.1.0",
148
- "@cloudflare/pages-shared": "^0.13.81",
149
151
  "@cloudflare/workers-shared": "0.18.8",
152
+ "@cloudflare/pages-shared": "^0.13.83",
150
153
  "@cloudflare/workers-tsconfig": "0.0.0",
151
- "@cloudflare/workers-utils": "0.0.2",
152
- "@cloudflare/workflows-shared": "0.3.8"
154
+ "@cloudflare/workflows-shared": "0.3.8",
155
+ "@cloudflare/workers-utils": "0.0.2"
153
156
  },
154
157
  "peerDependencies": {
155
- "@cloudflare/workers-types": "^4.20251011.0"
158
+ "@cloudflare/workers-types": "^4.20251014.0"
156
159
  },
157
160
  "peerDependenciesMeta": {
158
161
  "@cloudflare/workers-types": {
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Welcome to Cloudflare Workers! This is your first scheduled worker.
3
3
  *
4
- * - Run `wrangler dev --local` in your terminal to start a development server
5
- * - Run `curl "http://localhost:8787/cdn-cgi/mf/scheduled"` to trigger the scheduled event
4
+ * - Run `wrangler dev` in your terminal to start a development server
5
+ * - Run `curl "http://localhost:8787/cdn-cgi/handler/scheduled"` to trigger the scheduled event
6
6
  * - Go back to the console to see what your worker has logged
7
- * - Update the Cron trigger in wrangler.toml (see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers)
7
+ * - Update the Cron trigger in wrangler.toml (see https://developers.cloudflare.com/workers/configuration/cron-triggers/)
8
8
  * - Run `wrangler publish --name my-worker` to publish your worker
9
9
  *
10
10
  * Learn more at https://developers.cloudflare.com/workers/runtime-apis/scheduled-event/
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Welcome to Cloudflare Workers! This is your first scheduled worker.
3
3
  *
4
- * - Run `wrangler dev --local` in your terminal to start a development server
5
- * - Run `curl "http://localhost:8787/cdn-cgi/mf/scheduled"` to trigger the scheduled event
4
+ * - Run `wrangler dev` in your terminal to start a development server
5
+ * - Run `curl "http://localhost:8787/cdn-cgi/handler/scheduled"` to trigger the scheduled event
6
6
  * - Go back to the console to see what your worker has logged
7
- * - Update the Cron trigger in wrangler.toml (see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers)
7
+ * - Update the Cron trigger in wrangler.toml (see https://developers.cloudflare.com/workers/configuration/cron-triggers/)
8
8
  * - Run `wrangler deploy --name my-worker` to deploy your worker
9
9
  *
10
10
  * Learn more at https://developers.cloudflare.com/workers/runtime-apis/scheduled-event/
@@ -1,4 +1,4 @@
1
- import { Rule, CfModule, Environment, Config, CfScriptFormat, CfModuleType, CfKvNamespace, CfSendEmailBindings, CfBrowserBinding, CfAIBinding, CfImagesBinding, CfDurableObject, CfWorkflow, CfQueue, CfR2Bucket, CfD1Database, CfVectorize, CfHyperdrive, CfService, CfAnalyticsEngineDataset, CfDispatchNamespace, CfMTlsCertificate, CfPipeline, CfSecretsStoreSecrets, CfLogfwdrBinding, CfHelloWorld, CfRateLimit, CfWorkerLoader, CfVpcService, CfMediaBinding, DurableObjectMigration, ContainerApp, ZoneIdRoute, ZoneNameRoute, CustomDomainRoute, CfTailConsumer, ContainerEngine, CfUnsafe, ConfigBindingOptions, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, ParseError, UserError, FatalError } from '@cloudflare/workers-utils';
1
+ import { Rule, CfModule, Environment, Config, CfScriptFormat, CfModuleType, CfKvNamespace, CfSendEmailBindings, CfBrowserBinding, CfAIBinding, CfImagesBinding, CfDurableObject, CfWorkflow, CfQueue, CfR2Bucket, CfD1Database, CfVectorize, CfHyperdrive, CfService, CfAnalyticsEngineDataset, CfDispatchNamespace, CfMTlsCertificate, CfPipeline, CfSecretsStoreSecrets, CfLogfwdrBinding, CfHelloWorld, CfRateLimit, CfWorkerLoader, CfVpcService, CfMediaBinding, DurableObjectMigration, ContainerApp, ZoneIdRoute, ZoneNameRoute, CustomDomainRoute, CfTailConsumer, ContainerEngine, CfUnsafe, ConfigBindingOptions, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, ParseError, RawConfig, PackageJSON, UserError, FatalError } from '@cloudflare/workers-utils';
2
2
  export { ConfigBindingOptions as Experimental_ConfigBindingOptions, Config as Unstable_Config, RawConfig as Unstable_RawConfig, RawEnvironment as Unstable_RawEnvironment, experimental_patchConfig, experimental_readRawConfig } from '@cloudflare/workers-utils';
3
3
  import { Json, Request, Response as Response$1, NodeJSCompatMode, DispatchFetch, Miniflare, WorkerRegistry, MiniflareOptions, Mutex, WorkerOptions, ModuleRule, RemoteProxyConnectionString } from 'miniflare';
4
4
  import * as undici from 'undici';
@@ -10,7 +10,7 @@ import Protocol from 'devtools-protocol/types/protocol-mapping';
10
10
  import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
11
11
  import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
12
12
  import { URLSearchParams } from 'node:url';
13
- import { Argv, PositionalOptions, Options, CamelCaseKey, ArgumentsCamelCase, InferredOptionTypes, Alias } from 'yargs';
13
+ import { Argv, PositionalOptions, Options, ArgumentsCamelCase, InferredOptionTypes, InferredOptionType } from 'yargs';
14
14
  import Cloudflare from 'cloudflare';
15
15
 
16
16
  interface EnablePagesAssetsServiceBindingOptions {
@@ -491,6 +491,9 @@ interface StartDevWorkerInput {
491
491
  };
492
492
  unsafe?: Omit<CfUnsafe, "bindings">;
493
493
  assets?: string;
494
+ experimental?: {
495
+ tailLogs: boolean;
496
+ };
494
497
  }
495
498
  type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets" | "containers"> & {
496
499
  /** A worker's directory. Usually where the Wrangler configuration file is located */
@@ -807,6 +810,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
807
810
  runtimeMessageMutex: Mutex;
808
811
  sendMessageToProxyWorker(message: ProxyWorkerIncomingRequestBody, retries?: number): Promise<void>;
809
812
  sendMessageToInspectorProxyWorker(message: InspectorProxyWorkerIncomingWebSocketMessage, retries?: number): Promise<void>;
813
+ get inspectorEnabled(): boolean;
810
814
  onConfigUpdate(data: ConfigUpdateEvent): void;
811
815
  onBundleStart(data: BundleStartEvent): void;
812
816
  onReloadStart(data: ReloadStartEvent): void;
@@ -972,6 +976,10 @@ type GetPlatformProxyOptions = {
972
976
  persist?: boolean | {
973
977
  path: string;
974
978
  };
979
+ /**
980
+ * Whether remote bindings should be enabled or not (defaults to `true`)
981
+ */
982
+ remoteBindings?: boolean;
975
983
  };
976
984
  /**
977
985
  * Result of the `getPlatformProxy` utility
@@ -1130,6 +1138,35 @@ declare class Logger {
1130
1138
  */
1131
1139
  declare function splitSqlQuery(sql: string): string[];
1132
1140
 
1141
+ declare abstract class Framework {
1142
+ abstract name: string;
1143
+ /** Some frameworks (i.e. Nuxt) don't need additional configuration */
1144
+ get configured(): boolean;
1145
+ abstract configure(outputDir: string): Promise<RawConfig> | RawConfig;
1146
+ }
1147
+
1148
+ type AutoConfigDetails = {
1149
+ /** The path to the project (defaults to cwd) */
1150
+ projectPath: string;
1151
+ /** The content of the project's package.json file (if any) */
1152
+ packageJson?: PackageJSON;
1153
+ /** Whether the project is already configured (no autoconfig required) */
1154
+ configured: boolean;
1155
+ /** Details about the detected framework (if any) */
1156
+ framework?: Framework;
1157
+ /** The build command used to build the project (if any) */
1158
+ buildCommand?: string;
1159
+ /** The output directory (if no framework is used, points to the raw asset files) */
1160
+ outputDir?: string;
1161
+ };
1162
+
1163
+ declare function getDetailsForAutoConfig({ projectPath, wranglerConfig, }?: {
1164
+ projectPath?: string;
1165
+ wranglerConfig?: Config;
1166
+ }): Promise<AutoConfigDetails>;
1167
+
1168
+ declare function runAutoConfig(autoConfigDetails: AutoConfigDetails): Promise<void>;
1169
+
1133
1170
  /**
1134
1171
  * Make a fetch request, and extract the `result` from the JSON response.
1135
1172
  */
@@ -1183,6 +1220,16 @@ type Teams =
1183
1220
  | "Product: SSL"
1184
1221
  | "Product: WVPC";
1185
1222
 
1223
+ /** Convert literal string types like 'foo-bar' to 'FooBar' */
1224
+ type PascalCase<S extends string> = string extends S ? string : S extends `${infer T}-${infer U}` ? `${Capitalize<T>}${PascalCase<U>}` : Capitalize<S>;
1225
+ /** Convert literal string types like 'foo-bar' to 'fooBar' */
1226
+ type CamelCase<S extends string> = string extends S ? string : S extends `${infer T}-${infer U}` ? `${T}${PascalCase<U>}` : S;
1227
+ type CamelCaseKey<K extends PropertyKey> = K extends string ? Exclude<CamelCase<K>, ""> : K;
1228
+ type Alias<O extends Options | PositionalOptions> = O extends {
1229
+ alias: infer T;
1230
+ } ? T extends Exclude<string, T> ? {
1231
+ [key in T]: InferredOptionType<O>;
1232
+ } : {} : {};
1186
1233
  type StringKeyOf<T> = Extract<keyof T, string>;
1187
1234
  type DeepFlatten<T> = T extends object ? {
1188
1235
  [K in keyof T]: DeepFlatten<T[K]>;
@@ -1438,4 +1485,4 @@ interface Unstable_ASSETSBindingsOptions {
1438
1485
  }
1439
1486
  declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
1440
1487
 
1441
- export { type Binding, type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, type Unstable_ASSETSBindingsOptions, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, experimental_getWranglerCommands, getPlatformProxy, maybeStartOrUpdateRemoteProxySession, startRemoteProxySession, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
1488
+ export { type Binding, type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, type Unstable_ASSETSBindingsOptions, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, Framework as experimental_AutoConfigFramework, getDetailsForAutoConfig as experimental_getDetailsForAutoConfig, experimental_getWranglerCommands, runAutoConfig as experimental_runAutoConfig, getPlatformProxy, maybeStartOrUpdateRemoteProxySession, startRemoteProxySession, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };