aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/bun.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/bun.zig')
-rw-r--r--src/bun.js/api/bun.zig18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index 5dc3abcf9..7c6473727 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -71,7 +71,8 @@ const VM = @import("bun").JSC.VM;
const JSFunction = @import("bun").JSC.JSFunction;
const Config = @import("../config.zig");
const URL = @import("../../url.zig").URL;
-const Transpiler = @import("./transpiler.zig");
+const Transpiler = bun.JSC.API.JSTranspiler;
+const JSBundler = bun.JSC.API.JSBundler;
const VirtualMachine = JSC.VirtualMachine;
const IOTask = JSC.IOTask;
const zlib = @import("../../zlib.zig");
@@ -1319,6 +1320,9 @@ pub const Class = NewClass(
.Transpiler = .{
.get = getTranspilerConstructor,
},
+ .Bundler = .{
+ .get = getBundlerConstructor,
+ },
.hash = .{
.get = getHashObject,
},
@@ -2339,6 +2343,16 @@ pub fn mmapFile(
}.x, @intToPtr(?*anyopaque, map.len), exception);
}
+pub fn getBundlerConstructor(
+ _: void,
+ ctx: js.JSContextRef,
+ _: js.JSValueRef,
+ _: js.JSStringRef,
+ _: js.ExceptionRef,
+) js.JSValueRef {
+ return JSC.API.JSBundler.getConstructor(ctx).asObjectRef();
+}
+
pub fn getTranspilerConstructor(
_: void,
ctx: js.JSContextRef,
@@ -2346,7 +2360,7 @@ pub fn getTranspilerConstructor(
_: js.JSStringRef,
_: js.ExceptionRef,
) js.JSValueRef {
- return JSC.API.Bun.Transpiler.getConstructor(ctx).asObjectRef();
+ return JSC.API.JSTranspiler.getConstructor(ctx).asObjectRef();
}
pub fn getFileSystemRouter(