github cloudflare/workers-sdk wrangler@4.28.1

Patch Changes

  • #10130 773cca3 Thanks @dario-piotrowicz! - update maybeStartOrUpdateRemoteProxySession config argument (to allow callers to specify an environment)

    Before this change maybeStartOrUpdateRemoteProxySession could be called with either the path to a wrangler config file or the configuration of a worker. The former override however did not allow the caller to specify an environment, so the maybeStartOrUpdateRemoteProxySession API has been updated so that in the wrangler config case an object (with the path and a potential environment) needs to be passed instead.

    For example, before callers could invoke the function in the following way

    await maybeStartOrUpdateRemoteProxySession(configPath);

    note that there is no way to tell the function what environment to use when parsing the wrangle configuration.

    Now callers will instead call the function in the following way:

    await maybeStartOrUpdateRemoteProxySession({
    	path: configPath,
    	environment: targetEnvironment,
    });

    note that now a target environment can be specified.

  • #10130 773cca3 Thanks @dario-piotrowicz! - fix getPlatformProxy not taking into account the potentially specified environment for remote bindings

  • #10122 2e8eb24 Thanks @dario-piotrowicz! - fix startWorker not respecting auth options for remote bindings

    fix startWorker currently not taking into account the auth field
    that can be provided as part of the dev options when used in conjunction
    with remote bindings

    example:

    Given the following

    import { unstable_startWorker } from "wrangler";
    
    const worker = await unstable_startWorker({
    	entrypoint: "./worker.js",
    	bindings: {
    		AI: {
    			type: "ai",
    			experimental_remote: true,
    		},
    	},
    	dev: {
    		experimentalRemoteBindings: true,
    		auth: {
    			accountId: "<ACCOUNT_ID>",
    			apiToken: {
    				apiToken: "<API_TOKEN>",
    			},
    		},
    	},
    });
    
    await worker.ready;

    wrangler will now use the provided <ACCOUNT_ID> and <API_TOKEN> to integrate with
    the remote AI binding instead of requiring the user to authenticate.

  • #10209 93c4c26 Thanks @devin-ai-integration! - fix: strip ANSI escape codes from log files to improve readability and parsing

  • #9774 48853a6 Thanks @nikitassharma! - Validate container configuration against account limits in wrangler to give early feedback to the user

  • #10122 2e8eb24 Thanks @dario-piotrowicz! - fix incorrect TypeScript type for AI binding in the startWorker API

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.