(env: CloudflareBindings)
| 37 | ] as const satisfies readonly (keyof CloudflareBindings)[]; |
| 38 | |
| 39 | function syncTextEnvironment(env: CloudflareBindings): void { |
| 40 | // Text provider config still reads process.env. In Workers all bindings are |
| 41 | // stable per deployment, so copying known string bindings before generation |
| 42 | // is deterministic across concurrent requests in the same isolate. |
| 43 | for (const key of TEXT_ENV_KEYS) { |
| 44 | const value = env[key]; |
| 45 | if (typeof value === "string") { |
| 46 | process.env[key] = value; |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function generatePollinationsId(): string { |
| 52 | return `pllns_${crypto.randomUUID().replaceAll("-", "")}`; |
no outgoing calls
no test coverage detected