diff --git a/core_lib/bindings/index.ts b/core_lib/bindings/index.ts index 54ced6a..034e3c2 100644 --- a/core_lib/bindings/index.ts +++ b/core_lib/bindings/index.ts @@ -1,12 +1,12 @@ -export * from "./OutboundPayload" +export * from "./ChannelAction" +export * from "./ChannelDirection" export * from "./ChannelMessage" -export * from "./SendInfo" -export * from "./TransferType" +export * from "./DeviceType" export * from "./EndpointInfo" +export * from "./OutboundPayload" export * from "./RemoteDeviceInfo" -export * from "./DeviceType" -export * from "./ChannelDirection" -export * from "./TransferMetadata" -export * from "./ChannelAction" +export * from "./SendInfo" export * from "./State" +export * from "./TransferMetadata" +export * from "./TransferType" export * from "./Visibility" \ No newline at end of file diff --git a/core_lib/build.rs b/core_lib/build.rs index 9b19527..7626484 100644 --- a/core_lib/build.rs +++ b/core_lib/build.rs @@ -18,7 +18,7 @@ fn main() { ) .unwrap(); - let exports: Vec<_> = fs::read_dir("./bindings") + let mut exports: Vec<_> = fs::read_dir("./bindings") .unwrap() .filter_map(Result::ok) .filter_map(|p| { @@ -30,6 +30,8 @@ fn main() { .filter(|f| f != "index") .map(|f| format!("export * from \"./{}\"", f)) .collect(); + // Sort it to avoid having the index.ts being different for no reason + exports.sort(); let mut file = File::create("./bindings/index.ts").unwrap(); file.write_all(exports.join("\n").as_bytes()).unwrap();