wrangler
Advanced tools
+10
-10
| { | ||
| "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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
15673906
0.05%12981
0.31%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated