wrangler 4.64.0 → 4.65.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.64.0",
3
+ "version": "4.65.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -54,16 +54,16 @@
54
54
  "esbuild": "0.27.3",
55
55
  "path-to-regexp": "6.3.0",
56
56
  "unenv": "2.0.0-rc.24",
57
- "workerd": "1.20260210.0",
57
+ "workerd": "1.20260212.0",
58
58
  "@cloudflare/kv-asset-handler": "0.4.2",
59
59
  "@cloudflare/unenv-preset": "2.12.1",
60
- "miniflare": "4.20260210.0"
60
+ "miniflare": "4.20260212.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@bomb.sh/tab": "^0.0.12",
65
65
  "@cloudflare/types": "6.18.4",
66
- "@cloudflare/workers-types": "^4.20260210.0",
66
+ "@cloudflare/workers-types": "^4.20260212.0",
67
67
  "@cspotcode/source-map-support": "0.8.1",
68
68
  "@netlify/build-info": "^10.2.0",
69
69
  "@sentry/node": "^7.86.0",
@@ -73,7 +73,6 @@
73
73
  "@types/cross-spawn": "^6.0.2",
74
74
  "@types/esprima": "^4.0.3",
75
75
  "@types/glob-to-regexp": "^0.4.1",
76
- "@types/is-ci": "^3.0.0",
77
76
  "@types/javascript-time-ago": "^2.0.3",
78
77
  "@types/json-diff": "^1.0.3",
79
78
  "@types/mime": "^3.0.4",
@@ -93,6 +92,7 @@
93
92
  "capnweb": "^0.1.0",
94
93
  "chalk": "^5.2.0",
95
94
  "chokidar": "^4.0.1",
95
+ "ci-info": "^4.4.0",
96
96
  "cli-table3": "^0.6.3",
97
97
  "cloudflare": "^5.2.0",
98
98
  "cmd-shim": "^4.1.0",
@@ -110,7 +110,6 @@
110
110
  "get-port": "^7.0.0",
111
111
  "glob-to-regexp": "^0.4.1",
112
112
  "https-proxy-agent": "7.0.2",
113
- "is-ci": "^3.0.1",
114
113
  "itty-time": "^1.0.6",
115
114
  "javascript-time-ago": "^2.5.4",
116
115
  "json-diff": "^1.0.6",
@@ -135,6 +134,7 @@
135
134
  "source-map": "^0.6.1",
136
135
  "supports-color": "^9.2.2",
137
136
  "timeago.js": "^4.0.2",
137
+ "tree-kill": "^1.2.2",
138
138
  "ts-dedent": "^2.2.0",
139
139
  "ts-json-schema-generator": "^1.5.0",
140
140
  "tsup": "8.3.0",
@@ -150,14 +150,14 @@
150
150
  "@cloudflare/cli": "1.2.1",
151
151
  "@cloudflare/containers-shared": "0.9.0",
152
152
  "@cloudflare/eslint-config-shared": "1.2.1",
153
- "@cloudflare/pages-shared": "^0.13.106",
153
+ "@cloudflare/pages-shared": "^0.13.107",
154
+ "@cloudflare/workers-shared": "0.19.0",
154
155
  "@cloudflare/workers-tsconfig": "0.0.0",
155
- "@cloudflare/workers-utils": "0.9.1",
156
- "@cloudflare/workflows-shared": "0.4.0",
157
- "@cloudflare/workers-shared": "0.19.0"
156
+ "@cloudflare/workers-utils": "0.10.0",
157
+ "@cloudflare/workflows-shared": "0.4.0"
158
158
  },
159
159
  "peerDependencies": {
160
- "@cloudflare/workers-types": "^4.20260210.0"
160
+ "@cloudflare/workers-types": "^4.20260212.0"
161
161
  },
162
162
  "peerDependenciesMeta": {
163
163
  "@cloudflare/workers-types": {
@@ -1,5 +1,5 @@
1
- import { Rule as Rule$1, CfModule, Environment as Environment$1, CfScriptFormat, CfModuleType, Config as Config$1, Binding, DurableObjectMigration as DurableObjectMigration$1, ContainerApp as ContainerApp$1, Trigger, CfTailConsumer, ServiceFetch, ContainerEngine as ContainerEngine$1, CfUnsafe, ConfigBindingOptions, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, RawConfig as RawConfig$1, PackageJSON, ParseError, CfWorkerInit, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
2
- export { Binding, ConfigBindingOptions as Experimental_ConfigBindingOptions, experimental_patchConfig, experimental_readRawConfig, defaultWranglerConfig as unstable_defaultWranglerConfig } from '@cloudflare/workers-utils';
1
+ import { Rule as Rule$1, CfModule, Environment as Environment$1, CfScriptFormat, CfModuleType, Config as Config$1, Binding, DurableObjectMigration as DurableObjectMigration$1, ContainerApp as ContainerApp$1, Trigger, CfTailConsumer, ServiceFetch, ContainerEngine as ContainerEngine$1, CfUnsafe, ConfigBindingFieldName, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, RawConfig as RawConfig$1, PackageJSON, ParseError, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
2
+ export { Binding, experimental_patchConfig, experimental_readRawConfig, defaultWranglerConfig as unstable_defaultWranglerConfig } from '@cloudflare/workers-utils';
3
3
  import { Json as Json$1, WorkerRegistry, Miniflare, MiniflareOptions, Mutex, Response as Response$1, NodeJSCompatMode, DispatchFetch, RemoteProxyConnectionString, WorkerOptions, ModuleRule, Request } from 'miniflare';
4
4
  import * as undici from 'undici';
5
5
  import { RequestInfo, RequestInit, Response, FormData } from 'undici';
@@ -575,6 +575,13 @@ interface StartDevWorkerInput {
575
575
  envFiles?: string[];
576
576
  /** The bindings available to the worker. The specified bindind type will be exposed to the worker on the `env` object under the same key. */
577
577
  bindings?: Record<string, Binding>;
578
+ /**
579
+ * Default bindings that can be overridden by config bindings.
580
+ * Useful for injecting environment-specific defaults like CF_PAGES variables.
581
+ */
582
+ defaultBindings?: Record<string, Extract<Binding, {
583
+ type: "plain_text";
584
+ }>>;
578
585
  migrations?: DurableObjectMigration$1[];
579
586
  containers?: ContainerApp$1[];
580
587
  /** The triggers which will cause the worker's exported default handlers to be called. */
@@ -724,7 +731,7 @@ type DeferredPromise<T> = {
724
731
  resolve: (_: MaybePromise<T>) => void;
725
732
  reject: (_: Error) => void;
726
733
  };
727
- declare function convertConfigBindingsToStartWorkerBindings(configBindings: ConfigBindingOptions): StartDevWorkerOptions["bindings"];
734
+ declare function convertConfigBindingsToStartWorkerBindings(configBindings: Partial<Pick<Config$1, ConfigBindingFieldName>>): StartDevWorkerOptions["bindings"];
728
735
 
729
736
  declare function startWorker(options: StartDevWorkerInput): Promise<Worker>;
730
737
 
@@ -2334,6 +2341,13 @@ interface EnvironmentMap {
2334
2341
  };
2335
2342
  }
2336
2343
 
2344
+ /**
2345
+ * A binding type for vars - plain_text, json, or secret_text.
2346
+ * Used as the return type for getVarsForDev.
2347
+ */
2348
+ type VarBinding = Extract<Binding, {
2349
+ type: "plain_text" | "json" | "secret_text";
2350
+ }>;
2337
2351
  /**
2338
2352
  * Get the Worker `vars` bindings for a `wrangler dev` instance of a Worker.
2339
2353
  *
@@ -2360,9 +2374,15 @@ interface EnvironmentMap {
2360
2374
  * @param vars - The existing `vars` bindings from the Wrangler configuration.
2361
2375
  * @param env - The specific environment name (e.g., "staging") or `undefined` if no specific environment is set.
2362
2376
  * @param silent - If true, will not log any messages about the loaded .dev.vars files or .env files.
2363
- * @returns The merged `vars` bindings, including those loaded from `.dev.vars` or `.env` files.
2377
+ * @returns The merged `vars` as typed bindings. Config vars are `plain_text`/`json`, while `.dev.vars`/`.env` vars are `secret_text`.
2364
2378
  */
2365
- declare function getVarsForDev(configPath: string | undefined, envFiles: string[] | undefined, vars: Config$1["vars"], env: string | undefined, silent?: boolean): Config$1["vars"];
2379
+ declare function getVarsForDev(configPath: string | undefined, envFiles: string[] | undefined, vars: Config$1["vars"], env: string | undefined, silent?: boolean): Record<string, VarBinding>;
2380
+
2381
+ interface PackageManager {
2382
+ type: "npm" | "yarn" | "pnpm" | "bun";
2383
+ npx: string;
2384
+ dlx: string[];
2385
+ }
2366
2386
 
2367
2387
  /** Makes a subset of properties in a type optional
2368
2388
  *
@@ -2383,6 +2403,7 @@ type ConfigurationOptions = {
2383
2403
  projectPath: string;
2384
2404
  workerName: string;
2385
2405
  dryRun: boolean;
2406
+ packageManager: PackageManager;
2386
2407
  };
2387
2408
  type PackageJsonScriptsOverrides = {
2388
2409
  preview?: string;
@@ -2422,6 +2443,8 @@ type AutoConfigDetailsBase = {
2422
2443
  buildCommand?: string;
2423
2444
  /** The output directory (if no framework is used, points to the raw asset files) */
2424
2445
  outputDir: string;
2446
+ /** The detected package manager for the project */
2447
+ packageManager: PackageManager;
2425
2448
  };
2426
2449
  type AutoConfigDetailsForConfiguredProject = Optional<AutoConfigDetailsBase, "framework" | "outputDir"> & {
2427
2450
  configured: true;
@@ -2701,9 +2724,10 @@ type PrintContext = {
2701
2724
  unsafeMetadata?: Record<string, unknown>;
2702
2725
  };
2703
2726
  /**
2704
- * Print all the bindings a worker using a given config would have access to
2727
+ * Print all the bindings a worker would have access to.
2728
+ * Accepts StartDevWorkerInput["bindings"] format
2705
2729
  */
2706
- declare function printBindings(bindings: Partial<CfWorkerInit["bindings"]>, tailConsumers?: CfTailConsumer[], streamingTailConsumers?: CfTailConsumer[], containers?: ContainerApp$1[], context?: Omit<PrintContext, "unsafeMetadata">): void;
2730
+ declare function printBindings(bindings: StartDevWorkerInput["bindings"], tailConsumers?: CfTailConsumer[], streamingTailConsumers?: CfTailConsumer[], containers?: ContainerApp$1[], context?: PrintContext): void;
2707
2731
 
2708
2732
  /**
2709
2733
  * Split an SQLQuery into an array of statements