aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-02 15:54:07 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-02 15:54:07 -0700
commitd009e02c1db0f93b24a9c1b539135a25347f1027 (patch)
tree76e2adba7bc62f3ff17b14953869b7963989990e
parent1b894ad9f61d4d39486f3a03aab42de4f750294e (diff)
downloadbun-d009e02c1db0f93b24a9c1b539135a25347f1027.tar.gz
bun-d009e02c1db0f93b24a9c1b539135a25347f1027.tar.zst
bun-d009e02c1db0f93b24a9c1b539135a25347f1027.zip
latest
Former-commit-id: 1086d4f894611c1171f57d9eaf82f9170e9de2d1
-rw-r--r--.gitignore3
-rw-r--r--Makefile13
-rw-r--r--README.md23
-rw-r--r--examples/hello-next/bun-framework-next/package.json2
-rw-r--r--examples/hello-next/bun-framework-next/renderDocument.tsx7
-rw-r--r--src/api/schema.zig3850
-rw-r--r--src/bundler.zig55
-rw-r--r--src/cache.zig30
-rw-r--r--src/cli.zig1
-rw-r--r--src/fallback.version2
-rw-r--r--src/fs.zig10
-rw-r--r--src/linker.zig2
-rw-r--r--src/node-fallbacks/assert.js1
-rw-r--r--src/node-fallbacks/buffer.js1
-rw-r--r--src/node-fallbacks/console.js1
-rw-r--r--src/node-fallbacks/constants.js1
-rw-r--r--src/node-fallbacks/crypto.js1
-rw-r--r--src/node-fallbacks/domain.js1
-rw-r--r--src/node-fallbacks/events.js1
-rw-r--r--src/node-fallbacks/http.js1
-rw-r--r--src/node-fallbacks/https.js1
-rw-r--r--src/node-fallbacks/os.js1
-rw-r--r--src/node-fallbacks/package-lock.json2046
-rw-r--r--src/node-fallbacks/package.json37
-rw-r--r--src/node-fallbacks/path.js1
-rw-r--r--src/node-fallbacks/process.js1
-rw-r--r--src/node-fallbacks/punycode.js1
-rw-r--r--src/node-fallbacks/querystring.js1
-rw-r--r--src/node-fallbacks/stream.js1
-rw-r--r--src/node-fallbacks/string_decoder.js1
-rw-r--r--src/node-fallbacks/sys.js1
-rw-r--r--src/node-fallbacks/timers.js1
-rw-r--r--src/node-fallbacks/tsconfig.json28
-rw-r--r--src/node-fallbacks/tty.js1
-rw-r--r--src/node-fallbacks/url.js1
-rw-r--r--src/node-fallbacks/util.js1
-rw-r--r--src/node-fallbacks/zlib.js1
-rw-r--r--src/node_fallbacks.zig420
-rw-r--r--src/options.zig13
-rw-r--r--src/resolver/resolver.zig41
-rw-r--r--src/runtime.version2
41 files changed, 4688 insertions, 1919 deletions
diff --git a/.gitignore b/.gitignore
index 1a677dd0b..71367f134 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,6 @@ bun-mimalloc
examples/lotta-modules/bun-yday
examples/lotta-modules/bun-old
examples/lotta-modules/bun-nofscache
+
+src/node-fallbacks/out/*
+src/node-fallbacks/node_modules \ No newline at end of file
diff --git a/Makefile b/Makefile
index a544ca01d..2092e8856 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,20 @@
-bun: bun-prod-native bun-prod-wasi bun-prod-wasm
+bun: vendor bun-prod-native bun-prod-wasi bun-prod-wasm
+
+vendor: api node-fallbacks runtime_js fallback_decoder mimalloc picohttp jsc
api:
peechy --schema src/api/schema.peechy --esm src/api/schema.js --ts src/api/schema.d.ts --zig src/api/schema.zig
+node-fallbacks:
+ cd src/node-fallbacks; npm install; npm run --silent build
+
+fallback_decoder:
+ esbuild --target=esnext --bundle src/fallback.ts --format=iife --platform=browser --minify > src/fallback.out.js
+
+runtime_js:
+ esbuild --target=esnext --bundle src/runtime/index.ts --format=iife --platform=browser --global-name=BUN_RUNTIME --minify > src/runtime.out.js; cat src/runtime.footer.js >> src/runtime.out.js
+
jsc: jsc-build jsc-bindings
jsc-build: jsc-build-mac jsc-copy-headers
jsc-bindings:
diff --git a/README.md b/README.md
index b285dc635..217882b15 100644
--- a/README.md
+++ b/README.md
@@ -104,33 +104,30 @@ Unlike many other bundlers, `Bun` only bundles `node_modules`. This is great for
# Not implemented yet
-
-
# Building from source
Estimated: 30-60 minutes :(
-You'll want to start downloading two things at once:
+Compile Zig:
```bash
-git clone https://github.com/jarred-sumner/zig && git checkout jarred/zig-sloppy-with-small-structs
+git clone https://github.com/jarred-sumner/zig
+cd zig
+git checkout jarred/zig-sloppy-with-small-structs
+cmake . -DCMAKE_PREFIX_PATH=$(brew --prefix llvm) -DZIG_STATIC_LLVM=ON -DCMAKE_BUILD_TYPE=Release && make -j 16
```
-```bash
-git submodule update --init --recursive --progress --depth=1
-```
+Note that `brew install zig` won't work. Bun uses a build of Zig with a couple patches.
-Next, compile Zig.
+You'll want to make sure `zig` is in `$PATH`. The `zig` binary wil be in the same folder as the newly-cloned `zig` repo. If you use fish, you can run `fish_add_path (pwd)`.
-On a Mac, that looks like this:
+In `bun`:
```bash
-cmake . -DCMAKE_PREFIX_PATH=$(brew --prefix llvm) -DZIG_STATIC_LLVM=ON -DCMAKE_BUILD_TYPE=Release && make -j 16
+git submodule update --init --recursive --progress --depth=1
```
-Note that `brew install zig` won't work. Bun uses a build of Zig with a couple patches.
-
-You'll want to make sure `zig` is in `$PATH`. The `zig` binary wil be in the same folder as the newly-cloned `zig` repo. If you use fish, you can run `fish_add_path (pwd)`.
+You
Now go back to the folder with `Bun`'s repository.
diff --git a/examples/hello-next/bun-framework-next/package.json b/examples/hello-next/bun-framework-next/package.json
index 281984212..cc9b28b82 100644
--- a/examples/hello-next/bun-framework-next/package.json
+++ b/examples/hello-next/bun-framework-next/package.json
@@ -76,8 +76,6 @@
"author": "",
"license": "ISC",
"dependencies": {
- "buffer": "^6.0.3",
- "path-browserify": "^1.0.1",
"react-is": "^17.0.2"
}
}
diff --git a/examples/hello-next/bun-framework-next/renderDocument.tsx b/examples/hello-next/bun-framework-next/renderDocument.tsx
index a79c4fdb2..356ff788b 100644
--- a/examples/hello-next/bun-framework-next/renderDocument.tsx
+++ b/examples/hello-next/bun-framework-next/renderDocument.tsx
@@ -417,12 +417,7 @@ export async function render({
(DocumentNamespace && DocumentNamespace.default) || NextDocument.default;
// Document.Html.prototype.getScripts = getScripts;
// }
- console.log(
- "next",
- typeof NextDocument.default,
- "doc",
- typeof NextDocument.default.renderDocument
- );
+
const callMiddleware = async (method: string, args: any[], props = false) => {
let results: any = props ? {} : [];
diff --git a/src/api/schema.zig b/src/api/schema.zig
index b8e0dc6d0..56b779727 100644
--- a/src/api/schema.zig
+++ b/src/api/schema.zig
@@ -1,3 +1,4 @@
+
const std = @import("std");
pub const Reader = struct {
@@ -281,2322 +282,2455 @@ pub fn Writer(comptime WritableStream: type) type {
pub const ByteWriter = Writer(*std.io.FixedBufferStream([]u8));
pub const FileWriter = Writer(std.fs.File);
-pub const Api = struct {
- pub const Loader = enum(u8) {
- _none,
- /// jsx
- jsx,
- /// js
- js,
- /// ts
- ts,
- /// tsx
- tsx,
+pub const Api = struct {
- /// css
- css,
+pub const Loader = enum(u8) {
- /// file
- file,
+_none,
+ /// jsx
+ jsx,
- /// json
- json,
+ /// js
+ js,
- _,
+ /// ts
+ ts,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+ /// tsx
+ tsx,
- pub const FrameworkEntryPointType = enum(u8) {
- _none,
- /// client
- client,
+ /// css
+ css,
- /// server
- server,
+ /// file
+ file,
- /// fallback
- fallback,
+ /// json
+ json,
- _,
+_,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- pub const StackFrameScope = enum(u8) {
- _none,
- /// Eval
- eval,
+
+};
- /// Module
- module,
+pub const FrameworkEntryPointType = enum(u8) {
- /// Function
- function,
+_none,
+ /// client
+ client,
- /// Global
- global,
+ /// server
+ server,
- /// Wasm
- wasm,
+ /// fallback
+ fallback,
- /// Constructor
- constructor,
+_,
- _,
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+
+};
- pub const StackFrame = struct {
- /// function_name
- function_name: []const u8,
+pub const StackFrameScope = enum(u8) {
- /// file
- file: []const u8,
+_none,
+ /// Eval
+ eval,
- /// position
- position: StackFramePosition,
+ /// Module
+ module,
- /// scope
- scope: StackFrameScope,
+ /// Function
+ function,
- pub fn decode(reader: anytype) anyerror!StackFrame {
- var this = std.mem.zeroes(StackFrame);
+ /// Global
+ global,
- this.function_name = try reader.readValue([]const u8);
- this.file = try reader.readValue([]const u8);
- this.position = try reader.readValue(StackFramePosition);
- this.scope = try reader.readValue(StackFrameScope);
- return this;
- }
+ /// Wasm
+ wasm,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.function_name);
- try writer.writeValue(this.file);
- try writer.writeValue(this.position);
- try writer.writeEnum(this.scope);
- }
- };
+ /// Constructor
+ constructor,
- pub const StackFramePosition = packed struct {
- /// source_offset
- source_offset: i32 = 0,
+_,
- /// line
- line: i32 = 0,
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- /// line_start
- line_start: i32 = 0,
+
+};
- /// line_stop
- line_stop: i32 = 0,
+pub const StackFrame = struct {
+/// function_name
+function_name: []const u8,
- /// column_start
- column_start: i32 = 0,
+/// file
+file: []const u8,
- /// column_stop
- column_stop: i32 = 0,
+/// position
+position: StackFramePosition,
- /// expression_start
- expression_start: i32 = 0,
+/// scope
+scope: StackFrameScope,
- /// expression_stop
- expression_stop: i32 = 0,
- pub fn decode(reader: anytype) anyerror!StackFramePosition {
- var this = std.mem.zeroes(StackFramePosition);
+pub fn decode(reader: anytype) anyerror!StackFrame {
+ var this = std.mem.zeroes(StackFrame);
- this.source_offset = try reader.readValue(i32);
- this.line = try reader.readValue(i32);
- this.line_start = try reader.readValue(i32);
- this.line_stop = try reader.readValue(i32);
- this.column_start = try reader.readValue(i32);
- this.column_stop = try reader.readValue(i32);
- this.expression_start = try reader.readValue(i32);
- this.expression_stop = try reader.readValue(i32);
- return this;
- }
+ this.function_name = try reader.readValue([]const u8);
+ this.file = try reader.readValue([]const u8);
+ this.position = try reader.readValue(StackFramePosition);
+ this.scope = try reader.readValue(StackFrameScope);
+ return this;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.source_offset);
- try writer.writeInt(this.line);
- try writer.writeInt(this.line_start);
- try writer.writeInt(this.line_stop);
- try writer.writeInt(this.column_start);
- try writer.writeInt(this.column_stop);
- try writer.writeInt(this.expression_start);
- try writer.writeInt(this.expression_stop);
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.function_name);
+ try writer.writeValue(this.file);
+ try writer.writeValue(this.position);
+ try writer.writeEnum(this.scope);
+}
- pub const SourceLine = struct {
- /// line
- line: i32 = 0,
+};
- /// text
- text: []const u8,
+pub const StackFramePosition = packed struct {
+/// source_offset
+source_offset: i32 = 0,
- pub fn decode(reader: anytype) anyerror!SourceLine {
- var this = std.mem.zeroes(SourceLine);
+/// line
+line: i32 = 0,
- this.line = try reader.readValue(i32);
- this.text = try reader.readValue([]const u8);
- return this;
- }
+/// line_start
+line_start: i32 = 0,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.line);
- try writer.writeValue(this.text);
- }
- };
+/// line_stop
+line_stop: i32 = 0,
- pub const StackTrace = struct {
- /// source_lines
- source_lines: []const SourceLine,
+/// column_start
+column_start: i32 = 0,
- /// frames
- frames: []const StackFrame,
+/// column_stop
+column_stop: i32 = 0,
- pub fn decode(reader: anytype) anyerror!StackTrace {
- var this = std.mem.zeroes(StackTrace);
+/// expression_start
+expression_start: i32 = 0,
- this.source_lines = try reader.readArray(SourceLine);
- this.frames = try reader.readArray(StackFrame);
- return this;
- }
+/// expression_stop
+expression_stop: i32 = 0,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(SourceLine, this.source_lines);
- try writer.writeArray(StackFrame, this.frames);
- }
- };
- pub const JsException = struct {
- /// name
- name: ?[]const u8 = null,
+pub fn decode(reader: anytype) anyerror!StackFramePosition {
+ var this = std.mem.zeroes(StackFramePosition);
+
+ this.source_offset = try reader.readValue(i32);
+ this.line = try reader.readValue(i32);
+ this.line_start = try reader.readValue(i32);
+ this.line_stop = try reader.readValue(i32);
+ this.column_start = try reader.readValue(i32);
+ this.column_stop = try reader.readValue(i32);
+ this.expression_start = try reader.readValue(i32);
+ this.expression_stop = try reader.readValue(i32);
+ return this;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.source_offset);
+ try writer.writeInt(this.line);
+ try writer.writeInt(this.line_start);
+ try writer.writeInt(this.line_stop);
+ try writer.writeInt(this.column_start);
+ try writer.writeInt(this.column_stop);
+ try writer.writeInt(this.expression_start);
+ try writer.writeInt(this.expression_stop);
+}
- /// message
- message: ?[]const u8 = null,
+};
- /// runtime_type
- runtime_type: ?u16 = null,
+pub const SourceLine = struct {
+/// line
+line: i32 = 0,
- /// code
- code: ?u8 = null,
+/// text
+text: []const u8,
- /// stack
- stack: ?StackTrace = null,
- pub fn decode(reader: anytype) anyerror!JsException {
- var this = std.mem.zeroes(JsException);
+pub fn decode(reader: anytype) anyerror!SourceLine {
+ var this = std.mem.zeroes(SourceLine);
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+ this.line = try reader.readValue(i32);
+ this.text = try reader.readValue([]const u8);
+ return this;
+}
- 1 => {
- this.name = try reader.readValue([]const u8);
- },
- 2 => {
- this.message = try reader.readValue([]const u8);
- },
- 3 => {
- this.runtime_type = try reader.readValue(u16);
- },
- 4 => {
- this.code = try reader.readValue(u8);
- },
- 5 => {
- this.stack = try reader.readValue(StackTrace);
- },
- else => {
- return error.InvalidMessage;
- },
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.line);
+ try writer.writeValue(this.text);
+}
+
+};
+
+pub const StackTrace = struct {
+/// source_lines
+source_lines: []const SourceLine,
+
+/// frames
+frames: []const StackFrame,
+
+
+pub fn decode(reader: anytype) anyerror!StackTrace {
+ var this = std.mem.zeroes(StackTrace);
+
+ this.source_lines = try reader.readArray(SourceLine);
+ this.frames = try reader.readArray(StackFrame);
+ return this;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(SourceLine, this.source_lines);
+ try writer.writeArray(StackFrame, this.frames);
+}
+
+};
+
+pub const JsException = struct {
+/// name
+name: ?[]const u8 = null,
+
+/// message
+message: ?[]const u8 = null,
+
+/// runtime_type
+runtime_type: ?u16 = null,
+
+/// code
+code: ?u8 = null,
+
+/// stack
+stack: ?StackTrace = null,
+
+
+pub fn decode(reader: anytype) anyerror!JsException {
+ var this = std.mem.zeroes(JsException);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.name = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.message = try reader.readValue([]const u8);
+},
+ 3 => {
+ this.runtime_type = try reader.readValue(u16);
+},
+ 4 => {
+ this.code = try reader.readValue(u8);
+},
+ 5 => {
+ this.stack = try reader.readValue(StackTrace);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.name) |name| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(name);
+}
+if (this.message) |message| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(message);
+}
+if (this.runtime_type) |runtime_type| {
+ try writer.writeFieldID(3);
+ try writer.writeInt(runtime_type);
+}
+if (this.code) |code| {
+ try writer.writeFieldID(4);
+ try writer.writeInt(code);
+}
+if (this.stack) |stack| {
+ try writer.writeFieldID(5);
+ try writer.writeValue(stack);
+}
+try writer.endMessage();
+}
+
+};
+
+pub const FallbackStep = enum(u8) {
+
+_none,
+ /// ssr_disabled
+ ssr_disabled,
+
+ /// create_vm
+ create_vm,
+
+ /// configure_router
+ configure_router,
+
+ /// configure_defines
+ configure_defines,
+
+ /// resolve_entry_point
+ resolve_entry_point,
+
+ /// load_entry_point
+ load_entry_point,
+
+ /// eval_entry_point
+ eval_entry_point,
+
+ /// fetch_event_handler
+ fetch_event_handler,
+
+_,
+
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.name) |name| {
- try writer.writeFieldID(1);
- try writer.writeValue(name);
- }
- if (this.message) |message| {
- try writer.writeFieldID(2);
- try writer.writeValue(message);
- }
- if (this.runtime_type) |runtime_type| {
- try writer.writeFieldID(3);
- try writer.writeInt(runtime_type);
- }
- if (this.code) |code| {
- try writer.writeFieldID(4);
- try writer.writeInt(code);
- }
- if (this.stack) |stack| {
- try writer.writeFieldID(5);
- try writer.writeValue(stack);
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const FallbackStep = enum(u8) {
- _none,
- /// ssr_disabled
- ssr_disabled,
+pub const Problems = struct {
+/// code
+code: u16 = 0,
- /// create_vm
- create_vm,
+/// name
+name: []const u8,
- /// configure_router
- configure_router,
+/// exceptions
+exceptions: []const JsException,
- /// configure_defines
- configure_defines,
+/// build
+build: Log,
- /// resolve_entry_point
- resolve_entry_point,
- /// load_entry_point
- load_entry_point,
+pub fn decode(reader: anytype) anyerror!Problems {
+ var this = std.mem.zeroes(Problems);
- /// eval_entry_point
- eval_entry_point,
+ this.code = try reader.readValue(u16);
+ this.name = try reader.readValue([]const u8);
+ this.exceptions = try reader.readArray(JsException);
+ this.build = try reader.readValue(Log);
+ return this;
+}
- /// fetch_event_handler
- fetch_event_handler,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.code);
+ try writer.writeValue(this.name);
+ try writer.writeArray(JsException, this.exceptions);
+ try writer.writeValue(this.build);
+}
- _,
+};
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+pub const Router = struct {
+/// routes
+routes: []const []const u8,
- pub const Problems = struct {
- /// code
- code: u16 = 0,
+/// route
+route: i32 = 0,
- /// name
- name: []const u8,
+/// params
+params: StringMap,
- /// exceptions
- exceptions: []const JsException,
- /// build
- build: Log,
+pub fn decode(reader: anytype) anyerror!Router {
+ var this = std.mem.zeroes(Router);
- pub fn decode(reader: anytype) anyerror!Problems {
- var this = std.mem.zeroes(Problems);
+ this.routes = try reader.readArray([]const u8);
+ this.route = try reader.readValue(i32);
+ this.params = try reader.readValue(StringMap);
+ return this;
+}
- this.code = try reader.readValue(u16);
- this.name = try reader.readValue([]const u8);
- this.exceptions = try reader.readArray(JsException);
- this.build = try reader.readValue(Log);
- return this;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray([]const u8, this.routes);
+ try writer.writeInt(this.route);
+ try writer.writeValue(this.params);
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.code);
- try writer.writeValue(this.name);
- try writer.writeArray(JsException, this.exceptions);
- try writer.writeValue(this.build);
- }
- };
+};
+
+pub const FallbackMessageContainer = struct {
+/// message
+message: ?[]const u8 = null,
+
+/// router
+router: ?Router = null,
+
+/// reason
+reason: ?FallbackStep = null,
+
+/// problems
+problems: ?Problems = null,
+
+
+pub fn decode(reader: anytype) anyerror!FallbackMessageContainer {
+ var this = std.mem.zeroes(FallbackMessageContainer);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.message = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.router = try reader.readValue(Router);
+},
+ 3 => {
+ this.reason = try reader.readValue(FallbackStep);
+},
+ 4 => {
+ this.problems = try reader.readValue(Problems);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.message) |message| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(message);
+}
+if (this.router) |router| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(router);
+}
+if (this.reason) |reason| {
+ try writer.writeFieldID(3);
+ try writer.writeEnum(reason);
+}
+if (this.problems) |problems| {
+ try writer.writeFieldID(4);
+ try writer.writeValue(problems);
+}
+try writer.endMessage();
+}
+
+};
- pub const Router = struct {
- /// routes
- routes: []const []const u8,
+pub const ResolveMode = enum(u8) {
- /// route
- route: i32 = 0,
+_none,
+ /// disable
+ disable,
- /// params
- params: StringMap,
+ /// lazy
+ lazy,
- pub fn decode(reader: anytype) anyerror!Router {
- var this = std.mem.zeroes(Router);
+ /// dev
+ dev,
- this.routes = try reader.readArray([]const u8);
- this.route = try reader.readValue(i32);
- this.params = try reader.readValue(StringMap);
- return this;
- }
+ /// bundle
+ bundle,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray([]const u8, this.routes);
- try writer.writeInt(this.route);
- try writer.writeValue(this.params);
- }
- };
+_,
+
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- pub const FallbackMessageContainer = struct {
- /// message
- message: ?[]const u8 = null,
+
+};
- /// router
- router: ?Router = null,
+pub const Platform = enum(u8) {
- /// reason
- reason: ?FallbackStep = null,
+_none,
+ /// browser
+ browser,
- /// problems
- problems: ?Problems = null,
+ /// node
+ node,
- pub fn decode(reader: anytype) anyerror!FallbackMessageContainer {
- var this = std.mem.zeroes(FallbackMessageContainer);
+ /// bun
+ bun,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+_,
- 1 => {
- this.message = try reader.readValue([]const u8);
- },
- 2 => {
- this.router = try reader.readValue(Router);
- },
- 3 => {
- this.reason = try reader.readValue(FallbackStep);
- },
- 4 => {
- this.problems = try reader.readValue(Problems);
- },
- else => {
- return error.InvalidMessage;
- },
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.message) |message| {
- try writer.writeFieldID(1);
- try writer.writeValue(message);
- }
- if (this.router) |router| {
- try writer.writeFieldID(2);
- try writer.writeValue(router);
- }
- if (this.reason) |reason| {
- try writer.writeFieldID(3);
- try writer.writeEnum(reason);
- }
- if (this.problems) |problems| {
- try writer.writeFieldID(4);
- try writer.writeValue(problems);
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const ResolveMode = enum(u8) {
- _none,
- /// disable
- disable,
+pub const CssInJsBehavior = enum(u8) {
- /// lazy
- lazy,
+_none,
+ /// facade
+ facade,
- /// dev
- dev,
+ /// facade_onimportcss
+ facade_onimportcss,
- /// bundle
- bundle,
+ /// auto_onimportcss
+ auto_onimportcss,
- _,
+_,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- pub const Platform = enum(u8) {
- _none,
- /// browser
- browser,
+
+};
- /// node
- node,
+pub const JsxRuntime = enum(u8) {
- /// bun
- bun,
+_none,
+ /// automatic
+ automatic,
- _,
+ /// classic
+ classic,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+_,
- pub const CssInJsBehavior = enum(u8) {
- _none,
- /// facade
- facade,
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- /// facade_onimportcss
- facade_onimportcss,
+
+};
- /// auto_onimportcss
- auto_onimportcss,
+pub const Jsx = struct {
+/// factory
+factory: []const u8,
- _,
+/// runtime
+runtime: JsxRuntime,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+/// fragment
+fragment: []const u8,
- pub const JsxRuntime = enum(u8) {
- _none,
- /// automatic
- automatic,
+/// development
+development: bool = false,
- /// classic
- classic,
+/// import_source
+import_source: []const u8,
- _,
+/// react_fast_refresh
+react_fast_refresh: bool = false,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
- pub const Jsx = struct {
- /// factory
- factory: []const u8,
+pub fn decode(reader: anytype) anyerror!Jsx {
+ var this = std.mem.zeroes(Jsx);
- /// runtime
- runtime: JsxRuntime,
+ this.factory = try reader.readValue([]const u8);
+ this.runtime = try reader.readValue(JsxRuntime);
+ this.fragment = try reader.readValue([]const u8);
+ this.development = try reader.readValue(bool);
+ this.import_source = try reader.readValue([]const u8);
+ this.react_fast_refresh = try reader.readValue(bool);
+ return this;
+}
- /// fragment
- fragment: []const u8,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.factory);
+ try writer.writeEnum(this.runtime);
+ try writer.writeValue(this.fragment);
+ try writer.writeInt(@intCast(u8, @boolToInt(this.development)));
+ try writer.writeValue(this.import_source);
+ try writer.writeInt(@intCast(u8, @boolToInt(this.react_fast_refresh)));
+}
- /// development
- development: bool = false,
+};
- /// import_source
- import_source: []const u8,
+pub const StringPointer = packed struct {
+/// offset
+offset: u32 = 0,
- /// react_fast_refresh
- react_fast_refresh: bool = false,
+/// length
+length: u32 = 0,
- pub fn decode(reader: anytype) anyerror!Jsx {
- var this = std.mem.zeroes(Jsx);
- this.factory = try reader.readValue([]const u8);
- this.runtime = try reader.readValue(JsxRuntime);
- this.fragment = try reader.readValue([]const u8);
- this.development = try reader.readValue(bool);
- this.import_source = try reader.readValue([]const u8);
- this.react_fast_refresh = try reader.readValue(bool);
- return this;
- }
+pub fn decode(reader: anytype) anyerror!StringPointer {
+ var this = std.mem.zeroes(StringPointer);
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.factory);
- try writer.writeEnum(this.runtime);
- try writer.writeValue(this.fragment);
- try writer.writeInt(@intCast(u8, @boolToInt(this.development)));
- try writer.writeValue(this.import_source);
- try writer.writeInt(@intCast(u8, @boolToInt(this.react_fast_refresh)));
- }
- };
+ this.offset = try reader.readValue(u32);
+ this.length = try reader.readValue(u32);
+ return this;
+}
- pub const StringPointer = packed struct {
- /// offset
- offset: u32 = 0,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.offset);
+ try writer.writeInt(this.length);
+}
- /// length
- length: u32 = 0,
+};
- pub fn decode(reader: anytype) anyerror!StringPointer {
- var this = std.mem.zeroes(StringPointer);
+pub const JavascriptBundledModule = struct {
+/// path
+path: StringPointer,
- this.offset = try reader.readValue(u32);
- this.length = try reader.readValue(u32);
- return this;
- }
+/// code
+code: StringPointer,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.offset);
- try writer.writeInt(this.length);
- }
- };
+/// package_id
+package_id: u32 = 0,
- pub const JavascriptBundledModule = struct {
- /// path
- path: StringPointer,
+/// id
+id: u32 = 0,
- /// code
- code: StringPointer,
+/// path_extname_length
+path_extname_length: u8 = 0,
- /// package_id
- package_id: u32 = 0,
- /// id
- id: u32 = 0,
+pub fn decode(reader: anytype) anyerror!JavascriptBundledModule {
+ var this = std.mem.zeroes(JavascriptBundledModule);
- /// path_extname_length
- path_extname_length: u8 = 0,
+ this.path = try reader.readValue(StringPointer);
+ this.code = try reader.readValue(StringPointer);
+ this.package_id = try reader.readValue(u32);
+ this.id = try reader.readValue(u32);
+ this.path_extname_length = try reader.readValue(u8);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!JavascriptBundledModule {
- var this = std.mem.zeroes(JavascriptBundledModule);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.path);
+ try writer.writeValue(this.code);
+ try writer.writeInt(this.package_id);
+ try writer.writeInt(this.id);
+ try writer.writeInt(this.path_extname_length);
+}
- this.path = try reader.readValue(StringPointer);
- this.code = try reader.readValue(StringPointer);
- this.package_id = try reader.readValue(u32);
- this.id = try reader.readValue(u32);
- this.path_extname_length = try reader.readValue(u8);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.path);
- try writer.writeValue(this.code);
- try writer.writeInt(this.package_id);
- try writer.writeInt(this.id);
- try writer.writeInt(this.path_extname_length);
- }
- };
+pub const JavascriptBundledPackage = struct {
+/// name
+name: StringPointer,
- pub const JavascriptBundledPackage = struct {
- /// name
- name: StringPointer,
+/// version
+version: StringPointer,
- /// version
- version: StringPointer,
+/// hash
+hash: u32 = 0,
- /// hash
- hash: u32 = 0,
+/// modules_offset
+modules_offset: u32 = 0,
- /// modules_offset
- modules_offset: u32 = 0,
+/// modules_length
+modules_length: u32 = 0,
- /// modules_length
- modules_length: u32 = 0,
- pub fn decode(reader: anytype) anyerror!JavascriptBundledPackage {
- var this = std.mem.zeroes(JavascriptBundledPackage);
+pub fn decode(reader: anytype) anyerror!JavascriptBundledPackage {
+ var this = std.mem.zeroes(JavascriptBundledPackage);
- this.name = try reader.readValue(StringPointer);
- this.version = try reader.readValue(StringPointer);
- this.hash = try reader.readValue(u32);
- this.modules_offset = try reader.readValue(u32);
- this.modules_length = try reader.readValue(u32);
- return this;
- }
+ this.name = try reader.readValue(StringPointer);
+ this.version = try reader.readValue(StringPointer);
+ this.hash = try reader.readValue(u32);
+ this.modules_offset = try reader.readValue(u32);
+ this.modules_length = try reader.readValue(u32);
+ return this;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.name);
- try writer.writeValue(this.version);
- try writer.writeInt(this.hash);
- try writer.writeInt(this.modules_offset);
- try writer.writeInt(this.modules_length);
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.name);
+ try writer.writeValue(this.version);
+ try writer.writeInt(this.hash);
+ try writer.writeInt(this.modules_offset);
+ try writer.writeInt(this.modules_length);
+}
- pub const JavascriptBundle = struct {
- /// modules
- modules: []const JavascriptBundledModule,
+};
- /// packages
- packages: []const JavascriptBundledPackage,
+pub const JavascriptBundle = struct {
+/// modules
+modules: []const JavascriptBundledModule,
- /// etag
- etag: []const u8,
+/// packages
+packages: []const JavascriptBundledPackage,
- /// generated_at
- generated_at: u32 = 0,
+/// etag
+etag: []const u8,
- /// app_package_json_dependencies_hash
- app_package_json_dependencies_hash: []const u8,
+/// generated_at
+generated_at: u32 = 0,
- /// import_from_name
- import_from_name: []const u8,
+/// app_package_json_dependencies_hash
+app_package_json_dependencies_hash: []const u8,
- /// manifest_string
- manifest_string: []const u8,
+/// import_from_name
+import_from_name: []const u8,
- pub fn decode(reader: anytype) anyerror!JavascriptBundle {
- var this = std.mem.zeroes(JavascriptBundle);
+/// manifest_string
+manifest_string: []const u8,
- this.modules = try reader.readArray(JavascriptBundledModule);
- this.packages = try reader.readArray(JavascriptBundledPackage);
- this.etag = try reader.readArray(u8);
- this.generated_at = try reader.readValue(u32);
- this.app_package_json_dependencies_hash = try reader.readArray(u8);
- this.import_from_name = try reader.readArray(u8);
- this.manifest_string = try reader.readArray(u8);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(JavascriptBundledModule, this.modules);
- try writer.writeArray(JavascriptBundledPackage, this.packages);
- try writer.writeArray(u8, this.etag);
- try writer.writeInt(this.generated_at);
- try writer.writeArray(u8, this.app_package_json_dependencies_hash);
- try writer.writeArray(u8, this.import_from_name);
- try writer.writeArray(u8, this.manifest_string);
- }
- };
+pub fn decode(reader: anytype) anyerror!JavascriptBundle {
+ var this = std.mem.zeroes(JavascriptBundle);
- pub const JavascriptBundleContainer = struct {
- /// bundle_format_version
- bundle_format_version: ?u32 = null,
+ this.modules = try reader.readArray(JavascriptBundledModule);
+ this.packages = try reader.readArray(JavascriptBundledPackage);
+ this.etag = try reader.readArray(u8);
+ this.generated_at = try reader.readValue(u32);
+ this.app_package_json_dependencies_hash = try reader.readArray(u8);
+ this.import_from_name = try reader.readArray(u8);
+ this.manifest_string = try reader.readArray(u8);
+ return this;
+}
- /// routes
- routes: ?LoadedRouteConfig = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(JavascriptBundledModule, this.modules);
+ try writer.writeArray(JavascriptBundledPackage, this.packages);
+ try writer.writeArray(u8, this.etag);
+ try writer.writeInt(this.generated_at);
+ try writer.writeArray(u8, this.app_package_json_dependencies_hash);
+ try writer.writeArray(u8, this.import_from_name);
+ try writer.writeArray(u8, this.manifest_string);
+}
- /// framework
- framework: ?LoadedFramework = null,
+};
- /// bundle
- bundle: ?JavascriptBundle = null,
+pub const JavascriptBundleContainer = struct {
+/// bundle_format_version
+bundle_format_version: ?u32 = null,
+
+/// routes
+routes: ?LoadedRouteConfig = null,
+
+/// framework
+framework: ?LoadedFramework = null,
+
+/// bundle
+bundle: ?JavascriptBundle = null,
+
+/// code_length
+code_length: ?u32 = null,
+
+
+pub fn decode(reader: anytype) anyerror!JavascriptBundleContainer {
+ var this = std.mem.zeroes(JavascriptBundleContainer);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.bundle_format_version = try reader.readValue(u32);
+},
+ 2 => {
+ this.routes = try reader.readValue(LoadedRouteConfig);
+},
+ 3 => {
+ this.framework = try reader.readValue(LoadedFramework);
+},
+ 4 => {
+ this.bundle = try reader.readValue(JavascriptBundle);
+},
+ 5 => {
+ this.code_length = try reader.readValue(u32);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- /// code_length
- code_length: ?u32 = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.bundle_format_version) |bundle_format_version| {
+ try writer.writeFieldID(1);
+ try writer.writeInt(bundle_format_version);
+}
+if (this.routes) |routes| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(routes);
+}
+if (this.framework) |framework| {
+ try writer.writeFieldID(3);
+ try writer.writeValue(framework);
+}
+if (this.bundle) |bundle| {
+ try writer.writeFieldID(4);
+ try writer.writeValue(bundle);
+}
+if (this.code_length) |code_length| {
+ try writer.writeFieldID(5);
+ try writer.writeInt(code_length);
+}
+try writer.endMessage();
+}
- pub fn decode(reader: anytype) anyerror!JavascriptBundleContainer {
- var this = std.mem.zeroes(JavascriptBundleContainer);
+};
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+pub const ScanDependencyMode = enum(u8) {
- 1 => {
- this.bundle_format_version = try reader.readValue(u32);
- },
- 2 => {
- this.routes = try reader.readValue(LoadedRouteConfig);
- },
- 3 => {
- this.framework = try reader.readValue(LoadedFramework);
- },
- 4 => {
- this.bundle = try reader.readValue(JavascriptBundle);
- },
- 5 => {
- this.code_length = try reader.readValue(u32);
- },
- else => {
- return error.InvalidMessage;
- },
+_none,
+ /// app
+ app,
+
+ /// all
+ all,
+
+_,
+
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.bundle_format_version) |bundle_format_version| {
- try writer.writeFieldID(1);
- try writer.writeInt(bundle_format_version);
- }
- if (this.routes) |routes| {
- try writer.writeFieldID(2);
- try writer.writeValue(routes);
- }
- if (this.framework) |framework| {
- try writer.writeFieldID(3);
- try writer.writeValue(framework);
- }
- if (this.bundle) |bundle| {
- try writer.writeFieldID(4);
- try writer.writeValue(bundle);
- }
- if (this.code_length) |code_length| {
- try writer.writeFieldID(5);
- try writer.writeInt(code_length);
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const ScanDependencyMode = enum(u8) {
- _none,
- /// app
- app,
+pub const ModuleImportType = enum(u8) {
- /// all
- all,
+_none,
+ /// import
+ import,
- _,
+ /// require
+ require,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+_,
+
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- pub const ModuleImportType = enum(u8) {
- _none,
- /// import
- import,
+
+};
- /// require
- require,
+pub const ModuleImportRecord = struct {
+/// kind
+kind: ModuleImportType,
- _,
+/// path
+path: []const u8,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+/// dynamic
+dynamic: bool = false,
- pub const ModuleImportRecord = struct {
- /// kind
- kind: ModuleImportType,
- /// path
- path: []const u8,
+pub fn decode(reader: anytype) anyerror!ModuleImportRecord {
+ var this = std.mem.zeroes(ModuleImportRecord);
- /// dynamic
- dynamic: bool = false,
+ this.kind = try reader.readValue(ModuleImportType);
+ this.path = try reader.readValue([]const u8);
+ this.dynamic = try reader.readValue(bool);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!ModuleImportRecord {
- var this = std.mem.zeroes(ModuleImportRecord);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.kind);
+ try writer.writeValue(this.path);
+ try writer.writeInt(@intCast(u8, @boolToInt(this.dynamic)));
+}
- this.kind = try reader.readValue(ModuleImportType);
- this.path = try reader.readValue([]const u8);
- this.dynamic = try reader.readValue(bool);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.kind);
- try writer.writeValue(this.path);
- try writer.writeInt(@intCast(u8, @boolToInt(this.dynamic)));
- }
- };
+pub const Module = struct {
+/// path
+path: []const u8,
- pub const Module = struct {
- /// path
- path: []const u8,
+/// imports
+imports: []const ModuleImportRecord,
- /// imports
- imports: []const ModuleImportRecord,
- pub fn decode(reader: anytype) anyerror!Module {
- var this = std.mem.zeroes(Module);
+pub fn decode(reader: anytype) anyerror!Module {
+ var this = std.mem.zeroes(Module);
- this.path = try reader.readValue([]const u8);
- this.imports = try reader.readArray(ModuleImportRecord);
- return this;
- }
+ this.path = try reader.readValue([]const u8);
+ this.imports = try reader.readArray(ModuleImportRecord);
+ return this;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.path);
- try writer.writeArray(ModuleImportRecord, this.imports);
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.path);
+ try writer.writeArray(ModuleImportRecord, this.imports);
+}
- pub const StringMap = struct {
- /// keys
- keys: []const []const u8,
+};
- /// values
- values: []const []const u8,
+pub const StringMap = struct {
+/// keys
+keys: []const []const u8,
- pub fn decode(reader: anytype) anyerror!StringMap {
- var this = std.mem.zeroes(StringMap);
+/// values
+values: []const []const u8,
- this.keys = try reader.readArray([]const u8);
- this.values = try reader.readArray([]const u8);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray([]const u8, this.keys);
- try writer.writeArray([]const u8, this.values);
- }
- };
+pub fn decode(reader: anytype) anyerror!StringMap {
+ var this = std.mem.zeroes(StringMap);
+
+ this.keys = try reader.readArray([]const u8);
+ this.values = try reader.readArray([]const u8);
+ return this;
+}
- pub const LoaderMap = struct {
- /// extensions
- extensions: []const []const u8,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray([]const u8, this.keys);
+ try writer.writeArray([]const u8, this.values);
+}
- /// loaders
- loaders: []const Loader,
+};
- pub fn decode(reader: anytype) anyerror!LoaderMap {
- var this = std.mem.zeroes(LoaderMap);
+pub const LoaderMap = struct {
+/// extensions
+extensions: []const []const u8,
- this.extensions = try reader.readArray([]const u8);
- this.loaders = try reader.readArray(Loader);
- return this;
- }
+/// loaders
+loaders: []const Loader,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray([]const u8, this.extensions);
- try writer.writeArray(Loader, this.loaders);
- }
- };
- pub const DotEnvBehavior = enum(u32) {
- _none,
- /// disable
- disable,
+pub fn decode(reader: anytype) anyerror!LoaderMap {
+ var this = std.mem.zeroes(LoaderMap);
- /// prefix
- prefix,
+ this.extensions = try reader.readArray([]const u8);
+ this.loaders = try reader.readArray(Loader);
+ return this;
+}
- /// load_all
- load_all,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray([]const u8, this.extensions);
+ try writer.writeArray(Loader, this.loaders);
+}
- _,
+};
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+pub const DotEnvBehavior = enum(u32) {
- pub const EnvConfig = struct {
- /// prefix
- prefix: ?[]const u8 = null,
+_none,
+ /// disable
+ disable,
- /// defaults
- defaults: ?StringMap = null,
+ /// prefix
+ prefix,
- pub fn decode(reader: anytype) anyerror!EnvConfig {
- var this = std.mem.zeroes(EnvConfig);
+ /// load_all
+ load_all,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+_,
- 1 => {
- this.prefix = try reader.readValue([]const u8);
- },
- 2 => {
- this.defaults = try reader.readValue(StringMap);
- },
- else => {
- return error.InvalidMessage;
- },
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.prefix) |prefix| {
- try writer.writeFieldID(1);
- try writer.writeValue(prefix);
- }
- if (this.defaults) |defaults| {
- try writer.writeFieldID(2);
- try writer.writeValue(defaults);
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const LoadedEnvConfig = struct {
- /// dotenv
- dotenv: DotEnvBehavior,
+pub const EnvConfig = struct {
+/// prefix
+prefix: ?[]const u8 = null,
+
+/// defaults
+defaults: ?StringMap = null,
+
+
+pub fn decode(reader: anytype) anyerror!EnvConfig {
+ var this = std.mem.zeroes(EnvConfig);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.prefix = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.defaults = try reader.readValue(StringMap);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- /// defaults
- defaults: StringMap,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.prefix) |prefix| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(prefix);
+}
+if (this.defaults) |defaults| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(defaults);
+}
+try writer.endMessage();
+}
- /// prefix
- prefix: []const u8,
+};
- pub fn decode(reader: anytype) anyerror!LoadedEnvConfig {
- var this = std.mem.zeroes(LoadedEnvConfig);
+pub const LoadedEnvConfig = struct {
+/// dotenv
+dotenv: DotEnvBehavior,
- this.dotenv = try reader.readValue(DotEnvBehavior);
- this.defaults = try reader.readValue(StringMap);
- this.prefix = try reader.readValue([]const u8);
- return this;
- }
+/// defaults
+defaults: StringMap,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.dotenv);
- try writer.writeValue(this.defaults);
- try writer.writeValue(this.prefix);
- }
- };
+/// prefix
+prefix: []const u8,
- pub const FrameworkConfig = struct {
- /// package
- package: ?[]const u8 = null,
- /// client
- client: ?FrameworkEntryPointMessage = null,
+pub fn decode(reader: anytype) anyerror!LoadedEnvConfig {
+ var this = std.mem.zeroes(LoadedEnvConfig);
- /// server
- server: ?FrameworkEntryPointMessage = null,
+ this.dotenv = try reader.readValue(DotEnvBehavior);
+ this.defaults = try reader.readValue(StringMap);
+ this.prefix = try reader.readValue([]const u8);
+ return this;
+}
- /// fallback
- fallback: ?FrameworkEntryPointMessage = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.dotenv);
+ try writer.writeValue(this.defaults);
+ try writer.writeValue(this.prefix);
+}
- /// development
- development: ?bool = null,
+};
- /// client_css_in_js
- client_css_in_js: ?CssInJsBehavior = null,
+pub const FrameworkConfig = struct {
+/// package
+package: ?[]const u8 = null,
+
+/// client
+client: ?FrameworkEntryPointMessage = null,
+
+/// server
+server: ?FrameworkEntryPointMessage = null,
+
+/// fallback
+fallback: ?FrameworkEntryPointMessage = null,
+
+/// development
+development: ?bool = null,
+
+/// client_css_in_js
+client_css_in_js: ?CssInJsBehavior = null,
+
+/// display_name
+display_name: ?[]const u8 = null,
+
+
+pub fn decode(reader: anytype) anyerror!FrameworkConfig {
+ var this = std.mem.zeroes(FrameworkConfig);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.package = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.client = try reader.readValue(FrameworkEntryPointMessage);
+},
+ 3 => {
+ this.server = try reader.readValue(FrameworkEntryPointMessage);
+},
+ 4 => {
+ this.fallback = try reader.readValue(FrameworkEntryPointMessage);
+},
+ 5 => {
+ this.development = try reader.readValue(bool);
+},
+ 6 => {
+ this.client_css_in_js = try reader.readValue(CssInJsBehavior);
+},
+ 7 => {
+ this.display_name = try reader.readValue([]const u8);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- /// display_name
- display_name: ?[]const u8 = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.package) |package| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(package);
+}
+if (this.client) |client| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(client);
+}
+if (this.server) |server| {
+ try writer.writeFieldID(3);
+ try writer.writeValue(server);
+}
+if (this.fallback) |fallback| {
+ try writer.writeFieldID(4);
+ try writer.writeValue(fallback);
+}
+if (this.development) |development| {
+ try writer.writeFieldID(5);
+ try writer.writeInt(@intCast(u8, @boolToInt(development)));
+}
+if (this.client_css_in_js) |client_css_in_js| {
+ try writer.writeFieldID(6);
+ try writer.writeEnum(client_css_in_js);
+}
+if (this.display_name) |display_name| {
+ try writer.writeFieldID(7);
+ try writer.writeValue(display_name);
+}
+try writer.endMessage();
+}
- pub fn decode(reader: anytype) anyerror!FrameworkConfig {
- var this = std.mem.zeroes(FrameworkConfig);
+};
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+pub const FrameworkEntryPoint = struct {
+/// kind
+kind: FrameworkEntryPointType,
- 1 => {
- this.package = try reader.readValue([]const u8);
- },
- 2 => {
- this.client = try reader.readValue(FrameworkEntryPointMessage);
- },
- 3 => {
- this.server = try reader.readValue(FrameworkEntryPointMessage);
- },
- 4 => {
- this.fallback = try reader.readValue(FrameworkEntryPointMessage);
- },
- 5 => {
- this.development = try reader.readValue(bool);
- },
- 6 => {
- this.client_css_in_js = try reader.readValue(CssInJsBehavior);
- },
- 7 => {
- this.display_name = try reader.readValue([]const u8);
- },
- else => {
- return error.InvalidMessage;
- },
- }
- }
- unreachable;
- }
+/// path
+path: []const u8,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.package) |package| {
- try writer.writeFieldID(1);
- try writer.writeValue(package);
- }
- if (this.client) |client| {
- try writer.writeFieldID(2);
- try writer.writeValue(client);
- }
- if (this.server) |server| {
- try writer.writeFieldID(3);
- try writer.writeValue(server);
- }
- if (this.fallback) |fallback| {
- try writer.writeFieldID(4);
- try writer.writeValue(fallback);
- }
- if (this.development) |development| {
- try writer.writeFieldID(5);
- try writer.writeInt(@intCast(u8, @boolToInt(development)));
- }
- if (this.client_css_in_js) |client_css_in_js| {
- try writer.writeFieldID(6);
- try writer.writeEnum(client_css_in_js);
- }
- if (this.display_name) |display_name| {
- try writer.writeFieldID(7);
- try writer.writeValue(display_name);
- }
- try writer.endMessage();
- }
- };
+/// env
+env: LoadedEnvConfig,
- pub const FrameworkEntryPoint = struct {
- /// kind
- kind: FrameworkEntryPointType,
- /// path
- path: []const u8,
+pub fn decode(reader: anytype) anyerror!FrameworkEntryPoint {
+ var this = std.mem.zeroes(FrameworkEntryPoint);
- /// env
- env: LoadedEnvConfig,
+ this.kind = try reader.readValue(FrameworkEntryPointType);
+ this.path = try reader.readValue([]const u8);
+ this.env = try reader.readValue(LoadedEnvConfig);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!FrameworkEntryPoint {
- var this = std.mem.zeroes(FrameworkEntryPoint);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.kind);
+ try writer.writeValue(this.path);
+ try writer.writeValue(this.env);
+}
- this.kind = try reader.readValue(FrameworkEntryPointType);
- this.path = try reader.readValue([]const u8);
- this.env = try reader.readValue(LoadedEnvConfig);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.kind);
- try writer.writeValue(this.path);
- try writer.writeValue(this.env);
- }
- };
+pub const FrameworkEntryPointMap = struct {
+/// client
+client: ?FrameworkEntryPoint = null,
+
+/// server
+server: ?FrameworkEntryPoint = null,
+
+/// fallback
+fallback: ?FrameworkEntryPoint = null,
+
+
+pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMap {
+ var this = std.mem.zeroes(FrameworkEntryPointMap);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.client = try reader.readValue(FrameworkEntryPoint);
+},
+ 2 => {
+ this.server = try reader.readValue(FrameworkEntryPoint);
+},
+ 3 => {
+ this.fallback = try reader.readValue(FrameworkEntryPoint);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- pub const FrameworkEntryPointMap = struct {
- /// client
- client: ?FrameworkEntryPoint = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.client) |client| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(client);
+}
+if (this.server) |server| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(server);
+}
+if (this.fallback) |fallback| {
+ try writer.writeFieldID(3);
+ try writer.writeValue(fallback);
+}
+try writer.endMessage();
+}
- /// server
- server: ?FrameworkEntryPoint = null,
+};
- /// fallback
- fallback: ?FrameworkEntryPoint = null,
+pub const FrameworkEntryPointMessage = struct {
+/// path
+path: ?[]const u8 = null,
+
+/// env
+env: ?EnvConfig = null,
+
+
+pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMessage {
+ var this = std.mem.zeroes(FrameworkEntryPointMessage);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.path = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.env = try reader.readValue(EnvConfig);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMap {
- var this = std.mem.zeroes(FrameworkEntryPointMap);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.path) |path| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(path);
+}
+if (this.env) |env| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(env);
+}
+try writer.endMessage();
+}
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+};
- 1 => {
- this.client = try reader.readValue(FrameworkEntryPoint);
- },
- 2 => {
- this.server = try reader.readValue(FrameworkEntryPoint);
- },
- 3 => {
- this.fallback = try reader.readValue(FrameworkEntryPoint);
- },
- else => {
- return error.InvalidMessage;
- },
- }
- }
- unreachable;
- }
+pub const LoadedFramework = struct {
+/// package
+package: []const u8,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.client) |client| {
- try writer.writeFieldID(1);
- try writer.writeValue(client);
- }
- if (this.server) |server| {
- try writer.writeFieldID(2);
- try writer.writeValue(server);
- }
- if (this.fallback) |fallback| {
- try writer.writeFieldID(3);
- try writer.writeValue(fallback);
- }
- try writer.endMessage();
- }
- };
+/// display_name
+display_name: []const u8,
- pub const FrameworkEntryPointMessage = struct {
- /// path
- path: ?[]const u8 = null,
+/// development
+development: bool = false,
- /// env
- env: ?EnvConfig = null,
+/// entry_points
+entry_points: FrameworkEntryPointMap,
- pub fn decode(reader: anytype) anyerror!FrameworkEntryPointMessage {
- var this = std.mem.zeroes(FrameworkEntryPointMessage);
+/// client_css_in_js
+client_css_in_js: CssInJsBehavior,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
- 1 => {
- this.path = try reader.readValue([]const u8);
- },
- 2 => {
- this.env = try reader.readValue(EnvConfig);
- },
- else => {
- return error.InvalidMessage;
- },
- }
- }
- unreachable;
- }
+pub fn decode(reader: anytype) anyerror!LoadedFramework {
+ var this = std.mem.zeroes(LoadedFramework);
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.path) |path| {
- try writer.writeFieldID(1);
- try writer.writeValue(path);
- }
- if (this.env) |env| {
- try writer.writeFieldID(2);
- try writer.writeValue(env);
- }
- try writer.endMessage();
- }
- };
+ this.package = try reader.readValue([]const u8);
+ this.display_name = try reader.readValue([]const u8);
+ this.development = try reader.readValue(bool);
+ this.entry_points = try reader.readValue(FrameworkEntryPointMap);
+ this.client_css_in_js = try reader.readValue(CssInJsBehavior);
+ return this;
+}
- pub const LoadedFramework = struct {
- /// package
- package: []const u8,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.package);
+ try writer.writeValue(this.display_name);
+ try writer.writeInt(@intCast(u8, @boolToInt(this.development)));
+ try writer.writeValue(this.entry_points);
+ try writer.writeEnum(this.client_css_in_js);
+}
- /// display_name
- display_name: []const u8,
+};
- /// development
- development: bool = false,
+pub const LoadedRouteConfig = struct {
+/// dir
+dir: []const u8,
- /// entry_points
- entry_points: FrameworkEntryPointMap,
+/// extensions
+extensions: []const []const u8,
- /// client_css_in_js
- client_css_in_js: CssInJsBehavior,
+/// static_dir
+static_dir: []const u8,
- pub fn decode(reader: anytype) anyerror!LoadedFramework {
- var this = std.mem.zeroes(LoadedFramework);
+/// asset_prefix
+asset_prefix: []const u8,
- this.package = try reader.readValue([]const u8);
- this.display_name = try reader.readValue([]const u8);
- this.development = try reader.readValue(bool);
- this.entry_points = try reader.readValue(FrameworkEntryPointMap);
- this.client_css_in_js = try reader.readValue(CssInJsBehavior);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.package);
- try writer.writeValue(this.display_name);
- try writer.writeInt(@intCast(u8, @boolToInt(this.development)));
- try writer.writeValue(this.entry_points);
- try writer.writeEnum(this.client_css_in_js);
- }
- };
+pub fn decode(reader: anytype) anyerror!LoadedRouteConfig {
+ var this = std.mem.zeroes(LoadedRouteConfig);
+
+ this.dir = try reader.readValue([]const u8);
+ this.extensions = try reader.readArray([]const u8);
+ this.static_dir = try reader.readValue([]const u8);
+ this.asset_prefix = try reader.readValue([]const u8);
+ return this;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.dir);
+ try writer.writeArray([]const u8, this.extensions);
+ try writer.writeValue(this.static_dir);
+ try writer.writeValue(this.asset_prefix);
+}
- pub const LoadedRouteConfig = struct {
- /// dir
- dir: []const u8,
+};
+
+pub const RouteConfig = struct {
+/// dir
+dir: []const []const u8,
+
+/// extensions
+extensions: []const []const u8,
+
+/// static_dir
+static_dir: ?[]const u8 = null,
+
+/// asset_prefix
+asset_prefix: ?[]const u8 = null,
+
+
+pub fn decode(reader: anytype) anyerror!RouteConfig {
+ var this = std.mem.zeroes(RouteConfig);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.dir = try reader.readArray([]const u8);
+},
+ 2 => {
+ this.extensions = try reader.readArray([]const u8);
+},
+ 3 => {
+ this.static_dir = try reader.readValue([]const u8);
+},
+ 4 => {
+ this.asset_prefix = try reader.readValue([]const u8);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.dir) |dir| {
+ try writer.writeFieldID(1);
+ try writer.writeArray([]const u8, dir);
+}
+if (this.extensions) |extensions| {
+ try writer.writeFieldID(2);
+ try writer.writeArray([]const u8, extensions);
+}
+if (this.static_dir) |static_dir| {
+ try writer.writeFieldID(3);
+ try writer.writeValue(static_dir);
+}
+if (this.asset_prefix) |asset_prefix| {
+ try writer.writeFieldID(4);
+ try writer.writeValue(asset_prefix);
+}
+try writer.endMessage();
+}
- /// extensions
- extensions: []const []const u8,
+};
- /// static_dir
- static_dir: []const u8,
+pub const TransformOptions = struct {
+/// jsx
+jsx: ?Jsx = null,
- /// asset_prefix
- asset_prefix: []const u8,
+/// tsconfig_override
+tsconfig_override: ?[]const u8 = null,
- pub fn decode(reader: anytype) anyerror!LoadedRouteConfig {
- var this = std.mem.zeroes(LoadedRouteConfig);
+/// resolve
+resolve: ?ResolveMode = null,
- this.dir = try reader.readValue([]const u8);
- this.extensions = try reader.readArray([]const u8);
- this.static_dir = try reader.readValue([]const u8);
- this.asset_prefix = try reader.readValue([]const u8);
- return this;
- }
+/// origin
+origin: ?[]const u8 = null,
+
+/// absolute_working_dir
+absolute_working_dir: ?[]const u8 = null,
+
+/// define
+define: ?StringMap = null,
+
+/// preserve_symlinks
+preserve_symlinks: ?bool = null,
+
+/// entry_points
+entry_points: []const []const u8,
+
+/// write
+write: ?bool = null,
+
+/// inject
+inject: []const []const u8,
+
+/// output_dir
+output_dir: ?[]const u8 = null,
+
+/// external
+external: []const []const u8,
+
+/// loaders
+loaders: ?LoaderMap = null,
+
+/// main_fields
+main_fields: []const []const u8,
+
+/// platform
+platform: ?Platform = null,
+
+/// serve
+serve: ?bool = null,
+
+/// extension_order
+extension_order: []const []const u8,
+
+/// generate_node_module_bundle
+generate_node_module_bundle: ?bool = null,
+
+/// node_modules_bundle_path
+node_modules_bundle_path: ?[]const u8 = null,
+
+/// node_modules_bundle_path_server
+node_modules_bundle_path_server: ?[]const u8 = null,
+
+/// framework
+framework: ?FrameworkConfig = null,
+
+/// router
+router: ?RouteConfig = null,
+
+/// no_summary
+no_summary: ?bool = null,
+
+
+pub fn decode(reader: anytype) anyerror!TransformOptions {
+ var this = std.mem.zeroes(TransformOptions);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.jsx = try reader.readValue(Jsx);
+},
+ 2 => {
+ this.tsconfig_override = try reader.readValue([]const u8);
+},
+ 3 => {
+ this.resolve = try reader.readValue(ResolveMode);
+},
+ 4 => {
+ this.origin = try reader.readValue([]const u8);
+},
+ 5 => {
+ this.absolute_working_dir = try reader.readValue([]const u8);
+},
+ 6 => {
+ this.define = try reader.readValue(StringMap);
+},
+ 7 => {
+ this.preserve_symlinks = try reader.readValue(bool);
+},
+ 8 => {
+ this.entry_points = try reader.readArray([]const u8);
+},
+ 9 => {
+ this.write = try reader.readValue(bool);
+},
+ 10 => {
+ this.inject = try reader.readArray([]const u8);
+},
+ 11 => {
+ this.output_dir = try reader.readValue([]const u8);
+},
+ 12 => {
+ this.external = try reader.readArray([]const u8);
+},
+ 13 => {
+ this.loaders = try reader.readValue(LoaderMap);
+},
+ 14 => {
+ this.main_fields = try reader.readArray([]const u8);
+},
+ 15 => {
+ this.platform = try reader.readValue(Platform);
+},
+ 16 => {
+ this.serve = try reader.readValue(bool);
+},
+ 17 => {
+ this.extension_order = try reader.readArray([]const u8);
+},
+ 18 => {
+ this.generate_node_module_bundle = try reader.readValue(bool);
+},
+ 19 => {
+ this.node_modules_bundle_path = try reader.readValue([]const u8);
+},
+ 20 => {
+ this.node_modules_bundle_path_server = try reader.readValue([]const u8);
+},
+ 21 => {
+ this.framework = try reader.readValue(FrameworkConfig);
+},
+ 22 => {
+ this.router = try reader.readValue(RouteConfig);
+},
+ 23 => {
+ this.no_summary = try reader.readValue(bool);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.dir);
- try writer.writeArray([]const u8, this.extensions);
- try writer.writeValue(this.static_dir);
- try writer.writeValue(this.asset_prefix);
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.jsx) |jsx| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(jsx);
+}
+if (this.tsconfig_override) |tsconfig_override| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(tsconfig_override);
+}
+if (this.resolve) |resolve| {
+ try writer.writeFieldID(3);
+ try writer.writeEnum(resolve);
+}
+if (this.origin) |origin| {
+ try writer.writeFieldID(4);
+ try writer.writeValue(origin);
+}
+if (this.absolute_working_dir) |absolute_working_dir| {
+ try writer.writeFieldID(5);
+ try writer.writeValue(absolute_working_dir);
+}
+if (this.define) |define| {
+ try writer.writeFieldID(6);
+ try writer.writeValue(define);
+}
+if (this.preserve_symlinks) |preserve_symlinks| {
+ try writer.writeFieldID(7);
+ try writer.writeInt(@intCast(u8, @boolToInt(preserve_symlinks)));
+}
+if (this.entry_points) |entry_points| {
+ try writer.writeFieldID(8);
+ try writer.writeArray([]const u8, entry_points);
+}
+if (this.write) |write| {
+ try writer.writeFieldID(9);
+ try writer.writeInt(@intCast(u8, @boolToInt(write)));
+}
+if (this.inject) |inject| {
+ try writer.writeFieldID(10);
+ try writer.writeArray([]const u8, inject);
+}
+if (this.output_dir) |output_dir| {
+ try writer.writeFieldID(11);
+ try writer.writeValue(output_dir);
+}
+if (this.external) |external| {
+ try writer.writeFieldID(12);
+ try writer.writeArray([]const u8, external);
+}
+if (this.loaders) |loaders| {
+ try writer.writeFieldID(13);
+ try writer.writeValue(loaders);
+}
+if (this.main_fields) |main_fields| {
+ try writer.writeFieldID(14);
+ try writer.writeArray([]const u8, main_fields);
+}
+if (this.platform) |platform| {
+ try writer.writeFieldID(15);
+ try writer.writeEnum(platform);
+}
+if (this.serve) |serve| {
+ try writer.writeFieldID(16);
+ try writer.writeInt(@intCast(u8, @boolToInt(serve)));
+}
+if (this.extension_order) |extension_order| {
+ try writer.writeFieldID(17);
+ try writer.writeArray([]const u8, extension_order);
+}
+if (this.generate_node_module_bundle) |generate_node_module_bundle| {
+ try writer.writeFieldID(18);
+ try writer.writeInt(@intCast(u8, @boolToInt(generate_node_module_bundle)));
+}
+if (this.node_modules_bundle_path) |node_modules_bundle_path| {
+ try writer.writeFieldID(19);
+ try writer.writeValue(node_modules_bundle_path);
+}
+if (this.node_modules_bundle_path_server) |node_modules_bundle_path_server| {
+ try writer.writeFieldID(20);
+ try writer.writeValue(node_modules_bundle_path_server);
+}
+if (this.framework) |framework| {
+ try writer.writeFieldID(21);
+ try writer.writeValue(framework);
+}
+if (this.router) |router| {
+ try writer.writeFieldID(22);
+ try writer.writeValue(router);
+}
+if (this.no_summary) |no_summary| {
+ try writer.writeFieldID(23);
+ try writer.writeInt(@intCast(u8, @boolToInt(no_summary)));
+}
+try writer.endMessage();
+}
- pub const RouteConfig = struct {
- /// dir
- dir: []const []const u8,
+};
- /// extensions
- extensions: []const []const u8,
+pub const FileHandle = struct {
+/// path
+path: []const u8,
- /// static_dir
- static_dir: ?[]const u8 = null,
+/// size
+size: u32 = 0,
- /// asset_prefix
- asset_prefix: ?[]const u8 = null,
+/// fd
+fd: u32 = 0,
- pub fn decode(reader: anytype) anyerror!RouteConfig {
- var this = std.mem.zeroes(RouteConfig);
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+pub fn decode(reader: anytype) anyerror!FileHandle {
+ var this = std.mem.zeroes(FileHandle);
- 1 => {
- this.dir = try reader.readArray([]const u8);
- },
- 2 => {
- this.extensions = try reader.readArray([]const u8);
- },
- 3 => {
- this.static_dir = try reader.readValue([]const u8);
- },
- 4 => {
- this.asset_prefix = try reader.readValue([]const u8);
- },
- else => {
- return error.InvalidMessage;
- },
- }
- }
- unreachable;
- }
+ this.path = try reader.readValue([]const u8);
+ this.size = try reader.readValue(u32);
+ this.fd = try reader.readValue(u32);
+ return this;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.dir) |dir| {
- try writer.writeFieldID(1);
- try writer.writeArray([]const u8, dir);
- }
- if (this.extensions) |extensions| {
- try writer.writeFieldID(2);
- try writer.writeArray([]const u8, extensions);
- }
- if (this.static_dir) |static_dir| {
- try writer.writeFieldID(3);
- try writer.writeValue(static_dir);
- }
- if (this.asset_prefix) |asset_prefix| {
- try writer.writeFieldID(4);
- try writer.writeValue(asset_prefix);
- }
- try writer.endMessage();
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.path);
+ try writer.writeInt(this.size);
+ try writer.writeInt(this.fd);
+}
+
+};
+
+pub const Transform = struct {
+/// handle
+handle: ?FileHandle = null,
+
+/// path
+path: ?[]const u8 = null,
+
+/// contents
+contents: []const u8,
+
+/// loader
+loader: ?Loader = null,
+
+/// options
+options: ?TransformOptions = null,
+
+
+pub fn decode(reader: anytype) anyerror!Transform {
+ var this = std.mem.zeroes(Transform);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.handle = try reader.readValue(FileHandle);
+},
+ 2 => {
+ this.path = try reader.readValue([]const u8);
+},
+ 3 => {
+ this.contents = try reader.readArray(u8);
+},
+ 4 => {
+ this.loader = try reader.readValue(Loader);
+},
+ 5 => {
+ this.options = try reader.readValue(TransformOptions);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
+
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.handle) |handle| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(handle);
+}
+if (this.path) |path| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(path);
+}
+if (this.contents) |contents| {
+ try writer.writeFieldID(3);
+ try writer.writeArray(u8, contents);
+}
+if (this.loader) |loader| {
+ try writer.writeFieldID(4);
+ try writer.writeEnum(loader);
+}
+if (this.options) |options| {
+ try writer.writeFieldID(5);
+ try writer.writeValue(options);
+}
+try writer.endMessage();
+}
- pub const TransformOptions = struct {
- /// jsx
- jsx: ?Jsx = null,
+};
- /// tsconfig_override
- tsconfig_override: ?[]const u8 = null,
+pub const TransformResponseStatus = enum(u32) {
- /// resolve
- resolve: ?ResolveMode = null,
+_none,
+ /// success
+ success,
- /// origin
- origin: ?[]const u8 = null,
+ /// fail
+ fail,
- /// absolute_working_dir
- absolute_working_dir: ?[]const u8 = null,
+_,
- /// define
- define: ?StringMap = null,
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- /// preserve_symlinks
- preserve_symlinks: ?bool = null,
+
+};
- /// entry_points
- entry_points: []const []const u8,
+pub const OutputFile = struct {
+/// data
+data: []const u8,
- /// write
- write: ?bool = null,
+/// path
+path: []const u8,
- /// inject
- inject: []const []const u8,
- /// output_dir
- output_dir: ?[]const u8 = null,
+pub fn decode(reader: anytype) anyerror!OutputFile {
+ var this = std.mem.zeroes(OutputFile);
- /// external
- external: []const []const u8,
+ this.data = try reader.readArray(u8);
+ this.path = try reader.readValue([]const u8);
+ return this;
+}
- /// loaders
- loaders: ?LoaderMap = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(u8, this.data);
+ try writer.writeValue(this.path);
+}
- /// main_fields
- main_fields: []const []const u8,
+};
- /// platform
- platform: ?Platform = null,
+pub const TransformResponse = struct {
+/// status
+status: TransformResponseStatus,
- /// serve
- serve: ?bool = null,
+/// files
+files: []const OutputFile,
- /// extension_order
- extension_order: []const []const u8,
+/// errors
+errors: []const Message,
- /// generate_node_module_bundle
- generate_node_module_bundle: ?bool = null,
- /// node_modules_bundle_path
- node_modules_bundle_path: ?[]const u8 = null,
+pub fn decode(reader: anytype) anyerror!TransformResponse {
+ var this = std.mem.zeroes(TransformResponse);
- /// node_modules_bundle_path_server
- node_modules_bundle_path_server: ?[]const u8 = null,
+ this.status = try reader.readValue(TransformResponseStatus);
+ this.files = try reader.readArray(OutputFile);
+ this.errors = try reader.readArray(Message);
+ return this;
+}
- /// framework
- framework: ?FrameworkConfig = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.status);
+ try writer.writeArray(OutputFile, this.files);
+ try writer.writeArray(Message, this.errors);
+}
- /// router
- router: ?RouteConfig = null,
+};
- /// no_summary
- no_summary: ?bool = null,
+pub const MessageLevel = enum(u32) {
- pub fn decode(reader: anytype) anyerror!TransformOptions {
- var this = std.mem.zeroes(TransformOptions);
+_none,
+ /// err
+ err,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+ /// warn
+ warn,
- 1 => {
- this.jsx = try reader.readValue(Jsx);
- },
- 2 => {
- this.tsconfig_override = try reader.readValue([]const u8);
- },
- 3 => {
- this.resolve = try reader.readValue(ResolveMode);
- },
- 4 => {
- this.origin = try reader.readValue([]const u8);
- },
- 5 => {
- this.absolute_working_dir = try reader.readValue([]const u8);
- },
- 6 => {
- this.define = try reader.readValue(StringMap);
- },
- 7 => {
- this.preserve_symlinks = try reader.readValue(bool);
- },
- 8 => {
- this.entry_points = try reader.readArray([]const u8);
- },
- 9 => {
- this.write = try reader.readValue(bool);
- },
- 10 => {
- this.inject = try reader.readArray([]const u8);
- },
- 11 => {
- this.output_dir = try reader.readValue([]const u8);
- },
- 12 => {
- this.external = try reader.readArray([]const u8);
- },
- 13 => {
- this.loaders = try reader.readValue(LoaderMap);
- },
- 14 => {
- this.main_fields = try reader.readArray([]const u8);
- },
- 15 => {
- this.platform = try reader.readValue(Platform);
- },
- 16 => {
- this.serve = try reader.readValue(bool);
- },
- 17 => {
- this.extension_order = try reader.readArray([]const u8);
- },
- 18 => {
- this.generate_node_module_bundle = try reader.readValue(bool);
- },
- 19 => {
- this.node_modules_bundle_path = try reader.readValue([]const u8);
- },
- 20 => {
- this.node_modules_bundle_path_server = try reader.readValue([]const u8);
- },
- 21 => {
- this.framework = try reader.readValue(FrameworkConfig);
- },
- 22 => {
- this.router = try reader.readValue(RouteConfig);
- },
- 23 => {
- this.no_summary = try reader.readValue(bool);
- },
- else => {
- return error.InvalidMessage;
- },
+ /// note
+ note,
+
+ /// debug
+ debug,
+
+_,
+
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.jsx) |jsx| {
- try writer.writeFieldID(1);
- try writer.writeValue(jsx);
- }
- if (this.tsconfig_override) |tsconfig_override| {
- try writer.writeFieldID(2);
- try writer.writeValue(tsconfig_override);
- }
- if (this.resolve) |resolve| {
- try writer.writeFieldID(3);
- try writer.writeEnum(resolve);
- }
- if (this.origin) |origin| {
- try writer.writeFieldID(4);
- try writer.writeValue(origin);
- }
- if (this.absolute_working_dir) |absolute_working_dir| {
- try writer.writeFieldID(5);
- try writer.writeValue(absolute_working_dir);
- }
- if (this.define) |define| {
- try writer.writeFieldID(6);
- try writer.writeValue(define);
- }
- if (this.preserve_symlinks) |preserve_symlinks| {
- try writer.writeFieldID(7);
- try writer.writeInt(@intCast(u8, @boolToInt(preserve_symlinks)));
- }
- if (this.entry_points) |entry_points| {
- try writer.writeFieldID(8);
- try writer.writeArray([]const u8, entry_points);
- }
- if (this.write) |write| {
- try writer.writeFieldID(9);
- try writer.writeInt(@intCast(u8, @boolToInt(write)));
- }
- if (this.inject) |inject| {
- try writer.writeFieldID(10);
- try writer.writeArray([]const u8, inject);
- }
- if (this.output_dir) |output_dir| {
- try writer.writeFieldID(11);
- try writer.writeValue(output_dir);
- }
- if (this.external) |external| {
- try writer.writeFieldID(12);
- try writer.writeArray([]const u8, external);
- }
- if (this.loaders) |loaders| {
- try writer.writeFieldID(13);
- try writer.writeValue(loaders);
- }
- if (this.main_fields) |main_fields| {
- try writer.writeFieldID(14);
- try writer.writeArray([]const u8, main_fields);
- }
- if (this.platform) |platform| {
- try writer.writeFieldID(15);
- try writer.writeEnum(platform);
- }
- if (this.serve) |serve| {
- try writer.writeFieldID(16);
- try writer.writeInt(@intCast(u8, @boolToInt(serve)));
- }
- if (this.extension_order) |extension_order| {
- try writer.writeFieldID(17);
- try writer.writeArray([]const u8, extension_order);
- }
- if (this.generate_node_module_bundle) |generate_node_module_bundle| {
- try writer.writeFieldID(18);
- try writer.writeInt(@intCast(u8, @boolToInt(generate_node_module_bundle)));
- }
- if (this.node_modules_bundle_path) |node_modules_bundle_path| {
- try writer.writeFieldID(19);
- try writer.writeValue(node_modules_bundle_path);
- }
- if (this.node_modules_bundle_path_server) |node_modules_bundle_path_server| {
- try writer.writeFieldID(20);
- try writer.writeValue(node_modules_bundle_path_server);
- }
- if (this.framework) |framework| {
- try writer.writeFieldID(21);
- try writer.writeValue(framework);
- }
- if (this.router) |router| {
- try writer.writeFieldID(22);
- try writer.writeValue(router);
- }
- if (this.no_summary) |no_summary| {
- try writer.writeFieldID(23);
- try writer.writeInt(@intCast(u8, @boolToInt(no_summary)));
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const FileHandle = struct {
- /// path
- path: []const u8,
+pub const Location = struct {
+/// file
+file: []const u8,
- /// size
- size: u32 = 0,
+/// namespace
+namespace: []const u8,
- /// fd
- fd: u32 = 0,
+/// line
+line: i32 = 0,
- pub fn decode(reader: anytype) anyerror!FileHandle {
- var this = std.mem.zeroes(FileHandle);
+/// column
+column: i32 = 0,
- this.path = try reader.readValue([]const u8);
- this.size = try reader.readValue(u32);
- this.fd = try reader.readValue(u32);
- return this;
- }
+/// line_text
+line_text: []const u8,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.path);
- try writer.writeInt(this.size);
- try writer.writeInt(this.fd);
- }
- };
+/// suggestion
+suggestion: []const u8,
- pub const Transform = struct {
- /// handle
- handle: ?FileHandle = null,
+/// offset
+offset: u32 = 0,
- /// path
- path: ?[]const u8 = null,
- /// contents
- contents: []const u8,
+pub fn decode(reader: anytype) anyerror!Location {
+ var this = std.mem.zeroes(Location);
- /// loader
- loader: ?Loader = null,
+ this.file = try reader.readValue([]const u8);
+ this.namespace = try reader.readValue([]const u8);
+ this.line = try reader.readValue(i32);
+ this.column = try reader.readValue(i32);
+ this.line_text = try reader.readValue([]const u8);
+ this.suggestion = try reader.readValue([]const u8);
+ this.offset = try reader.readValue(u32);
+ return this;
+}
- /// options
- options: ?TransformOptions = null,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeValue(this.file);
+ try writer.writeValue(this.namespace);
+ try writer.writeInt(this.line);
+ try writer.writeInt(this.column);
+ try writer.writeValue(this.line_text);
+ try writer.writeValue(this.suggestion);
+ try writer.writeInt(this.offset);
+}
- pub fn decode(reader: anytype) anyerror!Transform {
- var this = std.mem.zeroes(Transform);
+};
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+pub const MessageData = struct {
+/// text
+text: ?[]const u8 = null,
+
+/// location
+location: ?Location = null,
+
+
+pub fn decode(reader: anytype) anyerror!MessageData {
+ var this = std.mem.zeroes(MessageData);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.text = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.location = try reader.readValue(Location);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- 1 => {
- this.handle = try reader.readValue(FileHandle);
- },
- 2 => {
- this.path = try reader.readValue([]const u8);
- },
- 3 => {
- this.contents = try reader.readArray(u8);
- },
- 4 => {
- this.loader = try reader.readValue(Loader);
- },
- 5 => {
- this.options = try reader.readValue(TransformOptions);
- },
- else => {
- return error.InvalidMessage;
- },
- }
- }
- unreachable;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.text) |text| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(text);
+}
+if (this.location) |location| {
+ try writer.writeFieldID(2);
+ try writer.writeValue(location);
+}
+try writer.endMessage();
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.handle) |handle| {
- try writer.writeFieldID(1);
- try writer.writeValue(handle);
- }
- if (this.path) |path| {
- try writer.writeFieldID(2);
- try writer.writeValue(path);
- }
- if (this.contents) |contents| {
- try writer.writeFieldID(3);
- try writer.writeArray(u8, contents);
- }
- if (this.loader) |loader| {
- try writer.writeFieldID(4);
- try writer.writeEnum(loader);
- }
- if (this.options) |options| {
- try writer.writeFieldID(5);
- try writer.writeValue(options);
- }
- try writer.endMessage();
- }
- };
+};
- pub const TransformResponseStatus = enum(u32) {
- _none,
- /// success
- success,
+pub const MessageMeta = struct {
+/// resolve
+resolve: ?[]const u8 = null,
+
+/// build
+build: ?bool = null,
+
+
+pub fn decode(reader: anytype) anyerror!MessageMeta {
+ var this = std.mem.zeroes(MessageMeta);
+
+ while(true) {
+ switch (try reader.readByte()) {
+ 0 => { return this; },
+
+ 1 => {
+ this.resolve = try reader.readValue([]const u8);
+},
+ 2 => {
+ this.build = try reader.readValue(bool);
+},
+ else => {
+ return error.InvalidMessage;
+ },
+ }
+ }
+unreachable;
+}
- /// fail
- fail,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+if (this.resolve) |resolve| {
+ try writer.writeFieldID(1);
+ try writer.writeValue(resolve);
+}
+if (this.build) |build| {
+ try writer.writeFieldID(2);
+ try writer.writeInt(@intCast(u8, @boolToInt(build)));
+}
+try writer.endMessage();
+}
- _,
+};
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+pub const Message = struct {
+/// level
+level: MessageLevel,
- pub const OutputFile = struct {
- /// data
- data: []const u8,
+/// data
+data: MessageData,
- /// path
- path: []const u8,
+/// notes
+notes: []const MessageData,
- pub fn decode(reader: anytype) anyerror!OutputFile {
- var this = std.mem.zeroes(OutputFile);
+/// on
+on: MessageMeta,
- this.data = try reader.readArray(u8);
- this.path = try reader.readValue([]const u8);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(u8, this.data);
- try writer.writeValue(this.path);
- }
- };
+pub fn decode(reader: anytype) anyerror!Message {
+ var this = std.mem.zeroes(Message);
- pub const TransformResponse = struct {
- /// status
- status: TransformResponseStatus,
+ this.level = try reader.readValue(MessageLevel);
+ this.data = try reader.readValue(MessageData);
+ this.notes = try reader.readArray(MessageData);
+ this.on = try reader.readValue(MessageMeta);
+ return this;
+}
- /// files
- files: []const OutputFile,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.level);
+ try writer.writeValue(this.data);
+ try writer.writeArray(MessageData, this.notes);
+ try writer.writeValue(this.on);
+}
- /// errors
- errors: []const Message,
+};
- pub fn decode(reader: anytype) anyerror!TransformResponse {
- var this = std.mem.zeroes(TransformResponse);
+pub const Log = struct {
+/// warnings
+warnings: u32 = 0,
- this.status = try reader.readValue(TransformResponseStatus);
- this.files = try reader.readArray(OutputFile);
- this.errors = try reader.readArray(Message);
- return this;
- }
+/// errors
+errors: u32 = 0,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.status);
- try writer.writeArray(OutputFile, this.files);
- try writer.writeArray(Message, this.errors);
- }
- };
+/// msgs
+msgs: []const Message,
- pub const MessageLevel = enum(u32) {
- _none,
- /// err
- err,
- /// warn
- warn,
+pub fn decode(reader: anytype) anyerror!Log {
+ var this = std.mem.zeroes(Log);
- /// note
- note,
+ this.warnings = try reader.readValue(u32);
+ this.errors = try reader.readValue(u32);
+ this.msgs = try reader.readArray(Message);
+ return this;
+}
- /// debug
- debug,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.warnings);
+ try writer.writeInt(this.errors);
+ try writer.writeArray(Message, this.msgs);
+}
- _,
+};
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+pub const Reloader = enum(u8) {
- pub const Location = struct {
- /// file
- file: []const u8,
+_none,
+ /// disable
+ disable,
- /// namespace
- namespace: []const u8,
+ /// live
+ live,
- /// line
- line: i32 = 0,
+ /// fast_refresh
+ fast_refresh,
- /// column
- column: i32 = 0,
+_,
- /// line_text
- line_text: []const u8,
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
+ }
- /// suggestion
- suggestion: []const u8,
+
+};
- /// offset
- offset: u32 = 0,
+pub const WebsocketMessageKind = enum(u8) {
- pub fn decode(reader: anytype) anyerror!Location {
- var this = std.mem.zeroes(Location);
+_none,
+ /// welcome
+ welcome,
- this.file = try reader.readValue([]const u8);
- this.namespace = try reader.readValue([]const u8);
- this.line = try reader.readValue(i32);
- this.column = try reader.readValue(i32);
- this.line_text = try reader.readValue([]const u8);
- this.suggestion = try reader.readValue([]const u8);
- this.offset = try reader.readValue(u32);
- return this;
- }
+ /// file_change_notification
+ file_change_notification,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeValue(this.file);
- try writer.writeValue(this.namespace);
- try writer.writeInt(this.line);
- try writer.writeInt(this.column);
- try writer.writeValue(this.line_text);
- try writer.writeValue(this.suggestion);
- try writer.writeInt(this.offset);
- }
- };
+ /// build_success
+ build_success,
- pub const MessageData = struct {
- /// text
- text: ?[]const u8 = null,
+ /// build_fail
+ build_fail,
- /// location
- location: ?Location = null,
+ /// manifest_success
+ manifest_success,
- pub fn decode(reader: anytype) anyerror!MessageData {
- var this = std.mem.zeroes(MessageData);
+ /// manifest_fail
+ manifest_fail,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+_,
- 1 => {
- this.text = try reader.readValue([]const u8);
- },
- 2 => {
- this.location = try reader.readValue(Location);
- },
- else => {
- return error.InvalidMessage;
- },
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.text) |text| {
- try writer.writeFieldID(1);
- try writer.writeValue(text);
- }
- if (this.location) |location| {
- try writer.writeFieldID(2);
- try writer.writeValue(location);
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const MessageMeta = struct {
- /// resolve
- resolve: ?[]const u8 = null,
+pub const WebsocketCommandKind = enum(u8) {
- /// build
- build: ?bool = null,
+_none,
+ /// build
+ build,
- pub fn decode(reader: anytype) anyerror!MessageMeta {
- var this = std.mem.zeroes(MessageMeta);
+ /// manifest
+ manifest,
- while (true) {
- switch (try reader.readByte()) {
- 0 => {
- return this;
- },
+_,
- 1 => {
- this.resolve = try reader.readValue([]const u8);
- },
- 2 => {
- this.build = try reader.readValue(bool);
- },
- else => {
- return error.InvalidMessage;
- },
+ pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
+ return try std.json.stringify(@tagName(self), opts, o);
}
- }
- unreachable;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- if (this.resolve) |resolve| {
- try writer.writeFieldID(1);
- try writer.writeValue(resolve);
- }
- if (this.build) |build| {
- try writer.writeFieldID(2);
- try writer.writeInt(@intCast(u8, @boolToInt(build)));
- }
- try writer.endMessage();
- }
- };
+
+};
- pub const Message = struct {
- /// level
- level: MessageLevel,
+pub const WebsocketMessage = struct {
+/// timestamp
+timestamp: u32 = 0,
- /// data
- data: MessageData,
+/// kind
+kind: WebsocketMessageKind,
- /// notes
- notes: []const MessageData,
- /// on
- on: MessageMeta,
+pub fn decode(reader: anytype) anyerror!WebsocketMessage {
+ var this = std.mem.zeroes(WebsocketMessage);
- pub fn decode(reader: anytype) anyerror!Message {
- var this = std.mem.zeroes(Message);
+ this.timestamp = try reader.readValue(u32);
+ this.kind = try reader.readValue(WebsocketMessageKind);
+ return this;
+}
- this.level = try reader.readValue(MessageLevel);
- this.data = try reader.readValue(MessageData);
- this.notes = try reader.readArray(MessageData);
- this.on = try reader.readValue(MessageMeta);
- return this;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.timestamp);
+ try writer.writeEnum(this.kind);
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.level);
- try writer.writeValue(this.data);
- try writer.writeArray(MessageData, this.notes);
- try writer.writeValue(this.on);
- }
- };
+};
- pub const Log = struct {
- /// warnings
- warnings: u32 = 0,
+pub const WebsocketMessageWelcome = struct {
+/// epoch
+epoch: u32 = 0,
- /// errors
- errors: u32 = 0,
+/// javascriptReloader
+javascript_reloader: Reloader,
- /// msgs
- msgs: []const Message,
- pub fn decode(reader: anytype) anyerror!Log {
- var this = std.mem.zeroes(Log);
+pub fn decode(reader: anytype) anyerror!WebsocketMessageWelcome {
+ var this = std.mem.zeroes(WebsocketMessageWelcome);
- this.warnings = try reader.readValue(u32);
- this.errors = try reader.readValue(u32);
- this.msgs = try reader.readArray(Message);
- return this;
- }
+ this.epoch = try reader.readValue(u32);
+ this.javascript_reloader = try reader.readValue(Reloader);
+ return this;
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.warnings);
- try writer.writeInt(this.errors);
- try writer.writeArray(Message, this.msgs);
- }
- };
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.epoch);
+ try writer.writeEnum(this.javascript_reloader);
+}
- pub const Reloader = enum(u8) {
- _none,
- /// disable
- disable,
+};
- /// live
- live,
+pub const WebsocketMessageFileChangeNotification = struct {
+/// id
+id: u32 = 0,
- /// fast_refresh
- fast_refresh,
+/// loader
+loader: Loader,
- _,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+pub fn decode(reader: anytype) anyerror!WebsocketMessageFileChangeNotification {
+ var this = std.mem.zeroes(WebsocketMessageFileChangeNotification);
- pub const WebsocketMessageKind = enum(u8) {
- _none,
- /// welcome
- welcome,
+ this.id = try reader.readValue(u32);
+ this.loader = try reader.readValue(Loader);
+ return this;
+}
- /// file_change_notification
- file_change_notification,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+ try writer.writeEnum(this.loader);
+}
- /// build_success
- build_success,
+};
- /// build_fail
- build_fail,
+pub const WebsocketCommand = struct {
+/// kind
+kind: WebsocketCommandKind,
- /// manifest_success
- manifest_success,
+/// timestamp
+timestamp: u32 = 0,
- /// manifest_fail
- manifest_fail,
- _,
+pub fn decode(reader: anytype) anyerror!WebsocketCommand {
+ var this = std.mem.zeroes(WebsocketCommand);
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
+ this.kind = try reader.readValue(WebsocketCommandKind);
+ this.timestamp = try reader.readValue(u32);
+ return this;
+}
- pub const WebsocketCommandKind = enum(u8) {
- _none,
- /// build
- build,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeEnum(this.kind);
+ try writer.writeInt(this.timestamp);
+}
- /// manifest
- manifest,
+};
- _,
+pub const WebsocketCommandBuild = packed struct {
+/// id
+id: u32 = 0,
- pub fn jsonStringify(self: *const @This(), opts: anytype, o: anytype) !void {
- return try std.json.stringify(@tagName(self), opts, o);
- }
- };
- pub const WebsocketMessage = struct {
- /// timestamp
- timestamp: u32 = 0,
+pub fn decode(reader: anytype) anyerror!WebsocketCommandBuild {
+ var this = std.mem.zeroes(WebsocketCommandBuild);
- /// kind
- kind: WebsocketMessageKind,
+ this.id = try reader.readValue(u32);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!WebsocketMessage {
- var this = std.mem.zeroes(WebsocketMessage);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+}
- this.timestamp = try reader.readValue(u32);
- this.kind = try reader.readValue(WebsocketMessageKind);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.timestamp);
- try writer.writeEnum(this.kind);
- }
- };
+pub const WebsocketCommandManifest = packed struct {
+/// id
+id: u32 = 0,
- pub const WebsocketMessageWelcome = struct {
- /// epoch
- epoch: u32 = 0,
- /// javascriptReloader
- javascript_reloader: Reloader,
+pub fn decode(reader: anytype) anyerror!WebsocketCommandManifest {
+ var this = std.mem.zeroes(WebsocketCommandManifest);
- pub fn decode(reader: anytype) anyerror!WebsocketMessageWelcome {
- var this = std.mem.zeroes(WebsocketMessageWelcome);
+ this.id = try reader.readValue(u32);
+ return this;
+}
- this.epoch = try reader.readValue(u32);
- this.javascript_reloader = try reader.readValue(Reloader);
- return this;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.epoch);
- try writer.writeEnum(this.javascript_reloader);
- }
- };
+};
- pub const WebsocketMessageFileChangeNotification = struct {
- /// id
- id: u32 = 0,
+pub const WebsocketMessageBuildSuccess = struct {
+/// id
+id: u32 = 0,
- /// loader
- loader: Loader,
+/// from_timestamp
+from_timestamp: u32 = 0,
- pub fn decode(reader: anytype) anyerror!WebsocketMessageFileChangeNotification {
- var this = std.mem.zeroes(WebsocketMessageFileChangeNotification);
+/// loader
+loader: Loader,
- this.id = try reader.readValue(u32);
- this.loader = try reader.readValue(Loader);
- return this;
- }
+/// module_path
+module_path: []const u8,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- try writer.writeEnum(this.loader);
- }
- };
+/// blob_length
+blob_length: u32 = 0,
- pub const WebsocketCommand = struct {
- /// kind
- kind: WebsocketCommandKind,
- /// timestamp
- timestamp: u32 = 0,
+pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildSuccess {
+ var this = std.mem.zeroes(WebsocketMessageBuildSuccess);
- pub fn decode(reader: anytype) anyerror!WebsocketCommand {
- var this = std.mem.zeroes(WebsocketCommand);
+ this.id = try reader.readValue(u32);
+ this.from_timestamp = try reader.readValue(u32);
+ this.loader = try reader.readValue(Loader);
+ this.module_path = try reader.readValue([]const u8);
+ this.blob_length = try reader.readValue(u32);
+ return this;
+}
- this.kind = try reader.readValue(WebsocketCommandKind);
- this.timestamp = try reader.readValue(u32);
- return this;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+ try writer.writeInt(this.from_timestamp);
+ try writer.writeEnum(this.loader);
+ try writer.writeValue(this.module_path);
+ try writer.writeInt(this.blob_length);
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeEnum(this.kind);
- try writer.writeInt(this.timestamp);
- }
- };
+};
- pub const WebsocketCommandBuild = packed struct {
- /// id
- id: u32 = 0,
+pub const WebsocketMessageBuildFailure = struct {
+/// id
+id: u32 = 0,
- pub fn decode(reader: anytype) anyerror!WebsocketCommandBuild {
- var this = std.mem.zeroes(WebsocketCommandBuild);
+/// from_timestamp
+from_timestamp: u32 = 0,
- this.id = try reader.readValue(u32);
- return this;
- }
+/// loader
+loader: Loader,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- }
- };
+/// module_path
+module_path: []const u8,
- pub const WebsocketCommandManifest = packed struct {
- /// id
- id: u32 = 0,
+/// log
+log: Log,
- pub fn decode(reader: anytype) anyerror!WebsocketCommandManifest {
- var this = std.mem.zeroes(WebsocketCommandManifest);
- this.id = try reader.readValue(u32);
- return this;
- }
+pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildFailure {
+ var this = std.mem.zeroes(WebsocketMessageBuildFailure);
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- }
- };
+ this.id = try reader.readValue(u32);
+ this.from_timestamp = try reader.readValue(u32);
+ this.loader = try reader.readValue(Loader);
+ this.module_path = try reader.readValue([]const u8);
+ this.log = try reader.readValue(Log);
+ return this;
+}
- pub const WebsocketMessageBuildSuccess = struct {
- /// id
- id: u32 = 0,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+ try writer.writeInt(this.from_timestamp);
+ try writer.writeEnum(this.loader);
+ try writer.writeValue(this.module_path);
+ try writer.writeValue(this.log);
+}
- /// from_timestamp
- from_timestamp: u32 = 0,
+};
- /// loader
- loader: Loader,
+pub const DependencyManifest = struct {
+/// ids
+ids: []const u32,
- /// module_path
- module_path: []const u8,
- /// blob_length
- blob_length: u32 = 0,
+pub fn decode(reader: anytype) anyerror!DependencyManifest {
+ var this = std.mem.zeroes(DependencyManifest);
- pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildSuccess {
- var this = std.mem.zeroes(WebsocketMessageBuildSuccess);
+ this.ids = try reader.readArray(u32);
+ return this;
+}
- this.id = try reader.readValue(u32);
- this.from_timestamp = try reader.readValue(u32);
- this.loader = try reader.readValue(Loader);
- this.module_path = try reader.readValue([]const u8);
- this.blob_length = try reader.readValue(u32);
- return this;
- }
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(u32, this.ids);
+}
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- try writer.writeInt(this.from_timestamp);
- try writer.writeEnum(this.loader);
- try writer.writeValue(this.module_path);
- try writer.writeInt(this.blob_length);
- }
- };
+};
- pub const WebsocketMessageBuildFailure = struct {
- /// id
- id: u32 = 0,
+pub const FileList = struct {
+/// ptrs
+ptrs: []const StringPointer,
- /// from_timestamp
- from_timestamp: u32 = 0,
+/// files
+files: []const u8,
- /// loader
- loader: Loader,
- /// module_path
- module_path: []const u8,
+pub fn decode(reader: anytype) anyerror!FileList {
+ var this = std.mem.zeroes(FileList);
- /// log
- log: Log,
+ this.ptrs = try reader.readArray(StringPointer);
+ this.files = try reader.readValue([]const u8);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!WebsocketMessageBuildFailure {
- var this = std.mem.zeroes(WebsocketMessageBuildFailure);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(StringPointer, this.ptrs);
+ try writer.writeValue(this.files);
+}
- this.id = try reader.readValue(u32);
- this.from_timestamp = try reader.readValue(u32);
- this.loader = try reader.readValue(Loader);
- this.module_path = try reader.readValue([]const u8);
- this.log = try reader.readValue(Log);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- try writer.writeInt(this.from_timestamp);
- try writer.writeEnum(this.loader);
- try writer.writeValue(this.module_path);
- try writer.writeValue(this.log);
- }
- };
+pub const WebsocketMessageResolveIDs = struct {
+/// id
+id: []const u32,
- pub const DependencyManifest = struct {
- /// ids
- ids: []const u32,
+/// list
+list: FileList,
- pub fn decode(reader: anytype) anyerror!DependencyManifest {
- var this = std.mem.zeroes(DependencyManifest);
- this.ids = try reader.readArray(u32);
- return this;
- }
+pub fn decode(reader: anytype) anyerror!WebsocketMessageResolveIDs {
+ var this = std.mem.zeroes(WebsocketMessageResolveIDs);
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(u32, this.ids);
- }
- };
+ this.id = try reader.readArray(u32);
+ this.list = try reader.readValue(FileList);
+ return this;
+}
- pub const FileList = struct {
- /// ptrs
- ptrs: []const StringPointer,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(u32, this.id);
+ try writer.writeValue(this.list);
+}
- /// files
- files: []const u8,
+};
- pub fn decode(reader: anytype) anyerror!FileList {
- var this = std.mem.zeroes(FileList);
+pub const WebsocketCommandResolveIDs = struct {
+/// ptrs
+ptrs: []const StringPointer,
- this.ptrs = try reader.readArray(StringPointer);
- this.files = try reader.readValue([]const u8);
- return this;
- }
+/// files
+files: []const u8,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(StringPointer, this.ptrs);
- try writer.writeValue(this.files);
- }
- };
- pub const WebsocketMessageResolveIDs = struct {
- /// id
- id: []const u32,
+pub fn decode(reader: anytype) anyerror!WebsocketCommandResolveIDs {
+ var this = std.mem.zeroes(WebsocketCommandResolveIDs);
- /// list
- list: FileList,
+ this.ptrs = try reader.readArray(StringPointer);
+ this.files = try reader.readValue([]const u8);
+ return this;
+}
- pub fn decode(reader: anytype) anyerror!WebsocketMessageResolveIDs {
- var this = std.mem.zeroes(WebsocketMessageResolveIDs);
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeArray(StringPointer, this.ptrs);
+ try writer.writeValue(this.files);
+}
- this.id = try reader.readArray(u32);
- this.list = try reader.readValue(FileList);
- return this;
- }
+};
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(u32, this.id);
- try writer.writeValue(this.list);
- }
- };
+pub const WebsocketMessageManifestSuccess = struct {
+/// id
+id: u32 = 0,
- pub const WebsocketCommandResolveIDs = struct {
- /// ptrs
- ptrs: []const StringPointer,
+/// module_path
+module_path: []const u8,
- /// files
- files: []const u8,
+/// loader
+loader: Loader,
- pub fn decode(reader: anytype) anyerror!WebsocketCommandResolveIDs {
- var this = std.mem.zeroes(WebsocketCommandResolveIDs);
+/// manifest
+manifest: DependencyManifest,
- this.ptrs = try reader.readArray(StringPointer);
- this.files = try reader.readValue([]const u8);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeArray(StringPointer, this.ptrs);
- try writer.writeValue(this.files);
- }
- };
+pub fn decode(reader: anytype) anyerror!WebsocketMessageManifestSuccess {
+ var this = std.mem.zeroes(WebsocketMessageManifestSuccess);
- pub const WebsocketMessageManifestSuccess = struct {
- /// id
- id: u32 = 0,
+ this.id = try reader.readValue(u32);
+ this.module_path = try reader.readValue([]const u8);
+ this.loader = try reader.readValue(Loader);
+ this.manifest = try reader.readValue(DependencyManifest);
+ return this;
+}
- /// module_path
- module_path: []const u8,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+ try writer.writeValue(this.module_path);
+ try writer.writeEnum(this.loader);
+ try writer.writeValue(this.manifest);
+}
- /// loader
- loader: Loader,
+};
- /// manifest
- manifest: DependencyManifest,
+pub const WebsocketMessageManifestFailure = struct {
+/// id
+id: u32 = 0,
- pub fn decode(reader: anytype) anyerror!WebsocketMessageManifestSuccess {
- var this = std.mem.zeroes(WebsocketMessageManifestSuccess);
+/// from_timestamp
+from_timestamp: u32 = 0,
- this.id = try reader.readValue(u32);
- this.module_path = try reader.readValue([]const u8);
- this.loader = try reader.readValue(Loader);
- this.manifest = try reader.readValue(DependencyManifest);
- return this;
- }
+/// loader
+loader: Loader,
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- try writer.writeValue(this.module_path);
- try writer.writeEnum(this.loader);
- try writer.writeValue(this.manifest);
- }
- };
+/// log
+log: Log,
- pub const WebsocketMessageManifestFailure = struct {
- /// id
- id: u32 = 0,
- /// from_timestamp
- from_timestamp: u32 = 0,
+pub fn decode(reader: anytype) anyerror!WebsocketMessageManifestFailure {
+ var this = std.mem.zeroes(WebsocketMessageManifestFailure);
- /// loader
- loader: Loader,
+ this.id = try reader.readValue(u32);
+ this.from_timestamp = try reader.readValue(u32);
+ this.loader = try reader.readValue(Loader);
+ this.log = try reader.readValue(Log);
+ return this;
+}
- /// log
- log: Log,
+pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
+ try writer.writeInt(this.id);
+ try writer.writeInt(this.from_timestamp);
+ try writer.writeEnum(this.loader);
+ try writer.writeValue(this.log);
+}
- pub fn decode(reader: anytype) anyerror!WebsocketMessageManifestFailure {
- var this = std.mem.zeroes(WebsocketMessageManifestFailure);
+};
- this.id = try reader.readValue(u32);
- this.from_timestamp = try reader.readValue(u32);
- this.loader = try reader.readValue(Loader);
- this.log = try reader.readValue(Log);
- return this;
- }
- pub fn encode(this: *const @This(), writer: anytype) anyerror!void {
- try writer.writeInt(this.id);
- try writer.writeInt(this.from_timestamp);
- try writer.writeEnum(this.loader);
- try writer.writeValue(this.log);
- }
- };
};
+
const ExamplePackedStruct = packed struct {
len: u32 = 0,
offset: u32 = 0,
diff --git a/src/bundler.zig b/src/bundler.zig
index 26d59ca93..30876c52c 100644
--- a/src/bundler.zig
+++ b/src/bundler.zig
@@ -35,6 +35,8 @@ const Css = @import("css_scanner.zig");
const DotEnv = @import("./env_loader.zig");
const Lock = @import("./lock.zig").Lock;
const NewBunQueue = @import("./bun_queue.zig").NewBunQueue;
+const NodeFallbackModules = @import("./node_fallbacks.zig");
+const CacheEntry = @import("./cache.zig").FsCacheEntry;
// How it works end-to-end
// 1. Resolve a file path from input using the resolver
@@ -96,7 +98,6 @@ pub fn NewBundler(cache_files: bool) type {
return struct {
pub const Linker = if (cache_files) linker.Linker else linker.ServeLinker;
pub const Resolver = if (cache_files) _resolver.Resolver else _resolver.ResolverUncached;
-
const ThisBundler = @This();
options: options.BundleOptions,
@@ -1025,7 +1026,18 @@ pub fn NewBundler(cache_files: bool) type {
pub fn get(this: *GenerateNodeModuleBundle, resolve_result: *const _resolver.Result) ?BundledModuleData {
const path = resolve_result.pathConst() orelse return null;
+ if (strings.eqlComptime(path.namespace, "node")) {
+ const _import_path = path.text["/bun-vfs/node_modules/".len..][resolve_result.package_json.?.name.len + 1 ..];
+ return BundledModuleData{
+ .import_path = _import_path,
+ .package_path = path.text["/bun-vfs/node_modules/".len..],
+ .package = resolve_result.package_json.?,
+ .module_id = resolve_result.package_json.?.hashModule(_import_path),
+ };
+ }
+
var base_path = path.text;
+
const package_json: *const PackageJSON = this.bundler.resolver.rootNodeModulePackageJSON(
resolve_result,
&base_path,
@@ -1072,15 +1084,40 @@ pub fn NewBundler(cache_files: bool) type {
var written: usize = undefined;
var code_offset: u32 = 0;
- const entry = try bundler.resolver.caches.fs.readFileShared(
- bundler.fs,
- file_path.text,
- resolve.dirname_fd,
- if (resolve.file_fd != 0) resolve.file_fd else null,
- shared_buffer,
- );
+ const entry: CacheEntry = brk: {
+ if (!strings.eqlComptime(file_path.namespace, "node"))
+ break :brk try bundler.resolver.caches.fs.readFileShared(
+ bundler.fs,
+ file_path.text,
+ resolve.dirname_fd,
+ if (resolve.file_fd != 0) resolve.file_fd else null,
+ shared_buffer,
+ );
+
+ var module_name = file_path.text["/bun-vfs/node_modules/".len..];
+ module_name = module_name[0..strings.indexOfChar(module_name, '/').?];
+
+ if (NodeFallbackModules.Map.get(module_name)) |mod| {
+ break :brk CacheEntry{ .contents = mod.code.* };
+ }
+
+ break :brk CacheEntry{
+ .contents = "",
+ };
+ };
- const module_data = BundledModuleData.get(this, &resolve) orelse return error.ResolveError;
+ const module_data = BundledModuleData.get(this, &resolve) orelse {
+ const source = logger.Source.initPathString(file_path.text, entry.contents);
+ this.log.addResolveError(
+ &source,
+ logger.Range.None,
+ this.allocator,
+ "Bug while resolving: \"{s}\"",
+ .{file_path.text},
+ resolve.import_kind,
+ ) catch {};
+ return error.ResolveError;
+ };
const module_id = module_data.module_id;
const package = module_data.package;
const package_relative_path = module_data.import_path;
diff --git a/src/cache.zig b/src/cache.zig
index c2e56e6c8..ccf626ee8 100644
--- a/src/cache.zig
+++ b/src/cache.zig
@@ -14,6 +14,20 @@ const Mutex = @import("./lock.zig").Lock;
const import_record = @import("./import_record.zig");
const ImportRecord = import_record.ImportRecord;
+pub const FsCacheEntry = struct {
+ contents: string,
+ fd: StoredFileDescriptorType = 0,
+ // Null means its not usable
+ mod_key: ?fs.FileSystem.Implementation.ModKey = null,
+
+ pub fn deinit(entry: *FsCacheEntry, allocator: *std.mem.Allocator) void {
+ if (entry.contents.len > 0) {
+ allocator.free(entry.contents);
+ entry.contents = "";
+ }
+ }
+};
+
pub fn NewCache(comptime cache_files: bool) type {
return struct {
pub const Set = struct {
@@ -37,24 +51,12 @@ pub fn NewCache(comptime cache_files: bool) type {
}
};
pub const Fs = struct {
+ const Entry = FsCacheEntry;
+
mutex: Mutex,
entries: std.StringHashMap(Entry),
shared_buffer: MutableString,
- pub const Entry = struct {
- contents: string,
- fd: StoredFileDescriptorType = 0,
- // Null means its not usable
- mod_key: ?fs.FileSystem.Implementation.ModKey = null,
-
- pub fn deinit(entry: *Entry, allocator: *std.mem.Allocator) void {
- if (entry.contents.len > 0) {
- allocator.free(entry.contents);
- entry.contents = "";
- }
- }
- };
-
pub fn deinit(c: *Fs) void {
var iter = c.entries.iterator();
while (iter.next()) |entry| {
diff --git a/src/cli.zig b/src/cli.zig
index 9e0574746..edc209014 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -178,6 +178,7 @@ pub const Arguments = struct {
clap.parseParam("-l, --loader <STR>... Parse files with .ext:loader, e.g. --loader .js:jsx. Valid loaders: jsx, js, json, tsx (not implemented yet), ts (not implemented yet), css (not implemented yet)") catch unreachable,
clap.parseParam("-o, --outdir <STR> Save output to directory (default: \"out\" if none provided and multiple entry points passed)") catch unreachable,
clap.parseParam("-r, --resolve <STR> Determine import/require behavior. \"disable\" ignores. \"dev\" bundles node_modules and builds everything else as independent entry points") catch unreachable,
+ // clap.parseParam("-r, --resolve <STR> Determine import/require behavior. \"disable\" ignores. \"dev\" bundles node_modules and builds everything else as independent entry points") catch unreachable,
clap.parseParam("<POS>... ") catch unreachable,
};
diff --git a/src/fallback.version b/src/fallback.version
index 767db23f0..e684473e4 100644
--- a/src/fallback.version
+++ b/src/fallback.version
@@ -1 +1 @@
-f6c1d621b6e90172 \ No newline at end of file
+703503c7cc54abc8 \ No newline at end of file
diff --git a/src/fs.zig b/src/fs.zig
index 4190710e0..80473692b 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -1165,6 +1165,16 @@ pub const Path = struct {
};
}
+ pub fn initWithNamespaceVirtual(comptime text: string, comptime namespace: string, comptime package: string) Path {
+ return Path{
+ .pretty = comptime "node:" ++ package,
+ .is_symlink = true,
+ .text = text,
+ .namespace = namespace,
+ .name = PathName.init(text),
+ };
+ }
+
pub fn isBefore(a: *Path, b: Path) bool {
return a.namespace > b.namespace ||
(a.namespace == b.namespace and (a.text < b.text ||
diff --git a/src/linker.zig b/src/linker.zig
index 56912b9b0..f07fa3f07 100644
--- a/src/linker.zig
+++ b/src/linker.zig
@@ -280,7 +280,7 @@ pub fn NewLinker(comptime BundlerType: type) type {
const package_relative_path = linker.fs.relative(
package_base_dir,
- path.pretty,
+ if (!strings.eqlComptime(path.namespace, "node")) path.pretty else path.text,
);
const found_module = node_modules_bundle.findModuleInPackage(package, package_relative_path) orelse {
diff --git a/src/node-fallbacks/assert.js b/src/node-fallbacks/assert.js
new file mode 100644
index 000000000..a62319d0a
--- /dev/null
+++ b/src/node-fallbacks/assert.js
@@ -0,0 +1 @@
+export * from 'assert'; \ No newline at end of file
diff --git a/src/node-fallbacks/buffer.js b/src/node-fallbacks/buffer.js
new file mode 100644
index 000000000..9984aef87
--- /dev/null
+++ b/src/node-fallbacks/buffer.js
@@ -0,0 +1 @@
+export * from "buffer";
diff --git a/src/node-fallbacks/console.js b/src/node-fallbacks/console.js
new file mode 100644
index 000000000..5cb1dfa10
--- /dev/null
+++ b/src/node-fallbacks/console.js
@@ -0,0 +1 @@
+module.exports = console;
diff --git a/src/node-fallbacks/constants.js b/src/node-fallbacks/constants.js
new file mode 100644
index 000000000..5811eebd4
--- /dev/null
+++ b/src/node-fallbacks/constants.js
@@ -0,0 +1 @@
+export * from "constants-browserify";
diff --git a/src/node-fallbacks/crypto.js b/src/node-fallbacks/crypto.js
new file mode 100644
index 000000000..f5cd99d3b
--- /dev/null
+++ b/src/node-fallbacks/crypto.js
@@ -0,0 +1 @@
+export * from "crypto-browserify";
diff --git a/src/node-fallbacks/domain.js b/src/node-fallbacks/domain.js
new file mode 100644
index 000000000..9fe768097
--- /dev/null
+++ b/src/node-fallbacks/domain.js
@@ -0,0 +1 @@
+export * from "domain-browser";
diff --git a/src/node-fallbacks/events.js b/src/node-fallbacks/events.js
new file mode 100644
index 000000000..c804909af
--- /dev/null
+++ b/src/node-fallbacks/events.js
@@ -0,0 +1 @@
+export * from "events";
diff --git a/src/node-fallbacks/http.js b/src/node-fallbacks/http.js
new file mode 100644
index 000000000..3f025710f
--- /dev/null
+++ b/src/node-fallbacks/http.js
@@ -0,0 +1 @@
+export * from "stream-http";
diff --git a/src/node-fallbacks/https.js b/src/node-fallbacks/https.js
new file mode 100644
index 000000000..a5f405a5a
--- /dev/null
+++ b/src/node-fallbacks/https.js
@@ -0,0 +1 @@
+export * from "https-browserify";
diff --git a/src/node-fallbacks/os.js b/src/node-fallbacks/os.js
new file mode 100644
index 000000000..c5bef4cf0
--- /dev/null
+++ b/src/node-fallbacks/os.js
@@ -0,0 +1 @@
+export * from "os-browserify/browser";
diff --git a/src/node-fallbacks/package-lock.json b/src/node-fallbacks/package-lock.json
new file mode 100644
index 000000000..5df702fb2
--- /dev/null
+++ b/src/node-fallbacks/package-lock.json
@@ -0,0 +1,2046 @@
+{
+ "name": "fallbacks",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "fallbacks",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "assert": "^2.0.0",
+ "browserify-zlib": "^0.2.0",
+ "buffer": "^6.0.3",
+ "console-browserify": "^1.2.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "^3.12.0",
+ "domain-browser": "^4.22.0",
+ "esbuild": "^0.12.25",
+ "events": "^3.3.0",
+ "https-browserify": "^1.0.0",
+ "os-browserify": "^0.3.0",
+ "path-browserify": "^1.0.1",
+ "process": "^0.11.10",
+ "punycode": "^2.1.1",
+ "querystring-es3": "^0.2.1",
+ "stream-browserify": "^3.0.0",
+ "stream-http": "^3.2.0",
+ "string_decoder": "^1.3.0",
+ "timers-browserify": "^2.0.12",
+ "tty-browserify": "^0.0.1",
+ "url": "^0.11.0",
+ "util": "^0.12.4",
+ "vm-browserify": "^1.1.2"
+ }
+ },
+ "node_modules/asn1.js": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
+ "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
+ "dependencies": {
+ "bn.js": "^4.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "node_modules/assert": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz",
+ "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==",
+ "dependencies": {
+ "es6-object-assign": "^1.1.0",
+ "is-nan": "^1.2.1",
+ "object-is": "^1.0.1",
+ "util": "^0.12.0"
+ }
+ },
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
+ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ },
+ "node_modules/brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
+ },
+ "node_modules/browserify-aes": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+ "dependencies": {
+ "buffer-xor": "^1.0.3",
+ "cipher-base": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.3",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/browserify-cipher": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+ "dependencies": {
+ "browserify-aes": "^1.0.4",
+ "browserify-des": "^1.0.0",
+ "evp_bytestokey": "^1.0.0"
+ }
+ },
+ "node_modules/browserify-des": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "des.js": "^1.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/browserify-rsa": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
+ "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
+ "dependencies": {
+ "bn.js": "^5.0.0",
+ "randombytes": "^2.0.1"
+ }
+ },
+ "node_modules/browserify-rsa/node_modules/bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ },
+ "node_modules/browserify-sign": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
+ "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
+ "dependencies": {
+ "bn.js": "^5.1.1",
+ "browserify-rsa": "^4.0.1",
+ "create-hash": "^1.2.0",
+ "create-hmac": "^1.1.7",
+ "elliptic": "^6.5.3",
+ "inherits": "^2.0.4",
+ "parse-asn1": "^5.1.5",
+ "readable-stream": "^3.6.0",
+ "safe-buffer": "^5.2.0"
+ }
+ },
+ "node_modules/browserify-sign/node_modules/bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ },
+ "node_modules/browserify-zlib": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+ "dependencies": {
+ "pako": "~1.0.5"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/buffer-xor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk="
+ },
+ "node_modules/builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug="
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/cipher-base": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/console-browserify": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
+ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA=="
+ },
+ "node_modules/constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U="
+ },
+ "node_modules/create-ecdh": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
+ "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "elliptic": "^6.5.3"
+ }
+ },
+ "node_modules/create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "node_modules/create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "dependencies": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "node_modules/crypto-browserify": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+ "dependencies": {
+ "browserify-cipher": "^1.0.0",
+ "browserify-sign": "^4.0.0",
+ "create-ecdh": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.0",
+ "diffie-hellman": "^5.0.0",
+ "inherits": "^2.0.1",
+ "pbkdf2": "^3.0.3",
+ "public-encrypt": "^4.0.0",
+ "randombytes": "^2.0.0",
+ "randomfill": "^1.0.3"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dependencies": {
+ "object-keys": "^1.0.12"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/des.js": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
+ "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "node_modules/diffie-hellman": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "miller-rabin": "^4.0.0",
+ "randombytes": "^2.0.0"
+ }
+ },
+ "node_modules/domain-browser": {
+ "version": "4.22.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz",
+ "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://bevry.me/fund"
+ }
+ },
+ "node_modules/elliptic": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+ "dependencies": {
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
+ "hash.js": "^1.0.0",
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "node_modules/es-abstract": {
+ "version": "1.18.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz",
+ "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.2",
+ "internal-slot": "^1.0.3",
+ "is-callable": "^1.2.3",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.3",
+ "is-string": "^1.0.6",
+ "object-inspect": "^1.11.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.4",
+ "string.prototype.trimstart": "^1.0.4",
+ "unbox-primitive": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "dependencies": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es6-object-assign": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
+ "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
+ },
+ "node_modules/esbuild": {
+ "version": "0.12.25",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.25.tgz",
+ "integrity": "sha512-woie0PosbRSoN8gQytrdCzUbS2ByKgO8nD1xCZkEup3D9q92miCze4PqEI9TZDYAuwn6CruEnQpJxgTRWdooAg==",
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ }
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/evp_bytestokey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+ "dependencies": {
+ "md5.js": "^1.3.4",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/foreach": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-bigints": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+ "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hash-base": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
+ "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.6.0",
+ "safe-buffer": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
+ "node_modules/hmac-drbg": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+ "dependencies": {
+ "hash.js": "^1.0.3",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "node_modules/https-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/internal-slot": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
+ "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
+ "dependencies": {
+ "get-intrinsic": "^1.1.0",
+ "has": "^1.0.3",
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/is-arguments": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
+ "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+ "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+ "dependencies": {
+ "has-bigints": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-boolean-object": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+ "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-callable": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz",
+ "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+ "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-generator-function": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
+ "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-nan": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz",
+ "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
+ "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-number-object": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz",
+ "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-regex": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+ "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-string": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+ "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-typed-array": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz",
+ "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.18.5",
+ "foreach": "^2.0.5",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "dependencies": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/miller-rabin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "dependencies": {
+ "bn.js": "^4.0.0",
+ "brorand": "^1.0.1"
+ },
+ "bin": {
+ "miller-rabin": "bin/miller-rabin"
+ }
+ },
+ "node_modules/minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
+ },
+ "node_modules/minimalistic-crypto-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
+ },
+ "node_modules/object-inspect": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
+ "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-is": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
+ "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.assign": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "has-symbols": "^1.0.1",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/os-browserify": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc="
+ },
+ "node_modules/pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+ },
+ "node_modules/parse-asn1": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
+ "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
+ "dependencies": {
+ "asn1.js": "^5.2.0",
+ "browserify-aes": "^1.0.0",
+ "evp_bytestokey": "^1.0.0",
+ "pbkdf2": "^3.0.3",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/path-browserify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
+ },
+ "node_modules/pbkdf2": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
+ "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
+ "dependencies": {
+ "create-hash": "^1.1.2",
+ "create-hmac": "^1.1.4",
+ "ripemd160": "^2.0.1",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ },
+ "engines": {
+ "node": ">=0.12"
+ }
+ },
+ "node_modules/process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/public-encrypt": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "parse-asn1": "^5.0.0",
+ "randombytes": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+ "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ },
+ "node_modules/querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/randomfill": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+ "dependencies": {
+ "randombytes": "^2.0.5",
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/ripemd160": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "dependencies": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
+ },
+ "node_modules/sha.js": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ },
+ "bin": {
+ "sha.js": "bin.js"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/stream-browserify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
+ "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
+ "dependencies": {
+ "inherits": "~2.0.4",
+ "readable-stream": "^3.5.0"
+ }
+ },
+ "node_modules/stream-http": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz",
+ "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==",
+ "dependencies": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.6.0",
+ "xtend": "^4.0.2"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+ "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+ "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/timers-browserify": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+ "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
+ "dependencies": {
+ "setimmediate": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
+ "node_modules/tty-browserify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",
+ "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw=="
+ },
+ "node_modules/unbox-primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+ "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has-bigints": "^1.0.1",
+ "has-symbols": "^1.0.2",
+ "which-boxed-primitive": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+ "dependencies": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ }
+ },
+ "node_modules/url/node_modules/punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
+ },
+ "node_modules/util": {
+ "version": "0.12.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz",
+ "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "is-arguments": "^1.0.4",
+ "is-generator-function": "^1.0.7",
+ "is-typed-array": "^1.1.3",
+ "safe-buffer": "^5.1.2",
+ "which-typed-array": "^1.1.2"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "node_modules/vm-browserify": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ=="
+ },
+ "node_modules/which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "dependencies": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-typed-array": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz",
+ "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.18.5",
+ "foreach": "^2.0.5",
+ "has-tostringtag": "^1.0.0",
+ "is-typed-array": "^1.1.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "engines": {
+ "node": ">=0.4"
+ }
+ }
+ },
+ "dependencies": {
+ "asn1.js": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
+ "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
+ "requires": {
+ "bn.js": "^4.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "assert": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz",
+ "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==",
+ "requires": {
+ "es6-object-assign": "^1.1.0",
+ "is-nan": "^1.2.1",
+ "object-is": "^1.0.1",
+ "util": "^0.12.0"
+ }
+ },
+ "available-typed-arrays": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
+ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ },
+ "bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
+ },
+ "brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
+ },
+ "browserify-aes": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+ "requires": {
+ "buffer-xor": "^1.0.3",
+ "cipher-base": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.3",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "browserify-cipher": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+ "requires": {
+ "browserify-aes": "^1.0.4",
+ "browserify-des": "^1.0.0",
+ "evp_bytestokey": "^1.0.0"
+ }
+ },
+ "browserify-des": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "des.js": "^1.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "browserify-rsa": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
+ "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
+ "requires": {
+ "bn.js": "^5.0.0",
+ "randombytes": "^2.0.1"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ }
+ }
+ },
+ "browserify-sign": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
+ "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
+ "requires": {
+ "bn.js": "^5.1.1",
+ "browserify-rsa": "^4.0.1",
+ "create-hash": "^1.2.0",
+ "create-hmac": "^1.1.7",
+ "elliptic": "^6.5.3",
+ "inherits": "^2.0.4",
+ "parse-asn1": "^5.1.5",
+ "readable-stream": "^3.6.0",
+ "safe-buffer": "^5.2.0"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ }
+ }
+ },
+ "browserify-zlib": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+ "requires": {
+ "pako": "~1.0.5"
+ }
+ },
+ "buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "buffer-xor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk="
+ },
+ "builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug="
+ },
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
+ "cipher-base": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "console-browserify": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
+ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA=="
+ },
+ "constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U="
+ },
+ "create-ecdh": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
+ "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
+ "requires": {
+ "bn.js": "^4.1.0",
+ "elliptic": "^6.5.3"
+ }
+ },
+ "create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "requires": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "crypto-browserify": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+ "requires": {
+ "browserify-cipher": "^1.0.0",
+ "browserify-sign": "^4.0.0",
+ "create-ecdh": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.0",
+ "diffie-hellman": "^5.0.0",
+ "inherits": "^2.0.1",
+ "pbkdf2": "^3.0.3",
+ "public-encrypt": "^4.0.0",
+ "randombytes": "^2.0.0",
+ "randomfill": "^1.0.3"
+ }
+ },
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
+ "des.js": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
+ "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
+ "requires": {
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "diffie-hellman": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+ "requires": {
+ "bn.js": "^4.1.0",
+ "miller-rabin": "^4.0.0",
+ "randombytes": "^2.0.0"
+ }
+ },
+ "domain-browser": {
+ "version": "4.22.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz",
+ "integrity": "sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw=="
+ },
+ "elliptic": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+ "requires": {
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
+ "hash.js": "^1.0.0",
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "es-abstract": {
+ "version": "1.18.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz",
+ "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.2",
+ "internal-slot": "^1.0.3",
+ "is-callable": "^1.2.3",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.3",
+ "is-string": "^1.0.6",
+ "object-inspect": "^1.11.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.4",
+ "string.prototype.trimstart": "^1.0.4",
+ "unbox-primitive": "^1.0.1"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "es6-object-assign": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
+ "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
+ },
+ "esbuild": {
+ "version": "0.12.25",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.25.tgz",
+ "integrity": "sha512-woie0PosbRSoN8gQytrdCzUbS2ByKgO8nD1xCZkEup3D9q92miCze4PqEI9TZDYAuwn6CruEnQpJxgTRWdooAg=="
+ },
+ "events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="
+ },
+ "evp_bytestokey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+ "requires": {
+ "md5.js": "^1.3.4",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "foreach": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "get-intrinsic": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-bigints": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+ "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA=="
+ },
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ },
+ "has-tostringtag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+ "requires": {
+ "has-symbols": "^1.0.2"
+ }
+ },
+ "hash-base": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
+ "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
+ "requires": {
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.6.0",
+ "safe-buffer": "^5.2.0"
+ }
+ },
+ "hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
+ "hmac-drbg": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+ "requires": {
+ "hash.js": "^1.0.3",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "https-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
+ },
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "internal-slot": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
+ "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
+ "requires": {
+ "get-intrinsic": "^1.1.0",
+ "has": "^1.0.3",
+ "side-channel": "^1.0.4"
+ }
+ },
+ "is-arguments": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
+ "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+ "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+ "requires": {
+ "has-bigints": "^1.0.1"
+ }
+ },
+ "is-boolean-object": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+ "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-callable": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz",
+ "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w=="
+ },
+ "is-date-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+ "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+ "requires": {
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-generator-function": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
+ "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
+ "requires": {
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-nan": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz",
+ "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "is-negative-zero": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
+ "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w=="
+ },
+ "is-number-object": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz",
+ "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==",
+ "requires": {
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-regex": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+ "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-string": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+ "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+ "requires": {
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "is-symbol": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+ "requires": {
+ "has-symbols": "^1.0.2"
+ }
+ },
+ "is-typed-array": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz",
+ "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==",
+ "requires": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.18.5",
+ "foreach": "^2.0.5",
+ "has-tostringtag": "^1.0.0"
+ }
+ },
+ "md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "miller-rabin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "requires": {
+ "bn.js": "^4.0.0",
+ "brorand": "^1.0.1"
+ }
+ },
+ "minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
+ },
+ "minimalistic-crypto-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
+ },
+ "object-inspect": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
+ "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg=="
+ },
+ "object-is": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
+ "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
+ },
+ "object.assign": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "has-symbols": "^1.0.1",
+ "object-keys": "^1.1.1"
+ }
+ },
+ "os-browserify": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc="
+ },
+ "pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="
+ },
+ "parse-asn1": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
+ "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
+ "requires": {
+ "asn1.js": "^5.2.0",
+ "browserify-aes": "^1.0.0",
+ "evp_bytestokey": "^1.0.0",
+ "pbkdf2": "^3.0.3",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "path-browserify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
+ },
+ "pbkdf2": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
+ "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
+ "requires": {
+ "create-hash": "^1.1.2",
+ "create-hmac": "^1.1.4",
+ "ripemd160": "^2.0.1",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+ },
+ "public-encrypt": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "requires": {
+ "bn.js": "^4.1.0",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "parse-asn1": "^5.0.0",
+ "randombytes": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
+ },
+ "querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM="
+ },
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "randomfill": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+ "requires": {
+ "randombytes": "^2.0.5",
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "ripemd160": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
+ },
+ "sha.js": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ }
+ },
+ "stream-browserify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
+ "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
+ "requires": {
+ "inherits": "~2.0.4",
+ "readable-stream": "^3.5.0"
+ }
+ },
+ "stream-http": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz",
+ "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==",
+ "requires": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.6.0",
+ "xtend": "^4.0.2"
+ }
+ },
+ "string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "requires": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "string.prototype.trimend": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+ "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+ "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "timers-browserify": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+ "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
+ "requires": {
+ "setimmediate": "^1.0.4"
+ }
+ },
+ "tty-browserify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",
+ "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw=="
+ },
+ "unbox-primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+ "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has-bigints": "^1.0.1",
+ "has-symbols": "^1.0.2",
+ "which-boxed-primitive": "^1.0.2"
+ }
+ },
+ "url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+ "requires": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
+ }
+ }
+ },
+ "util": {
+ "version": "0.12.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz",
+ "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "is-arguments": "^1.0.4",
+ "is-generator-function": "^1.0.7",
+ "is-typed-array": "^1.1.3",
+ "safe-buffer": "^5.1.2",
+ "which-typed-array": "^1.1.2"
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "vm-browserify": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ=="
+ },
+ "which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "requires": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ }
+ },
+ "which-typed-array": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz",
+ "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==",
+ "requires": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.18.5",
+ "foreach": "^2.0.5",
+ "has-tostringtag": "^1.0.0",
+ "is-typed-array": "^1.1.7"
+ }
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+ }
+ }
+}
diff --git a/src/node-fallbacks/package.json b/src/node-fallbacks/package.json
new file mode 100644
index 000000000..0327028b5
--- /dev/null
+++ b/src/node-fallbacks/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "fallbacks",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "build": "esbuild --bundle *.js --outdir=out --format=cjs --minify --platform=browser"
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "assert": "^2.0.0",
+ "browserify-zlib": "^0.2.0",
+ "buffer": "^6.0.3",
+ "console-browserify": "^1.2.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "^3.12.0",
+ "domain-browser": "^4.22.0",
+ "esbuild": "^0.12.25",
+ "events": "^3.3.0",
+ "https-browserify": "^1.0.0",
+ "os-browserify": "^0.3.0",
+ "path-browserify": "^1.0.1",
+ "process": "^0.11.10",
+ "punycode": "^2.1.1",
+ "querystring-es3": "^0.2.1",
+ "stream-browserify": "^3.0.0",
+ "stream-http": "^3.2.0",
+ "string_decoder": "^1.3.0",
+ "timers-browserify": "^2.0.12",
+ "tty-browserify": "^0.0.1",
+ "url": "^0.11.0",
+ "util": "^0.12.4",
+ "vm-browserify": "^1.1.2"
+ }
+}
diff --git a/src/node-fallbacks/path.js b/src/node-fallbacks/path.js
new file mode 100644
index 000000000..558f820cc
--- /dev/null
+++ b/src/node-fallbacks/path.js
@@ -0,0 +1 @@
+export * from "path-browserify";
diff --git a/src/node-fallbacks/process.js b/src/node-fallbacks/process.js
new file mode 100644
index 000000000..74190ab67
--- /dev/null
+++ b/src/node-fallbacks/process.js
@@ -0,0 +1 @@
+export * from "process/browser";
diff --git a/src/node-fallbacks/punycode.js b/src/node-fallbacks/punycode.js
new file mode 100644
index 000000000..ef8f0464f
--- /dev/null
+++ b/src/node-fallbacks/punycode.js
@@ -0,0 +1 @@
+export * from "punycode";
diff --git a/src/node-fallbacks/querystring.js b/src/node-fallbacks/querystring.js
new file mode 100644
index 000000000..ad7fd038d
--- /dev/null
+++ b/src/node-fallbacks/querystring.js
@@ -0,0 +1 @@
+export * from "querystring-es3";
diff --git a/src/node-fallbacks/stream.js b/src/node-fallbacks/stream.js
new file mode 100644
index 000000000..025b579cd
--- /dev/null
+++ b/src/node-fallbacks/stream.js
@@ -0,0 +1 @@
+export * from "stream-browserify";
diff --git a/src/node-fallbacks/string_decoder.js b/src/node-fallbacks/string_decoder.js
new file mode 100644
index 000000000..90487c47e
--- /dev/null
+++ b/src/node-fallbacks/string_decoder.js
@@ -0,0 +1 @@
+export * from "string_decoder";
diff --git a/src/node-fallbacks/sys.js b/src/node-fallbacks/sys.js
new file mode 100644
index 000000000..4b20b6354
--- /dev/null
+++ b/src/node-fallbacks/sys.js
@@ -0,0 +1 @@
+export * from "util";
diff --git a/src/node-fallbacks/timers.js b/src/node-fallbacks/timers.js
new file mode 100644
index 000000000..a02f00701
--- /dev/null
+++ b/src/node-fallbacks/timers.js
@@ -0,0 +1 @@
+export * from "timers-browserify";
diff --git a/src/node-fallbacks/tsconfig.json b/src/node-fallbacks/tsconfig.json
new file mode 100644
index 000000000..d1c7e7a71
--- /dev/null
+++ b/src/node-fallbacks/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "assert": ["node_modules/assert"],
+ "buffer": ["node_modules/buffer"],
+ "constants": ["node_modules/constants-browserify"],
+ "crypto": ["node_modules/crypto-browserify"],
+ "domain": ["node_modules/domain-browser"],
+ "events": ["node_modules/events"],
+ "http": ["node_modules/stream-http"],
+ "https": ["node_modules/https-browserify"],
+ "os": ["node_modules/os-browserify/browser"],
+ "path": ["node_modules/path-browserify"],
+ "punycode": ["node_modules/punycode"],
+ "process": ["node_modules/process/browser"],
+ "querystring": ["node_modules/querystring-es3"],
+ "stream": ["node_modules/stream-browserify"],
+ "string_decoder": ["node_modules/string_decoder"],
+ "sys": ["node_modules/util"],
+ "timers": ["node_modules/timers-browserify"],
+ "tty": ["node_modules/tty-browserify"],
+ "url": ["node_modules/url"],
+ "util": ["node_modules/util"],
+ "zlib": ["node_modules/browserify-zlib"]
+ }
+ }
+}
diff --git a/src/node-fallbacks/tty.js b/src/node-fallbacks/tty.js
new file mode 100644
index 000000000..49efb472e
--- /dev/null
+++ b/src/node-fallbacks/tty.js
@@ -0,0 +1 @@
+export * from "tty-browserify";
diff --git a/src/node-fallbacks/url.js b/src/node-fallbacks/url.js
new file mode 100644
index 000000000..6c5da9748
--- /dev/null
+++ b/src/node-fallbacks/url.js
@@ -0,0 +1 @@
+export * from "url";
diff --git a/src/node-fallbacks/util.js b/src/node-fallbacks/util.js
new file mode 100644
index 000000000..4b20b6354
--- /dev/null
+++ b/src/node-fallbacks/util.js
@@ -0,0 +1 @@
+export * from "util";
diff --git a/src/node-fallbacks/zlib.js b/src/node-fallbacks/zlib.js
new file mode 100644
index 000000000..4af7ab847
--- /dev/null
+++ b/src/node-fallbacks/zlib.js
@@ -0,0 +1 @@
+export * from "browserify-zlib";
diff --git a/src/node_fallbacks.zig b/src/node_fallbacks.zig
new file mode 100644
index 000000000..e7882635f
--- /dev/null
+++ b/src/node_fallbacks.zig
@@ -0,0 +1,420 @@
+const std = @import("std");
+const string = @import("./string_types.zig").string;
+const PackageJSON = @import("./resolver/package_json.zig").PackageJSON;
+const logger = @import("./logger.zig");
+const Fs = @import("./fs.zig");
+
+const _assert_code: string = @embedFile("./node-fallbacks/out/assert.js");
+const _buffer_code: string = @embedFile("./node-fallbacks/out/buffer.js");
+const _console_code: string = @embedFile("./node-fallbacks/out/console.js");
+const _constants_code: string = @embedFile("./node-fallbacks/out/constants.js");
+const _crypto_code: string = @embedFile("./node-fallbacks/out/crypto.js");
+const _domain_code: string = @embedFile("./node-fallbacks/out/domain.js");
+const _events_code: string = @embedFile("./node-fallbacks/out/events.js");
+const _http_code: string = @embedFile("./node-fallbacks/out/http.js");
+const _https_code: string = @embedFile("./node-fallbacks/out/https.js");
+const _os_code: string = @embedFile("./node-fallbacks/out/os.js");
+const _path_code: string = @embedFile("./node-fallbacks/out/path.js");
+const _process_code: string = @embedFile("./node-fallbacks/out/process.js");
+const _punycode_code: string = @embedFile("./node-fallbacks/out/punycode.js");
+const _querystring_code: string = @embedFile("./node-fallbacks/out/querystring.js");
+const _stream_code: string = @embedFile("./node-fallbacks/out/stream.js");
+const _string_decoder_code: string = @embedFile("./node-fallbacks/out/string_decoder.js");
+const _sys_code: string = @embedFile("./node-fallbacks/out/sys.js");
+const _timers_code: string = @embedFile("./node-fallbacks/out/timers.js");
+const _tty_code: string = @embedFile("./node-fallbacks/out/tty.js");
+const _url_code: string = @embedFile("./node-fallbacks/out/url.js");
+const _util_code: string = @embedFile("./node-fallbacks/out/util.js");
+const _zlib_code: string = @embedFile("./node-fallbacks/out/zlib.js");
+
+const assert_code: *const string = &_assert_code;
+const buffer_code: *const string = &_buffer_code;
+const console_code: *const string = &_console_code;
+const constants_code: *const string = &_constants_code;
+const crypto_code: *const string = &_crypto_code;
+const domain_code: *const string = &_domain_code;
+const events_code: *const string = &_events_code;
+const http_code: *const string = &_http_code;
+const https_code: *const string = &_https_code;
+const os_code: *const string = &_os_code;
+const path_code: *const string = &_path_code;
+const process_code: *const string = &_process_code;
+const punycode_code: *const string = &_punycode_code;
+const querystring_code: *const string = &_querystring_code;
+const stream_code: *const string = &_stream_code;
+const string_decoder_code: *const string = &_string_decoder_code;
+const sys_code: *const string = &_sys_code;
+const timers_code: *const string = &_timers_code;
+const tty_code: *const string = &_tty_code;
+const url_code: *const string = &_url_code;
+const util_code: *const string = &_util_code;
+const zlib_code: *const string = &_zlib_code;
+
+const assert_import_path = "/bun-vfs/node_modules/assert/index.js";
+const buffer_import_path = "/bun-vfs/node_modules/buffer/index.js";
+const console_import_path = "/bun-vfs/node_modules/console/index.js";
+const constants_import_path = "/bun-vfs/node_modules/constants/index.js";
+const crypto_import_path = "/bun-vfs/node_modules/crypto/index.js";
+const domain_import_path = "/bun-vfs/node_modules/domain/index.js";
+const events_import_path = "/bun-vfs/node_modules/events/index.js";
+const http_import_path = "/bun-vfs/node_modules/http/index.js";
+const https_import_path = "/bun-vfs/node_modules/https/index.js";
+const os_import_path = "/bun-vfs/node_modules/os/index.js";
+const path_import_path = "/bun-vfs/node_modules/path/index.js";
+const process_import_path = "/bun-vfs/node_modules/process/index.js";
+const punycode_import_path = "/bun-vfs/node_modules/punycode/index.js";
+const querystring_import_path = "/bun-vfs/node_modules/querystring/index.js";
+const stream_import_path = "/bun-vfs/node_modules/stream/index.js";
+const string_decoder_import_path = "/bun-vfs/node_modules/string_decoder/index.js";
+const sys_import_path = "/bun-vfs/node_modules/sys/index.js";
+const timers_import_path = "/bun-vfs/node_modules/timers/index.js";
+const tty_import_path = "/bun-vfs/node_modules/tty/index.js";
+const url_import_path = "/bun-vfs/node_modules/url/index.js";
+const util_import_path = "/bun-vfs/node_modules/util/index.js";
+const zlib_import_path = "/bun-vfs/node_modules/zlib/index.js";
+
+const assert_package_json = PackageJSON{
+ .name = "assert",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "assert@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/assert/package.json", ""),
+};
+const buffer_package_json = PackageJSON{
+ .name = "buffer",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "buffer@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/buffer/package.json", ""),
+};
+const console_package_json = PackageJSON{
+ .name = "console",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "console@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/console/package.json", ""),
+};
+const constants_package_json = PackageJSON{
+ .name = "constants",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "constants@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/constants/package.json", ""),
+};
+const crypto_package_json = PackageJSON{
+ .name = "crypto",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "crypto@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/crypto/package.json", ""),
+};
+const domain_package_json = PackageJSON{
+ .name = "domain",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "domain@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/domain/package.json", ""),
+};
+const events_package_json = PackageJSON{
+ .name = "events",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "events@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/events/package.json", ""),
+};
+const http_package_json = PackageJSON{
+ .name = "http",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "http@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/http/package.json", ""),
+};
+const https_package_json = PackageJSON{
+ .name = "https",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "https@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/https/package.json", ""),
+};
+const os_package_json = PackageJSON{
+ .name = "os",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "os@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/os/package.json", ""),
+};
+const path_package_json = PackageJSON{
+ .name = "path",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "path@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/path/package.json", ""),
+};
+const process_package_json = PackageJSON{
+ .name = "process",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "process@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/process/package.json", ""),
+};
+const punycode_package_json = PackageJSON{
+ .name = "punycode",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "punycode@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/punycode/package.json", ""),
+};
+const querystring_package_json = PackageJSON{
+ .name = "querystring",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "querystring@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/querystring/package.json", ""),
+};
+const stream_package_json = PackageJSON{
+ .name = "stream",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "stream@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/stream/package.json", ""),
+};
+const string_decoder_package_json = PackageJSON{
+ .name = "string_decoder",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = brk: {
+ @setEvalBranchQuota(9999);
+ break :brk @truncate(u32, std.hash.Wyhash.hash(0, "string_decoder@0.0.0-polyfill"));
+ },
+
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/string_decoder/package.json", ""),
+};
+
+const sys_package_json = PackageJSON{
+ .name = "sys",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "sys@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/sys/package.json", ""),
+};
+const timers_package_json = PackageJSON{
+ .name = "timers",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "timers@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/timers/package.json", ""),
+};
+const tty_package_json = PackageJSON{
+ .name = "tty",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "tty@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/tty/package.json", ""),
+};
+const url_package_json = PackageJSON{
+ .name = "url",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "url@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/url/package.json", ""),
+};
+const util_package_json = PackageJSON{
+ .name = "util",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "util@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/util/package.json", ""),
+};
+const zlib_package_json = PackageJSON{
+ .name = "zlib",
+ .version = "0.0.0-polyfill",
+ .module_type = .cjs,
+ .hash = @truncate(u32, std.hash.Wyhash.hash(0, "zlib@0.0.0-polyfill")),
+ .main_fields = undefined,
+ .browser_map = undefined,
+ .source = logger.Source.initPathString("/bun-vfs/node_modules/zlib/package.json", ""),
+};
+
+pub const FallbackModule = struct {
+ path: Fs.Path,
+ code: *const string,
+ package_json: *const PackageJSON,
+
+ pub const @"assert" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(assert_import_path, "node", "assert"),
+ .code = assert_code,
+ .package_json = &assert_package_json,
+ };
+ pub const @"buffer" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(buffer_import_path, "node", "buffer"),
+ .code = buffer_code,
+ .package_json = &buffer_package_json,
+ };
+ pub const @"console" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(console_import_path, "node", "console"),
+ .code = console_code,
+ .package_json = &console_package_json,
+ };
+ pub const @"constants" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(constants_import_path, "node", "constants"),
+ .code = constants_code,
+ .package_json = &constants_package_json,
+ };
+ pub const @"crypto" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(crypto_import_path, "node", "crypto"),
+ .code = crypto_code,
+ .package_json = &crypto_package_json,
+ };
+ pub const @"domain" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(domain_import_path, "node", "domain"),
+ .code = domain_code,
+ .package_json = &domain_package_json,
+ };
+ pub const @"events" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(events_import_path, "node", "events"),
+ .code = events_code,
+ .package_json = &events_package_json,
+ };
+ pub const @"http" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(http_import_path, "node", "http"),
+ .code = http_code,
+ .package_json = &http_package_json,
+ };
+ pub const @"https" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(https_import_path, "node", "https"),
+ .code = https_code,
+ .package_json = &https_package_json,
+ };
+ pub const @"os" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(os_import_path, "node", "os"),
+ .code = os_code,
+ .package_json = &os_package_json,
+ };
+ pub const @"path" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(path_import_path, "node", "path"),
+ .code = path_code,
+ .package_json = &path_package_json,
+ };
+ pub const @"process" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(process_import_path, "node", "process"),
+ .code = process_code,
+ .package_json = &process_package_json,
+ };
+ pub const @"punycode" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(punycode_import_path, "node", "punycode"),
+ .code = punycode_code,
+ .package_json = &punycode_package_json,
+ };
+ pub const @"querystring" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(querystring_import_path, "node", "querystring"),
+ .code = querystring_code,
+ .package_json = &querystring_package_json,
+ };
+ pub const @"stream" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(stream_import_path, "node", "stream"),
+ .code = stream_code,
+ .package_json = &stream_package_json,
+ };
+ pub const @"string_decoder" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(string_decoder_import_path, "node", "string_decoder"),
+ .code = string_decoder_code,
+ .package_json = &string_decoder_package_json,
+ };
+ pub const @"sys" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(sys_import_path, "node", "sys"),
+ .code = sys_code,
+ .package_json = &sys_package_json,
+ };
+ pub const @"timers" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(timers_import_path, "node", "timers"),
+ .code = timers_code,
+ .package_json = &timers_package_json,
+ };
+ pub const @"tty" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(tty_import_path, "node", "tty"),
+ .code = tty_code,
+ .package_json = &tty_package_json,
+ };
+ pub const @"url" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(url_import_path, "node", "url"),
+ .code = url_code,
+ .package_json = &url_package_json,
+ };
+ pub const @"util" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(util_import_path, "node", "util"),
+ .code = util_code,
+ .package_json = &util_package_json,
+ };
+ pub const @"zlib" = FallbackModule{
+ .path = Fs.Path.initWithNamespaceVirtual(zlib_import_path, "node", "zlib"),
+ .code = zlib_code,
+ .package_json = &zlib_package_json,
+ };
+};
+
+pub const Map = std.ComptimeStringMap(FallbackModule, .{
+ &.{ "assert", FallbackModule.assert },
+ &.{ "buffer", FallbackModule.buffer },
+ &.{ "console", FallbackModule.console },
+ &.{ "constants", FallbackModule.constants },
+ &.{ "crypto", FallbackModule.crypto },
+ &.{ "domain", FallbackModule.domain },
+ &.{ "events", FallbackModule.events },
+ &.{ "http", FallbackModule.http },
+ &.{ "https", FallbackModule.https },
+ &.{ "os", FallbackModule.os },
+ &.{ "path", FallbackModule.path },
+ &.{ "process", FallbackModule.process },
+ &.{ "punycode", FallbackModule.punycode },
+ &.{ "querystring", FallbackModule.querystring },
+ &.{ "stream", FallbackModule.stream },
+ &.{ "string_decoder", FallbackModule.string_decoder },
+ &.{ "sys", FallbackModule.sys },
+ &.{ "timers", FallbackModule.timers },
+ &.{ "tty", FallbackModule.tty },
+ &.{ "url", FallbackModule.url },
+ &.{ "util", FallbackModule.util },
+ &.{ "zlib", FallbackModule.zlib },
+});
diff --git a/src/options.zig b/src/options.zig
index 6d73afe6d..0251c8416 100644
--- a/src/options.zig
+++ b/src/options.zig
@@ -85,11 +85,11 @@ pub const ExternalModules = struct {
},
.bun => {
- // TODO: fix this stupid copy
- result.node_modules.hash_map.ensureCapacity(BunNodeBuiltinPatternsCompat.len) catch unreachable;
- for (BunNodeBuiltinPatternsCompat) |pattern| {
- result.node_modules.insert(pattern) catch unreachable;
- }
+ // // TODO: fix this stupid copy
+ // result.node_modules.hash_map.ensureCapacity(BunNodeBuiltinPatternsCompat.len) catch unreachable;
+ // for (BunNodeBuiltinPatternsCompat) |pattern| {
+ // result.node_modules.insert(pattern) catch unreachable;
+ // }
},
else => {},
}
@@ -809,6 +809,7 @@ pub const BundleOptions = struct {
defines_loaded: bool = false,
env: Env = Env{},
transform_options: Api.TransformOptions,
+ polyfill_node_globals: bool = true,
pub inline fn cssImportBehavior(this: *const BundleOptions) Api.CssInJsBehavior {
switch (this.platform) {
@@ -1143,6 +1144,8 @@ pub const BundleOptions = struct {
opts.output_dir_handle = try openOutputDir(opts.output_dir);
}
+ opts.polyfill_node_globals = opts.platform != .node;
+
return opts;
}
};
diff --git a/src/resolver/resolver.zig b/src/resolver/resolver.zig
index 56143ed56..13d504538 100644
--- a/src/resolver/resolver.zig
+++ b/src/resolver/resolver.zig
@@ -13,6 +13,8 @@ pub const DirInfo = @import("./dir_info.zig");
const HTTPWatcher = @import("../http.zig").Watcher;
const Wyhash = std.hash.Wyhash;
+const NodeFallbackModules = @import("../node_fallbacks.zig");
+
const Mutex = @import("../lock.zig").Lock;
const StringBoolMap = std.StringHashMap(bool);
@@ -126,7 +128,7 @@ pub const Result = struct {
// checking package.json may not be relevant
pub fn isLikelyNodeModule(this: *const Result) bool {
const path_ = this.pathConst() orelse return false;
- return strings.indexOf(path_.text, "/node_modules/") != null;
+ return this.is_from_node_modules or strings.indexOf(path_.text, "/node_modules/") != null;
}
// Most NPM modules are CommonJS
@@ -639,7 +641,9 @@ pub fn NewResolver(cache_files: bool) type {
return error.ModuleNotFound;
};
- try r.finalizeResult(&result);
+ if (!strings.eqlComptime(result.path_pair.primary.namespace, "node"))
+ try r.finalizeResult(&result);
+
r.flushDebugLogs(.success) catch {};
result.import_kind = kind;
return result;
@@ -747,7 +751,6 @@ pub fn NewResolver(cache_files: bool) type {
.path_pair = res.path_pair,
.diff_case = res.diff_case,
.dirname_fd = dir_info.getFileDescriptor(),
- .is_from_node_modules = res.is_node_module,
.package_json = res.package_json,
};
}
@@ -776,7 +779,6 @@ pub fn NewResolver(cache_files: bool) type {
.dirname_fd = entry.dirname_fd,
.path_pair = entry.path_pair,
.diff_case = entry.diff_case,
- .is_from_node_modules = entry.is_node_module,
.package_json = entry.package_json,
};
}
@@ -832,7 +834,6 @@ pub fn NewResolver(cache_files: bool) type {
result = Result{
.path_pair = _result.path_pair,
.diff_case = _result.diff_case,
- .is_from_node_modules = _result.is_node_module,
.module_type = pkg.module_type,
.dirname_fd = _result.dirname_fd,
.package_json = pkg,
@@ -851,7 +852,6 @@ pub fn NewResolver(cache_files: bool) type {
result = Result{
.path_pair = res.path_pair,
.diff_case = res.diff_case,
- .is_from_node_modules = res.is_node_module,
.dirname_fd = res.dirname_fd,
.package_json = res.package_json,
};
@@ -862,6 +862,33 @@ pub fn NewResolver(cache_files: bool) type {
}
if (check_package) {
+ if (r.opts.polyfill_node_globals) {
+ var import_path_without_node_prefix = import_path;
+ const had_node_prefix = import_path_without_node_prefix.len > "node:".len and
+ strings.eqlComptime(import_path_without_node_prefix[0.."node:".len], "node:");
+
+ import_path_without_node_prefix = if (had_node_prefix)
+ import_path_without_node_prefix["node:".len..]
+ else
+ import_path_without_node_prefix;
+
+ if (NodeFallbackModules.Map.get(import_path_without_node_prefix)) |*fallback_module| {
+ result.path_pair.primary = fallback_module.path;
+ result.module_type = .cjs;
+ result.package_json = @intToPtr(*PackageJSON, @ptrToInt(fallback_module.package_json));
+ result.is_from_node_modules = true;
+ return result;
+ } else if (had_node_prefix) {
+ result.path_pair.primary.namespace = "node";
+ result.path_pair.primary.text = import_path_without_node_prefix;
+ result.path_pair.primary.name = Fs.PathName.init(import_path_without_node_prefix);
+ result.module_type = .cjs;
+ result.path_pair.primary.is_disabled = true;
+ result.is_from_node_modules = true;
+ return result;
+ }
+ }
+
// Check for external packages first
if (r.opts.external.node_modules.count() > 0) {
var query = import_path;
@@ -901,7 +928,6 @@ pub fn NewResolver(cache_files: bool) type {
.path_pair = pair,
.dirname_fd = node_module.dirname_fd,
.diff_case = node_module.diff_case,
- .is_from_node_modules = true,
.package_json = package_json,
};
}
@@ -922,7 +948,6 @@ pub fn NewResolver(cache_files: bool) type {
result = Result{
.path_pair = res.path_pair,
.diff_case = res.diff_case,
- .is_from_node_modules = res.is_node_module,
.dirname_fd = res.dirname_fd,
.package_json = res.package_json,
};
diff --git a/src/runtime.version b/src/runtime.version
index 30f397861..79244e522 100644
--- a/src/runtime.version
+++ b/src/runtime.version
@@ -1 +1 @@
-494c65d79c81935d \ No newline at end of file
+ed96593b8e099dd5 \ No newline at end of file