Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

wrangler

Package Overview
Dependencies
Maintainers
1
Versions
4860
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wrangler - npm Package Compare versions

Comparing version
4.65.0
to
4.66.0
+10
-10
package.json
{
"name": "wrangler",
"version": "4.65.0",
"version": "4.66.0",
"description": "Command-line interface for all things Cloudflare Workers",

@@ -57,6 +57,6 @@ "keywords": [

"unenv": "2.0.0-rc.24",
"workerd": "1.20260212.0",
"workerd": "1.20260217.0",
"@cloudflare/kv-asset-handler": "0.4.2",
"@cloudflare/unenv-preset": "2.12.1",
"miniflare": "4.20260212.0"
"@cloudflare/unenv-preset": "2.13.0",
"miniflare": "4.20260217.0"
},

@@ -67,3 +67,3 @@ "devDependencies": {

"@cloudflare/types": "6.18.4",
"@cloudflare/workers-types": "^4.20260212.0",
"@cloudflare/workers-types": "^4.20260217.0",
"@cspotcode/source-map-support": "0.8.1",

@@ -155,10 +155,10 @@ "@netlify/build-info": "^10.2.0",

"@cloudflare/eslint-config-shared": "1.2.1",
"@cloudflare/pages-shared": "^0.13.107",
"@cloudflare/pages-shared": "^0.13.108",
"@cloudflare/workers-tsconfig": "0.0.0",
"@cloudflare/workers-shared": "0.19.0",
"@cloudflare/workers-tsconfig": "0.0.0",
"@cloudflare/workers-utils": "0.10.0",
"@cloudflare/workflows-shared": "0.4.0"
"@cloudflare/workflows-shared": "0.4.0",
"@cloudflare/workers-utils": "0.11.0"
},
"peerDependencies": {
"@cloudflare/workers-types": "^4.20260212.0"
"@cloudflare/workers-types": "^4.20260217.0"
},

@@ -165,0 +165,0 @@ "peerDependenciesMeta": {

@@ -6,2 +6,14 @@ import { newWorkersRpcResponse } from "capnweb";

/**
* List of RPC methods exposed by the raw AI binding that need proxying
* through a plain-object wrapper. The raw AI binding (deployed with raw:true)
* has a non-standard prototype that capnweb's typeForRpc() doesn't recognise,
* causing "RPC stub points at a non-serializable type". By wrapping only the
* allowed RPC methods in a plain object we give capnweb an Object.prototype
* target it can navigate.
*
* Add new AI RPC method names here as they are introduced.
*/
const AI_RPC_METHODS = ["aiSearch"] as const;
class BindingNotFoundError extends Error {

@@ -58,2 +70,7 @@ constructor(name?: string) {

* packages/miniflare/src/workers/dispatch-namespace/dispatch-namespace.worker.ts
* - AI bindings (raw:true / minimal_mode) have a workerd-internal prototype
* that capnweb's typeForRpc() classifies as "unsupported", causing
* "RPC stub points at a non-serializable type". We wrap the binding in a
* plain object that delegates only the allowed RPC methods (AI_RPC_METHODS)
* so capnweb gets an Object.prototype target it can navigate.
*

@@ -98,2 +115,15 @@ * getExposedJSRPCBinding() and getExposedFetcher() perform the logic for figuring out

if (url.searchParams.get("MF-Binding-Type") === "ai") {
const wrapper: Record<string, (...args: unknown[]) => unknown> = {};
for (const method of AI_RPC_METHODS) {
if (typeof (targetBinding as any)[method] === "function") {
wrapper[method] = (...args: unknown[]) =>
(targetBinding as any)[method](...args);
}
}
if (Object.keys(wrapper).length > 0) {
return wrapper;
}
}
if (url.searchParams.has("MF-Dispatch-Namespace-Options")) {

@@ -100,0 +130,0 @@ const { name, args, options } = JSON.parse(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display