()
| 5966 | } = require_symbols(); |
| 5967 | var constants3 = require_constants2(); |
| 5968 | var EMPTY_BUF = Buffer.alloc(0); |
| 5969 | var FastBuffer = Buffer[Symbol.species]; |
| 5970 | var addListener = util.addListener; |
| 5971 | var removeAllListeners = util.removeAllListeners; |
| 5972 | var kIdleSocketValidation = Symbol("kIdleSocketValidation"); |
| 5973 | var kIdleSocketValidationTimeout = Symbol("kIdleSocketValidationTimeout"); |
| 5974 | var kSocketUsed = Symbol("kSocketUsed"); |
| 5975 | var extractBody; |
| 5976 | function lazyllhttp() { |
| 5977 | return __async(this, null, function* () { |
| 5978 | const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; |
| 5979 | let mod; |
| 5980 | try { |
| 5981 | mod = yield WebAssembly.compile(require_llhttp_simd_wasm()); |
| 5982 | } catch (e) { |
| 5983 | mod = yield WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); |
| 5984 | } |
| 5985 | return yield WebAssembly.instantiate(mod, { |
| 5986 | env: { |
| 5987 | /* eslint-disable camelcase */ |
| 5988 | wasm_on_url: (p, at2, len) => { |
| 5989 | return 0; |
| 5990 | }, |
| 5991 | wasm_on_status: (p, at2, len) => { |
| 5992 | assert(currentParser.ptr === p); |
| 5993 | const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; |
| 5994 | return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; |
| 5995 | }, |
| 5996 | wasm_on_message_begin: (p) => { |
| 5997 | assert(currentParser.ptr === p); |
| 5998 | return currentParser.onMessageBegin() || 0; |
| 5999 | }, |
| 6000 | wasm_on_header_field: (p, at2, len) => { |
| 6001 | assert(currentParser.ptr === p); |
| 6002 | const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; |
| 6003 | return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; |
| 6004 | }, |
| 6005 | wasm_on_header_value: (p, at2, len) => { |
| 6006 | assert(currentParser.ptr === p); |
| 6007 | const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; |
| 6008 | return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; |
| 6009 | }, |
| 6010 | wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { |
| 6011 | assert(currentParser.ptr === p); |
| 6012 | return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; |
| 6013 | }, |
| 6014 | wasm_on_body: (p, at2, len) => { |
| 6015 | assert(currentParser.ptr === p); |
| 6016 | const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; |
| 6017 | return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; |
| 6018 | }, |
| 6019 | wasm_on_message_complete: (p) => { |
| 6020 | assert(currentParser.ptr === p); |
| 6021 | return currentParser.onMessageComplete() || 0; |
| 6022 | } |
no test coverage detected