Including secrets in types generated by wrangler

I am trying to use npx wrangler types to allow my wrangler.toml to be the source of truth for my worker types. I previously used a bindings.ts file that had something like:
export interface Bindings {
PUBLIC_CACHE: KVNamespace
SECRET_API_KEY: string
}
export interface Bindings {
PUBLIC_CACHE: KVNamespace
SECRET_API_KEY: string
}
where the SECRET_API_KEY is added with echo 'abcdef12345' | npx wrangler secret put SECRET_API_KEY. I noted in a comment in my wrangler.toml that this exists, but otherwise it's not included. When generating types, the secret is not generated in the Env within worker-configuration.d.ts presumably because it's not in wrangler.toml. Is there a way to include secrets that wrangler has created but that are not included in wrangler.toml when generating types?
1 Reply
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View