(
assets: { readonly fetch: (request: Request) => Promise<Response> },
path: string,
)
| 88 | const assetRequest = (path: string): Request => new Request(new URL(path, "https://assets.local")); |
| 89 | |
| 90 | const fetchAsset = async ( |
| 91 | assets: { readonly fetch: (request: Request) => Promise<Response> }, |
| 92 | path: string, |
| 93 | ): Promise<Response> => { |
| 94 | const response = await assets.fetch(assetRequest(path)); |
| 95 | if (!response.ok) { |
| 96 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: worker artifact asset fetch must reject the dynamic bundler setup |
| 97 | throw new Error(`failed to fetch worker-bundler asset ${path}: ${response.status}`); |
| 98 | } |
| 99 | return response; |
| 100 | }; |
| 101 | |
| 102 | export default defineExecutorConfig({ |
| 103 | plugins: ({ |
no test coverage detected