wrangler 4.45.4 → 4.47.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.4",
3
+ "version": "4.47.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -54,21 +54,23 @@
54
54
  "esbuild": "0.25.4",
55
55
  "path-to-regexp": "6.3.0",
56
56
  "unenv": "2.0.0-rc.24",
57
- "workerd": "1.20251011.0",
57
+ "workerd": "1.20251109.0",
58
58
  "@cloudflare/kv-asset-handler": "0.4.0",
59
- "@cloudflare/unenv-preset": "2.7.9",
60
- "miniflare": "4.20251011.2"
59
+ "@cloudflare/unenv-preset": "2.7.10",
60
+ "miniflare": "4.20251109.0"
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.20251109.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,10 +96,12 @@
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",
100
103
  "dotenv-expand": "^12.0.2",
104
+ "eslint": "^9.39.1",
101
105
  "execa": "^6.1.0",
102
106
  "find-up": "^6.3.0",
103
107
  "get-port": "^7.0.0",
@@ -143,16 +147,16 @@
143
147
  "yaml": "^2.8.1",
144
148
  "yargs": "^17.7.2",
145
149
  "@cloudflare/cli": "1.1.3",
146
- "@cloudflare/containers-shared": "0.2.13",
150
+ "@cloudflare/containers-shared": "0.3.0",
147
151
  "@cloudflare/eslint-config-shared": "1.1.0",
148
- "@cloudflare/pages-shared": "^0.13.82",
149
- "@cloudflare/workers-shared": "0.18.8",
150
- "@cloudflare/workers-tsconfig": "0.0.0",
152
+ "@cloudflare/pages-shared": "^0.13.84",
151
153
  "@cloudflare/workers-utils": "0.0.2",
154
+ "@cloudflare/workers-tsconfig": "0.0.0",
155
+ "@cloudflare/workers-shared": "0.18.8",
152
156
  "@cloudflare/workflows-shared": "0.3.8"
153
157
  },
154
158
  "peerDependencies": {
155
- "@cloudflare/workers-types": "^4.20251011.0"
159
+ "@cloudflare/workers-types": "^4.20251109.0"
156
160
  },
157
161
  "peerDependenciesMeta": {
158
162
  "@cloudflare/workers-types": {
@@ -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 {
@@ -976,6 +976,10 @@ type GetPlatformProxyOptions = {
976
976
  persist?: boolean | {
977
977
  path: string;
978
978
  };
979
+ /**
980
+ * Whether remote bindings should be enabled or not (defaults to `true`)
981
+ */
982
+ remoteBindings?: boolean;
979
983
  };
980
984
  /**
981
985
  * Result of the `getPlatformProxy` utility
@@ -1134,6 +1138,37 @@ declare class Logger {
1134
1138
  */
1135
1139
  declare function splitSqlQuery(sql: string): string[];
1136
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 name of the worker */
1150
+ workerName: string;
1151
+ /** The path to the project (defaults to cwd) */
1152
+ projectPath: string;
1153
+ /** The content of the project's package.json file (if any) */
1154
+ packageJson?: PackageJSON;
1155
+ /** Whether the project is already configured (no autoconfig required) */
1156
+ configured: boolean;
1157
+ /** Details about the detected framework (if any) */
1158
+ framework?: Framework;
1159
+ /** The build command used to build the project (if any) */
1160
+ buildCommand?: string;
1161
+ /** The output directory (if no framework is used, points to the raw asset files) */
1162
+ outputDir?: string;
1163
+ };
1164
+
1165
+ declare function getDetailsForAutoConfig({ projectPath, wranglerConfig, }?: {
1166
+ projectPath?: string;
1167
+ wranglerConfig?: Config;
1168
+ }): Promise<AutoConfigDetails>;
1169
+
1170
+ declare function runAutoConfig(autoConfigDetails: AutoConfigDetails): Promise<void>;
1171
+
1137
1172
  /**
1138
1173
  * Make a fetch request, and extract the `result` from the JSON response.
1139
1174
  */
@@ -1187,6 +1222,16 @@ type Teams =
1187
1222
  | "Product: SSL"
1188
1223
  | "Product: WVPC";
1189
1224
 
1225
+ /** Convert literal string types like 'foo-bar' to 'FooBar' */
1226
+ type PascalCase<S extends string> = string extends S ? string : S extends `${infer T}-${infer U}` ? `${Capitalize<T>}${PascalCase<U>}` : Capitalize<S>;
1227
+ /** Convert literal string types like 'foo-bar' to 'fooBar' */
1228
+ type CamelCase<S extends string> = string extends S ? string : S extends `${infer T}-${infer U}` ? `${T}${PascalCase<U>}` : S;
1229
+ type CamelCaseKey<K extends PropertyKey> = K extends string ? Exclude<CamelCase<K>, ""> : K;
1230
+ type Alias<O extends Options | PositionalOptions> = O extends {
1231
+ alias: infer T;
1232
+ } ? T extends Exclude<string, T> ? {
1233
+ [key in T]: InferredOptionType<O>;
1234
+ } : {} : {};
1190
1235
  type StringKeyOf<T> = Extract<keyof T, string>;
1191
1236
  type DeepFlatten<T> = T extends object ? {
1192
1237
  [K in keyof T]: DeepFlatten<T[K]>;
@@ -1442,4 +1487,4 @@ interface Unstable_ASSETSBindingsOptions {
1442
1487
  }
1443
1488
  declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
1444
1489
 
1445
- 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 };
1490
+ 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 };