diff options
Diffstat (limited to 'src/bun.js/bindings/generated_classes.zig')
-rw-r--r-- | src/bun.js/bindings/generated_classes.zig | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/src/bun.js/bindings/generated_classes.zig b/src/bun.js/bindings/generated_classes.zig index 329506718..c4f63084b 100644 --- a/src/bun.js/bindings/generated_classes.zig +++ b/src/bun.js/bindings/generated_classes.zig @@ -1220,6 +1220,28 @@ pub const JSDebugHTTPSServer = struct { return DebugHTTPSServer__fromJS(value); } + extern fn DebugHTTPSServerPrototype__addressSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; + + extern fn DebugHTTPSServerPrototype__addressGetCachedValue(JSC.JSValue) JSC.JSValue; + + /// `DebugHTTPSServer.address` setter + /// This value will be visited by the garbage collector. + pub fn addressSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void { + JSC.markBinding(@src()); + DebugHTTPSServerPrototype__addressSetCachedValue(thisValue, globalObject, value); + } + + /// `DebugHTTPSServer.address` getter + /// This value will be visited by the garbage collector. + pub fn addressGetCached(thisValue: JSC.JSValue) ?JSC.JSValue { + JSC.markBinding(@src()); + const result = DebugHTTPSServerPrototype__addressGetCachedValue(thisValue); + if (result == .zero) + return null; + + return result; + } + extern fn DebugHTTPSServerPrototype__hostnameSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; extern fn DebugHTTPSServerPrototype__hostnameGetCachedValue(JSC.JSValue) JSC.JSValue; @@ -1300,6 +1322,9 @@ pub const JSDebugHTTPSServer = struct { @compileLog("DebugHTTPSServer.finalize is not a finalizer"); } + if (@TypeOf(DebugHTTPSServer.getAddress) != GetterType) + @compileLog("Expected DebugHTTPSServer.getAddress to be a getter"); + if (@TypeOf(DebugHTTPSServer.getDevelopment) != GetterType) @compileLog("Expected DebugHTTPSServer.getDevelopment to be a getter"); @@ -1327,6 +1352,8 @@ pub const JSDebugHTTPSServer = struct { @compileLog("Expected DebugHTTPSServer.doPublish to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPSServer.doPublish))); if (@TypeOf(DebugHTTPSServer.doReload) != CallbackType) @compileLog("Expected DebugHTTPSServer.doReload to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPSServer.doReload))); + if (@TypeOf(DebugHTTPSServer.doRequestIP) != CallbackType) + @compileLog("Expected DebugHTTPSServer.doRequestIP to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPSServer.doRequestIP))); if (@TypeOf(DebugHTTPSServer.doStop) != CallbackType) @compileLog("Expected DebugHTTPSServer.doStop to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPSServer.doStop))); if (@TypeOf(DebugHTTPSServer.doUpgrade) != CallbackType) @@ -1335,9 +1362,11 @@ pub const JSDebugHTTPSServer = struct { @export(DebugHTTPSServer.doFetch, .{ .name = "DebugHTTPSServerPrototype__doFetch" }); @export(DebugHTTPSServer.doPublish, .{ .name = "DebugHTTPSServerPrototype__doPublish" }); @export(DebugHTTPSServer.doReload, .{ .name = "DebugHTTPSServerPrototype__doReload" }); + @export(DebugHTTPSServer.doRequestIP, .{ .name = "DebugHTTPSServerPrototype__doRequestIP" }); @export(DebugHTTPSServer.doStop, .{ .name = "DebugHTTPSServerPrototype__doStop" }); @export(DebugHTTPSServer.doUpgrade, .{ .name = "DebugHTTPSServerPrototype__doUpgrade" }); @export(DebugHTTPSServer.finalize, .{ .name = "DebugHTTPSServerClass__finalize" }); + @export(DebugHTTPSServer.getAddress, .{ .name = "DebugHTTPSServerPrototype__getAddress" }); @export(DebugHTTPSServer.getDevelopment, .{ .name = "DebugHTTPSServerPrototype__getDevelopment" }); @export(DebugHTTPSServer.getHostname, .{ .name = "DebugHTTPSServerPrototype__getHostname" }); @export(DebugHTTPSServer.getId, .{ .name = "DebugHTTPSServerPrototype__getId" }); @@ -1363,6 +1392,28 @@ pub const JSDebugHTTPServer = struct { return DebugHTTPServer__fromJS(value); } + extern fn DebugHTTPServerPrototype__addressSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; + + extern fn DebugHTTPServerPrototype__addressGetCachedValue(JSC.JSValue) JSC.JSValue; + + /// `DebugHTTPServer.address` setter + /// This value will be visited by the garbage collector. + pub fn addressSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void { + JSC.markBinding(@src()); + DebugHTTPServerPrototype__addressSetCachedValue(thisValue, globalObject, value); + } + + /// `DebugHTTPServer.address` getter + /// This value will be visited by the garbage collector. + pub fn addressGetCached(thisValue: JSC.JSValue) ?JSC.JSValue { + JSC.markBinding(@src()); + const result = DebugHTTPServerPrototype__addressGetCachedValue(thisValue); + if (result == .zero) + return null; + + return result; + } + extern fn DebugHTTPServerPrototype__hostnameSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; extern fn DebugHTTPServerPrototype__hostnameGetCachedValue(JSC.JSValue) JSC.JSValue; @@ -1443,6 +1494,9 @@ pub const JSDebugHTTPServer = struct { @compileLog("DebugHTTPServer.finalize is not a finalizer"); } + if (@TypeOf(DebugHTTPServer.getAddress) != GetterType) + @compileLog("Expected DebugHTTPServer.getAddress to be a getter"); + if (@TypeOf(DebugHTTPServer.getDevelopment) != GetterType) @compileLog("Expected DebugHTTPServer.getDevelopment to be a getter"); @@ -1470,6 +1524,8 @@ pub const JSDebugHTTPServer = struct { @compileLog("Expected DebugHTTPServer.doPublish to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPServer.doPublish))); if (@TypeOf(DebugHTTPServer.doReload) != CallbackType) @compileLog("Expected DebugHTTPServer.doReload to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPServer.doReload))); + if (@TypeOf(DebugHTTPServer.doRequestIP) != CallbackType) + @compileLog("Expected DebugHTTPServer.doRequestIP to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPServer.doRequestIP))); if (@TypeOf(DebugHTTPServer.doStop) != CallbackType) @compileLog("Expected DebugHTTPServer.doStop to be a callback but received " ++ @typeName(@TypeOf(DebugHTTPServer.doStop))); if (@TypeOf(DebugHTTPServer.doUpgrade) != CallbackType) @@ -1478,9 +1534,11 @@ pub const JSDebugHTTPServer = struct { @export(DebugHTTPServer.doFetch, .{ .name = "DebugHTTPServerPrototype__doFetch" }); @export(DebugHTTPServer.doPublish, .{ .name = "DebugHTTPServerPrototype__doPublish" }); @export(DebugHTTPServer.doReload, .{ .name = "DebugHTTPServerPrototype__doReload" }); + @export(DebugHTTPServer.doRequestIP, .{ .name = "DebugHTTPServerPrototype__doRequestIP" }); @export(DebugHTTPServer.doStop, .{ .name = "DebugHTTPServerPrototype__doStop" }); @export(DebugHTTPServer.doUpgrade, .{ .name = "DebugHTTPServerPrototype__doUpgrade" }); @export(DebugHTTPServer.finalize, .{ .name = "DebugHTTPServerClass__finalize" }); + @export(DebugHTTPServer.getAddress, .{ .name = "DebugHTTPServerPrototype__getAddress" }); @export(DebugHTTPServer.getDevelopment, .{ .name = "DebugHTTPServerPrototype__getDevelopment" }); @export(DebugHTTPServer.getHostname, .{ .name = "DebugHTTPServerPrototype__getHostname" }); @export(DebugHTTPServer.getId, .{ .name = "DebugHTTPServerPrototype__getId" }); @@ -2205,6 +2263,8 @@ pub const JSExpect = struct { @compileLog("Expected Expect.toEndWith to be a callback but received " ++ @typeName(@TypeOf(Expect.toEndWith))); if (@TypeOf(Expect.toEqual) != CallbackType) @compileLog("Expected Expect.toEqual to be a callback but received " ++ @typeName(@TypeOf(Expect.toEqual))); + if (@TypeOf(Expect.toEqualIgnoringWhitespace) != CallbackType) + @compileLog("Expected Expect.toEqualIgnoringWhitespace to be a callback but received " ++ @typeName(@TypeOf(Expect.toEqualIgnoringWhitespace))); if (@TypeOf(Expect.toHaveBeenCalled) != CallbackType) @compileLog("Expected Expect.toHaveBeenCalled to be a callback but received " ++ @typeName(@TypeOf(Expect.toHaveBeenCalled))); if (@TypeOf(Expect.toHaveBeenCalledTimes) != CallbackType) @@ -2341,6 +2401,7 @@ pub const JSExpect = struct { @export(Expect.toContainEqual, .{ .name = "ExpectPrototype__toContainEqual" }); @export(Expect.toEndWith, .{ .name = "ExpectPrototype__toEndWith" }); @export(Expect.toEqual, .{ .name = "ExpectPrototype__toEqual" }); + @export(Expect.toEqualIgnoringWhitespace, .{ .name = "ExpectPrototype__toEqualIgnoringWhitespace" }); @export(Expect.toHaveBeenCalled, .{ .name = "ExpectPrototype__toHaveBeenCalled" }); @export(Expect.toHaveBeenCalledTimes, .{ .name = "ExpectPrototype__toHaveBeenCalledTimes" }); @export(Expect.toHaveBeenCalledWith, .{ .name = "ExpectPrototype__toHaveBeenCalledWith" }); @@ -2507,6 +2568,87 @@ pub const JSExpectAnything = struct { } } }; +pub const JSExpectArrayContaining = struct { + const ExpectArrayContaining = Classes.ExpectArrayContaining; + const GetterType = fn (*ExpectArrayContaining, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue; + const GetterTypeWithThisValue = fn (*ExpectArrayContaining, JSC.JSValue, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue; + const SetterType = fn (*ExpectArrayContaining, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool; + const SetterTypeWithThisValue = fn (*ExpectArrayContaining, JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) callconv(.C) bool; + const CallbackType = fn (*ExpectArrayContaining, *JSC.JSGlobalObject, *JSC.CallFrame) callconv(.C) JSC.JSValue; + + /// Return the pointer to the wrapped object. + /// If the object does not match the type, return null. + pub fn fromJS(value: JSC.JSValue) ?*ExpectArrayContaining { + JSC.markBinding(@src()); + return ExpectArrayContaining__fromJS(value); + } + + extern fn ExpectArrayContainingPrototype__arrayValueSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; + + extern fn ExpectArrayContainingPrototype__arrayValueGetCachedValue(JSC.JSValue) JSC.JSValue; + + /// `ExpectArrayContaining.arrayValue` setter + /// This value will be visited by the garbage collector. + pub fn arrayValueSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void { + JSC.markBinding(@src()); + ExpectArrayContainingPrototype__arrayValueSetCachedValue(thisValue, globalObject, value); + } + + /// `ExpectArrayContaining.arrayValue` getter + /// This value will be visited by the garbage collector. + pub fn arrayValueGetCached(thisValue: JSC.JSValue) ?JSC.JSValue { + JSC.markBinding(@src()); + const result = ExpectArrayContainingPrototype__arrayValueGetCachedValue(thisValue); + if (result == .zero) + return null; + + return result; + } + + /// Create a new instance of ExpectArrayContaining + pub fn toJS(this: *ExpectArrayContaining, globalObject: *JSC.JSGlobalObject) JSC.JSValue { + JSC.markBinding(@src()); + if (comptime Environment.allow_assert) { + const value__ = ExpectArrayContaining__create(globalObject, this); + std.debug.assert(value__.as(ExpectArrayContaining).? == this); // If this fails, likely a C ABI issue. + return value__; + } else { + return ExpectArrayContaining__create(globalObject, this); + } + } + + /// Modify the internal ptr to point to a new instance of ExpectArrayContaining. + pub fn dangerouslySetPtr(value: JSC.JSValue, ptr: ?*ExpectArrayContaining) bool { + JSC.markBinding(@src()); + return ExpectArrayContaining__dangerouslySetPtr(value, ptr); + } + + /// Detach the ptr from the thisValue + pub fn detachPtr(_: *ExpectArrayContaining, value: JSC.JSValue) void { + JSC.markBinding(@src()); + std.debug.assert(ExpectArrayContaining__dangerouslySetPtr(value, null)); + } + + extern fn ExpectArrayContaining__fromJS(JSC.JSValue) ?*ExpectArrayContaining; + extern fn ExpectArrayContaining__getConstructor(*JSC.JSGlobalObject) JSC.JSValue; + + extern fn ExpectArrayContaining__create(globalObject: *JSC.JSGlobalObject, ptr: ?*ExpectArrayContaining) JSC.JSValue; + + extern fn ExpectArrayContaining__dangerouslySetPtr(JSC.JSValue, ?*ExpectArrayContaining) bool; + + comptime { + if (@TypeOf(ExpectArrayContaining.finalize) != (fn (*ExpectArrayContaining) callconv(.C) void)) { + @compileLog("ExpectArrayContaining.finalize is not a finalizer"); + } + + if (@TypeOf(ExpectArrayContaining.call) != StaticCallbackType) + @compileLog("Expected ExpectArrayContaining.call to be a static callback"); + if (!JSC.is_bindgen) { + @export(ExpectArrayContaining.call, .{ .name = "ExpectArrayContainingClass__call" }); + @export(ExpectArrayContaining.finalize, .{ .name = "ExpectArrayContainingClass__finalize" }); + } + } +}; pub const JSExpectStringContaining = struct { const ExpectStringContaining = Classes.ExpectStringContaining; const GetterType = fn (*ExpectStringContaining, *JSC.JSGlobalObject) callconv(.C) JSC.JSValue; @@ -3089,6 +3231,28 @@ pub const JSHTTPSServer = struct { return HTTPSServer__fromJS(value); } + extern fn HTTPSServerPrototype__addressSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; + + extern fn HTTPSServerPrototype__addressGetCachedValue(JSC.JSValue) JSC.JSValue; + + /// `HTTPSServer.address` setter + /// This value will be visited by the garbage collector. + pub fn addressSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void { + JSC.markBinding(@src()); + HTTPSServerPrototype__addressSetCachedValue(thisValue, globalObject, value); + } + + /// `HTTPSServer.address` getter + /// This value will be visited by the garbage collector. + pub fn addressGetCached(thisValue: JSC.JSValue) ?JSC.JSValue { + JSC.markBinding(@src()); + const result = HTTPSServerPrototype__addressGetCachedValue(thisValue); + if (result == .zero) + return null; + + return result; + } + extern fn HTTPSServerPrototype__hostnameSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; extern fn HTTPSServerPrototype__hostnameGetCachedValue(JSC.JSValue) JSC.JSValue; @@ -3169,6 +3333,9 @@ pub const JSHTTPSServer = struct { @compileLog("HTTPSServer.finalize is not a finalizer"); } + if (@TypeOf(HTTPSServer.getAddress) != GetterType) + @compileLog("Expected HTTPSServer.getAddress to be a getter"); + if (@TypeOf(HTTPSServer.getDevelopment) != GetterType) @compileLog("Expected HTTPSServer.getDevelopment to be a getter"); @@ -3196,6 +3363,8 @@ pub const JSHTTPSServer = struct { @compileLog("Expected HTTPSServer.doPublish to be a callback but received " ++ @typeName(@TypeOf(HTTPSServer.doPublish))); if (@TypeOf(HTTPSServer.doReload) != CallbackType) @compileLog("Expected HTTPSServer.doReload to be a callback but received " ++ @typeName(@TypeOf(HTTPSServer.doReload))); + if (@TypeOf(HTTPSServer.doRequestIP) != CallbackType) + @compileLog("Expected HTTPSServer.doRequestIP to be a callback but received " ++ @typeName(@TypeOf(HTTPSServer.doRequestIP))); if (@TypeOf(HTTPSServer.doStop) != CallbackType) @compileLog("Expected HTTPSServer.doStop to be a callback but received " ++ @typeName(@TypeOf(HTTPSServer.doStop))); if (@TypeOf(HTTPSServer.doUpgrade) != CallbackType) @@ -3204,9 +3373,11 @@ pub const JSHTTPSServer = struct { @export(HTTPSServer.doFetch, .{ .name = "HTTPSServerPrototype__doFetch" }); @export(HTTPSServer.doPublish, .{ .name = "HTTPSServerPrototype__doPublish" }); @export(HTTPSServer.doReload, .{ .name = "HTTPSServerPrototype__doReload" }); + @export(HTTPSServer.doRequestIP, .{ .name = "HTTPSServerPrototype__doRequestIP" }); @export(HTTPSServer.doStop, .{ .name = "HTTPSServerPrototype__doStop" }); @export(HTTPSServer.doUpgrade, .{ .name = "HTTPSServerPrototype__doUpgrade" }); @export(HTTPSServer.finalize, .{ .name = "HTTPSServerClass__finalize" }); + @export(HTTPSServer.getAddress, .{ .name = "HTTPSServerPrototype__getAddress" }); @export(HTTPSServer.getDevelopment, .{ .name = "HTTPSServerPrototype__getDevelopment" }); @export(HTTPSServer.getHostname, .{ .name = "HTTPSServerPrototype__getHostname" }); @export(HTTPSServer.getId, .{ .name = "HTTPSServerPrototype__getId" }); @@ -3232,6 +3403,28 @@ pub const JSHTTPServer = struct { return HTTPServer__fromJS(value); } + extern fn HTTPServerPrototype__addressSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; + + extern fn HTTPServerPrototype__addressGetCachedValue(JSC.JSValue) JSC.JSValue; + + /// `HTTPServer.address` setter + /// This value will be visited by the garbage collector. + pub fn addressSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void { + JSC.markBinding(@src()); + HTTPServerPrototype__addressSetCachedValue(thisValue, globalObject, value); + } + + /// `HTTPServer.address` getter + /// This value will be visited by the garbage collector. + pub fn addressGetCached(thisValue: JSC.JSValue) ?JSC.JSValue { + JSC.markBinding(@src()); + const result = HTTPServerPrototype__addressGetCachedValue(thisValue); + if (result == .zero) + return null; + + return result; + } + extern fn HTTPServerPrototype__hostnameSetCachedValue(JSC.JSValue, *JSC.JSGlobalObject, JSC.JSValue) void; extern fn HTTPServerPrototype__hostnameGetCachedValue(JSC.JSValue) JSC.JSValue; @@ -3312,6 +3505,9 @@ pub const JSHTTPServer = struct { @compileLog("HTTPServer.finalize is not a finalizer"); } + if (@TypeOf(HTTPServer.getAddress) != GetterType) + @compileLog("Expected HTTPServer.getAddress to be a getter"); + if (@TypeOf(HTTPServer.getDevelopment) != GetterType) @compileLog("Expected HTTPServer.getDevelopment to be a getter"); @@ -3339,6 +3535,8 @@ pub const JSHTTPServer = struct { @compileLog("Expected HTTPServer.doPublish to be a callback but received " ++ @typeName(@TypeOf(HTTPServer.doPublish))); if (@TypeOf(HTTPServer.doReload) != CallbackType) @compileLog("Expected HTTPServer.doReload to be a callback but received " ++ @typeName(@TypeOf(HTTPServer.doReload))); + if (@TypeOf(HTTPServer.doRequestIP) != CallbackType) + @compileLog("Expected HTTPServer.doRequestIP to be a callback but received " ++ @typeName(@TypeOf(HTTPServer.doRequestIP))); if (@TypeOf(HTTPServer.doStop) != CallbackType) @compileLog("Expected HTTPServer.doStop to be a callback but received " ++ @typeName(@TypeOf(HTTPServer.doStop))); if (@TypeOf(HTTPServer.doUpgrade) != CallbackType) @@ -3347,9 +3545,11 @@ pub const JSHTTPServer = struct { @export(HTTPServer.doFetch, .{ .name = "HTTPServerPrototype__doFetch" }); @export(HTTPServer.doPublish, .{ .name = "HTTPServerPrototype__doPublish" }); @export(HTTPServer.doReload, .{ .name = "HTTPServerPrototype__doReload" }); + @export(HTTPServer.doRequestIP, .{ .name = "HTTPServerPrototype__doRequestIP" }); @export(HTTPServer.doStop, .{ .name = "HTTPServerPrototype__doStop" }); @export(HTTPServer.doUpgrade, .{ .name = "HTTPServerPrototype__doUpgrade" }); @export(HTTPServer.finalize, .{ .name = "HTTPServerClass__finalize" }); + @export(HTTPServer.getAddress, .{ .name = "HTTPServerPrototype__getAddress" }); @export(HTTPServer.getDevelopment, .{ .name = "HTTPServerPrototype__getDevelopment" }); @export(HTTPServer.getHostname, .{ .name = "HTTPServerPrototype__getHostname" }); @export(HTTPServer.getId, .{ .name = "HTTPServerPrototype__getId" }); @@ -6781,6 +6981,9 @@ pub const JSTextDecoder = struct { if (@TypeOf(TextDecoder.getFatal) != GetterType) @compileLog("Expected TextDecoder.getFatal to be a getter"); + if (@TypeOf(TextDecoder.getIgnoreBOM) != GetterType) + @compileLog("Expected TextDecoder.getIgnoreBOM to be a getter"); + if (!JSC.is_bindgen) { @export(TextDecoder.constructor, .{ .name = "TextDecoderClass__construct" }); @export(TextDecoder.decode, .{ .name = "TextDecoderPrototype__decode" }); @@ -6788,6 +6991,7 @@ pub const JSTextDecoder = struct { @export(TextDecoder.finalize, .{ .name = "TextDecoderClass__finalize" }); @export(TextDecoder.getEncoding, .{ .name = "TextDecoderPrototype__getEncoding" }); @export(TextDecoder.getFatal, .{ .name = "TextDecoderPrototype__getFatal" }); + @export(TextDecoder.getIgnoreBOM, .{ .name = "TextDecoderPrototype__getIgnoreBOM" }); } } }; @@ -7006,6 +7210,7 @@ comptime { _ = JSExpect; _ = JSExpectAny; _ = JSExpectAnything; + _ = JSExpectArrayContaining; _ = JSExpectStringContaining; _ = JSExpectStringMatching; _ = JSFFI; |