We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrangler
3.105.1
MacOS
No response
When a binding is set to version_metadata, and wrangler types is run, the type generated is missing the timestamp field in worker-configuration.d.ts.
version_metadata
wrangler types
worker-configuration.d.ts
Wrangler configuration:
"version_metadata": { "binding": "CF_VERSION_METADATA" }
Type generated:
interface Env { CF_VERSION_METADATA: { id: string; tag: string }; }
Relevant code:
workers-sdk/packages/wrangler/src/type-generation/index.ts
Line 423 in 135dd85
Confusingly the docs also expose this bug - showing different vars returned for JS & TS
const { id: versionId, tag: versionTag, timestamp: versionTimestamp } = env.CF_VERSION_METADATA;
const { id: versionId, tag: versionTag } = env.CF_VERSION_METADATA;
Edit worker-configuration.d.ts to manually add timestamp: string to the CF_VERSION_METADATA field
timestamp: string
CF_VERSION_METADATA
interface Env { CF_VERSION_METADATA: { id: string; tag: string; timestamp: string }; }
This must be repeated each time wrangler types is run
The text was updated successfully, but these errors were encountered:
#7954 bugs running
Sorry, something went wrong.
No branches or pull requests
Which Cloudflare product(s) does this pertain to?
Wrangler
What versions are you using?
3.105.1
What operating system and version are you using?
MacOS
Please provide a link to a minimal reproduction
No response
Describe the Bug
When a binding is set to
version_metadata
, andwrangler types
is run, the type generated is missing the timestamp field inworker-configuration.d.ts
.Wrangler configuration:
Type generated:
Relevant code:
workers-sdk/packages/wrangler/src/type-generation/index.ts
Line 423 in 135dd85
Confusingly the docs also expose this bug - showing different vars returned for JS & TS
Workaround
Edit
worker-configuration.d.ts
to manually addtimestamp: string
to theCF_VERSION_METADATA
fieldThis must be repeated each time
wrangler types
is runPlease provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: