{d: " ++ align_char ++ "6.2} MB", .{@as(f64, @floatFromInt(size)) / (1024 * 1024.0)}),
}
},
}
}
pub fn printBundle(
comptime StreamType: type,
input: StreamType,
comptime DestinationStreamType: type,
output: DestinationStreamType,
) !void {
const BufferStreamContext = struct {
pub fn run(in: StreamType, out: DestinationStreamType, end_at: u32) !void {
var buf: [4096]u8 = undefined;
var remain = @as(i64, @intCast(end_at));
var read_amount: i64 = 99999;
while (remain > 0 and read_amount > 0) {
read_amount = @as(i64, @intCast(in.read(&buf) catch 0));
remain -= @as(i64, @intCast(try out.write(buf[0..@as(usize, @intCast(@min(read_amount, remain)))])));
}
}
};
if (comptime Environment.isMac) {
// darwin only allows reading ahead on/off, not specific amount
_ = std.os.fcntl(input.handle, std.os.F.RDAHEAD, 1) catch 0;
}
const end = (try getCodeEndPosition(input, false)) - @as(u32, @intCast(jsbundle_prefix.len));
try BufferStreamContext.run(
input,
output,
end,
);
}
};
' /> Jarred Sumner
1 | -18/+19 |
2023-02-17 | Fix #1602 (#2066) | Justin Whear
| 12 | -94/+228 |
2023-02-17 | [install] support git dependencies (#2094) | Alex Lam S.L
| 9 | -279/+1020 |
2023-02-17 | Fix #2005 (#2096) | Justin Whear
| 2 | -1/+60 |
2023-02-17 | allow `bun add` of packages with capital letters (#2095) | Alex Lam S.L
| 3 | -2/+53 |
2023-02-16 | faster Buffer.byteLength("latin1") | Jarred Sumner
| 1 | -36/+28 |
2023-02-16 | Support yarn-like `"workspaces"."packages": string[]` (#2086) | Jarred Sumner
| 2 | -97/+253 |
2023-02-16 | Implement `machine` for Linux (#2088) | Justin Whear
| 3 | -0/+19 |
2023-02-16 | Fix #1516 (#2089) | Justin Whear
| 3 | -7/+14 |
2023-02-16 | Update globals.d.ts | Jarred Sumner
| 1 | -0/+15 |
2023-02-16 | Add missing type definition | Jarred Sumner
| 1 | -0/+2 |
2023-02-16 | [napi] Fix crash in creating arrays > 8 elements long | Jarred Sumner
| 1 | -10/+9 |
2023-02-16 | Clarify and clean up macOS build process (#2087) | Luke Deen Taylor
| 2 | -4/+4 |
2023-02-15 | Don't crash on null version string | Jarred Sumner
| 1 | -1/+1 |
2023-02-15 | Add disabled optimization | Jarred Sumner
| 1 | -0/+51 |
2023-02-15 | Add more logging to napi | Jarred Sumner
| 1 | -30/+150 |
2023-02-15 | Incorrect implementation of `napi_create_threadsafe_function` | Jarred Sumner
| 1 | -21/+43 |
2023-02-15 | feat(fetch) AbortSignal (#2019) | Ciro Spaciari
| 17 | -58/+443 |
2023-02-15 | fix(webcrypto): fix ed25519 CryptoKey.algorithm (#2082) | Derrick Farris
| 2 | -9/+28 |
2023-02-15 | Fix 2063 (#2079) | Justin Whear
| 2 | -2/+11 |
2023-02-15 | Make sure we test * in tesconfig | Jarred Sumner
| 2 | -1/+3 |
2023-02-15 | don't return an error there | Jarred Sumner
| 2 | -1/+3 |
2023-02-15 | Fix cast | Jarred Sumner
| 1 | -15/+17 |
2023-02-15 | ensure we allocate for > 6 arguments | Jarred Sumner
| 1 | -6/+13 |
2023-02-15 | Update async_hooks.exports.js | Jarred Sumner
| 1 | -2/+2 |
2023-02-15 | workaround prisma's usage of `eval("__dirname")` | Jarred Sumner
| 1 | -1/+23 |
2023-02-15 | some cleanup | Jarred Sumner
| 2 | -15/+9 |
2023-02-15 | ED25519 WebCrypto (#1971) | Jarred Sumner
| 12 | -11/+1167 |
2023-02-14 | Fix up async_hooks polyfill | Jarred Sumner
| 2 | -8/+63 |
2023-02-14 | Add temporary polyfill for async_hooks | Jarred Sumner
| 5 | -108/+324 |
2023-02-14 | :mask: async_hooks | Jarred Sumner
| 1 | -0/+4 |
2023-02-14 | [install] link network-delayed `.bin` scripts correctly (#2076) | Alex Lam S.L
| 3 | -16/+21 |
2023-02-14 | don't break esbuild | Jarred Sumner
| 7 | -75/+50 |
2023-02-14 | Add workaround for `tls` and `worker_threads` | Jarred Sumner
| 3 | -1/+64 |
2023-02-14 | [install] improve `package.json` validation (#2074) | Alex Lam S.L
| 6 | -104/+342 |
2023-02-14 | [WIP] fix(node:fs): export `fs.ReadStream` and `fs.WriteStream` (#1798) | Derrick Farris
| 4 | -72/+326 |
2023-02-14 | Reject with error when invalid fetch() body (#2047) | Eric Zhang
| 2 | -12/+44 |
2023-02-13 | fix(FormData): make String explicit, thanks @dylan-conway (#2065) | Derrick Farris
| 1 | -1/+1 |
2023-02-13 | fix(FormData): add string literal operator (#2064) | Derrick Farris
| 1 | -2/+2 |
2023-02-13 | Add pretty printer for FormData | Jarred Sumner
| 5 | -1/+101 |
2023-02-13 | Add dynamic port assigning to Bun.serve (#2062) | MichaĆ Warda
| 3 | -5/+40 |
2023-02-13 | feat(napi): add `napi_get_value_bigint_words` (#2061) | Derrick Farris
| 3 | -0/+44 |
2023-02-13 | Fixes https://github.com/oven-sh/bun/issues/1456 | Jarred Sumner
| 8 | -1/+148 |