diff options
author | 2023-07-11 19:14:34 -0700 | |
---|---|---|
committer | 2023-07-11 19:14:34 -0700 | |
commit | cbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch) | |
tree | 43a00501f3cde495967e116f0b660777051551f8 /src/js/out/modules/thirdparty/undici.js | |
parent | 1f900cff453700b19bca2acadfe26da4468c1282 (diff) | |
parent | 34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff) | |
download | bun-jarred/esm-conditions.tar.gz bun-jarred/esm-conditions.tar.zst bun-jarred/esm-conditions.zip |
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to 'src/js/out/modules/thirdparty/undici.js')
-rw-r--r-- | src/js/out/modules/thirdparty/undici.js | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/js/out/modules/thirdparty/undici.js b/src/js/out/modules/thirdparty/undici.js index 01f19a64e..20dec6158 100644 --- a/src/js/out/modules/thirdparty/undici.js +++ b/src/js/out/modules/thirdparty/undici.js @@ -1,3 +1,6 @@ +import {EventEmitter} from "node:events"; +import NodeStreamModule from "node:stream"; +import {Readable} from "node:stream"; var notImplemented = function() { throw new Error("Not implemented in bun"); }; @@ -66,28 +69,21 @@ async function request(url, options = { const body = resp.body ? new BodyReadable(resp) : null; return { statusCode, headers: headers.toJSON(), body, trailers, opaque: kEmptyObject, context: kEmptyObject }; } -function stream() { +var stream = function() { throw new Error("Not implemented in bun"); -} -function pipeline() { +}, pipeline = function() { throw new Error("Not implemented in bun"); -} -function connect() { +}, connect = function() { throw new Error("Not implemented in bun"); -} -function upgrade() { +}, upgrade = function() { throw new Error("Not implemented in bun"); -} -function mockErrors() { +}, mockErrors = function() { throw new Error("Not implemented in bun"); -} +}; function Undici() { throw new Error("Not implemented in bun"); } -var { EventEmitter } = import.meta.require("events"), { - Readable, - [Symbol.for("::bunternal::")]: { _ReadableFromWeb } -} = import.meta.require("node:stream"), ObjectCreate = Object.create, kEmptyObject = ObjectCreate(null), fetch = Bun.fetch, Response = globalThis.Response, Headers = globalThis.Headers, Request = globalThis.Request, URLSearchParams = globalThis.URLSearchParams, URL = globalThis.URL; +var { Object } = globalThis[Symbol.for("Bun.lazy")]("primordials"), { _ReadableFromWebForUndici: ReadableFromWeb } = NodeStreamModule[Symbol.for("::bunternal::")], ObjectCreate = Object.create, kEmptyObject = ObjectCreate(null), fetch = Bun.fetch, Response = globalThis.Response, Headers = globalThis.Headers, Request = globalThis.Request, URLSearchParams = globalThis.URLSearchParams, URL = globalThis.URL; class File extends Blob { } @@ -99,7 +95,7 @@ class FileReader extends EventTarget { } var FormData = globalThis.FormData; -class BodyReadable extends _ReadableFromWeb { +class BodyReadable extends ReadableFromWeb { #response; #bodyUsed; constructor(response, options = {}) { @@ -220,11 +216,16 @@ export { URL, Response, Request, + Pool, MockPool, MockClient, MockAgent, Headers, FormData, FileReader, - File + File, + Dispatcher, + Client, + BalancedPool, + Agent }; |