Skip to content

getPlatformProxy "persist" docs are missleading #22007

Closed
@clibequilibrium

Description

@clibequilibrium

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

v3+

Please provide a link to a minimal reproduction

No response

Describe the Bug

Hi, getPlatformProxy , persist option expects a boolean or string. However if the user passes a string path it is not respected. See this line in wrangler https://github.com/cloudflare/workers-sdk/blob/d34ef3d5b0e45470e6c06a7bd24a498f85b98af8/packages/wrangler/src/api/integrations/platform/index.ts#L226

This fails:

platform = await getPlatformProxy({
		persist:  './test-path'
	});

This succeeds:

platform = await getPlatformProxy({
		persist: { path: './test-path' }
	});

Either docs need to be edited or wrangler has to be fixed to respect the string parameter.

https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy

Metadata

Metadata

Labels

bugSomething isn't workingproduct:workersRelated to Workers product

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions