(event: H3Event)
| 5 | const FETCH_EVENT_CONTEXT = "solidFetchEvent"; |
| 6 | |
| 7 | export function createFetchEvent(event: H3Event): FetchEvent { |
| 8 | return { |
| 9 | request: event.req, |
| 10 | response: event.res, |
| 11 | clientAddress: getRequestIP(event), |
| 12 | locals: {}, |
| 13 | nativeEvent: event, |
| 14 | }; |
| 15 | } |
| 16 | |
| 17 | export function getFetchEvent(h3Event: H3Event): FetchEvent { |
| 18 | if (!h3Event.context[FETCH_EVENT_CONTEXT]) { |
no outgoing calls
no test coverage detected