New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mercuryworkshop/bare-mux

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mercuryworkshop/bare-mux - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

4

dist/client.d.ts

@@ -60,4 +60,4 @@ import { BareHeaders } from './baretypes';

getTransport(): Promise<string>;
setTransport(path: string, options: any[]): Promise<void>;
setManualTransport(functionBody: string): Promise<void>;
setTransport(path: string, options: any[], transferables?: Transferable[]): Promise<void>;
setManualTransport(functionBody: string, options: any[], transferables?: Transferable[]): Promise<void>;
getInnerPort(): MessagePort | Promise<MessagePort>;

@@ -64,0 +64,0 @@ }

@@ -17,3 +17,6 @@ import { BareHeaders, TransferrableResponse } from "./baretypes";

};
client?: string;
client?: {
function: string;
args: any[];
};
};

@@ -20,0 +23,0 @@ export type WorkerRequest = {

@@ -199,13 +199,16 @@ (function (global, factory) {

}
async setTransport(path, options) {
async setTransport(path, options, transferables) {
await this.setManualTransport(`
const { default: BareTransport } = await import("${path}");
return [new BareTransport(${options.map(x => JSON.stringify(x)).join(", ")}), "${path}"];
`);
return [BareTransport, "${path}"];
`, options, transferables);
}
async setManualTransport(functionBody) {
async setManualTransport(functionBody, options, transferables) {
await this.worker.sendMessage({
type: "set",
client: functionBody,
});
client: {
function: functionBody,
args: options,
},
}, transferables);
}

@@ -212,0 +215,0 @@ getInnerPort() {

@@ -50,5 +50,5 @@ (function () {

// @ts-expect-error
const func = new AsyncFunction(message.client);
const func = new AsyncFunction(message.client.function);
const [newTransport, name] = await func();
currentTransport = newTransport;
currentTransport = new newTransport(...message.client.args);
currentTransportName = name;

@@ -55,0 +55,0 @@ console.log("set transport to ", currentTransport, name);

{
"name": "@mercuryworkshop/bare-mux",
"version": "2.0.2",
"version": "2.0.3",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc