aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-05 16:39:12 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-05 16:39:12 -0700
commite6d97f2581959d77a5b486faefbfdf094abedf9b (patch)
tree6298631c63ab9f0e0ca2248ca04676fd62376370 /src/api
parent4a2e1574e4d4001b60c96a315491dd622d7d54b6 (diff)
downloadbun-e6d97f2581959d77a5b486faefbfdf094abedf9b.tar.gz
bun-e6d97f2581959d77a5b486faefbfdf094abedf9b.tar.zst
bun-e6d97f2581959d77a5b486faefbfdf094abedf9b.zip
add `install.github.api` option
Diffstat (limited to 'src/api')
-rw-r--r--src/api/schema.d.ts1
-rw-r--r--src/api/schema.js10
-rw-r--r--src/api/schema.peechy1
-rw-r--r--src/api/schema.zig10
4 files changed, 22 insertions, 0 deletions
diff --git a/src/api/schema.d.ts b/src/api/schema.d.ts
index 3ec03e213..c481b8fed 100644
--- a/src/api/schema.d.ts
+++ b/src/api/schema.d.ts
@@ -719,6 +719,7 @@ export interface BunInstall {
global_bin_dir?: string;
frozen_lockfile?: boolean;
exact?: boolean;
+ use_github_api?: boolean;
}
export interface ClientServerModule {
diff --git a/src/api/schema.js b/src/api/schema.js
index 6fb4b1d8d..38f30156b 100644
--- a/src/api/schema.js
+++ b/src/api/schema.js
@@ -3038,6 +3038,10 @@ function decodeBunInstall(bb) {
result["exact"] = !!bb.readByte();
break;
+ case 21:
+ result["use_github_api"] = !!bb.readByte();
+ break;
+
default:
throw new Error("Attempted to parse invalid message");
}
@@ -3170,6 +3174,12 @@ function encodeBunInstall(message, bb) {
bb.writeByte(20);
bb.writeByte(value);
}
+
+ var value = message["use_github_api"];
+ if (value != null) {
+ bb.writeByte(21);
+ bb.writeByte(value);
+ }
bb.writeByte(0);
}
diff --git a/src/api/schema.peechy b/src/api/schema.peechy
index 8185733c9..91d4f682c 100644
--- a/src/api/schema.peechy
+++ b/src/api/schema.peechy
@@ -588,6 +588,7 @@ message BunInstall {
string global_bin_dir = 18;
bool frozen_lockfile = 19;
bool exact = 20;
+ bool use_github_api = 21;
}
struct ClientServerModule {
diff --git a/src/api/schema.zig b/src/api/schema.zig
index 79a98cfa8..ca3c66e67 100644
--- a/src/api/schema.zig
+++ b/src/api/schema.zig
@@ -2882,6 +2882,9 @@ pub const Api = struct {
/// exact
exact: ?bool = null,
+ /// use_github_api
+ use_github_api: ?bool = null,
+
pub fn decode(reader: anytype) anyerror!BunInstall {
var this = std.mem.zeroes(BunInstall);
@@ -2951,6 +2954,9 @@ pub const Api = struct {
20 => {
this.exact = try reader.readValue(bool);
},
+ 21 => {
+ this.use_github_api = try reader.readValue(bool);
+ },
else => {
return error.InvalidMessage;
},
@@ -3040,6 +3046,10 @@ pub const Api = struct {
try writer.writeFieldID(20);
try writer.writeInt(@as(u8, @intFromBool(exact)));
}
+ if (this.use_github_api) |use_github_api| {
+ try writer.writeFieldID(21);
+ try writer.writeInt(@as(u8, @intFromBool(use_github_api)));
+ }
try writer.endMessage();
}
};