@mercuryworkshop/epoxy-transport
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "@mercuryworkshop/epoxy-transport", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "a bare transport that implements end-to-end encryption with epoxy-tls and wisp", | ||
@@ -14,3 +14,3 @@ "main": "./dist/index.mjs", | ||
"dependencies": { | ||
"@mercuryworkshop/epoxy-tls": "^1.1.1", | ||
"@mercuryworkshop/epoxy-tls": "^1.4.1", | ||
"esbuild-plugin-umd-wrapper": "^2.0.0", | ||
@@ -17,0 +17,0 @@ "rollup": "^4.12.0", |
@@ -29,10 +29,15 @@ import { BareHeaders, BareResponse, TransferrableResponse, type BareTransport } from "@mercuryworkshop/bare-mux"; | ||
body = await body.arrayBuffer(); | ||
let payload = await this.epxclient.fetch(remote.href, { method, body, headers, redirect: "manual" }); | ||
return { | ||
body: payload.body!, | ||
headers: (payload as any).rawHeaders, | ||
status: payload.status, | ||
statusText: payload.statusText, | ||
}; | ||
try { | ||
let payload = await this.epxclient.fetch(remote.href, { method, body, headers, redirect: "manual" }); | ||
return { | ||
body: payload.body!, | ||
headers: (payload as any).rawHeaders, | ||
status: payload.status, | ||
statusText: payload.statusText, | ||
}; | ||
} catch (err) { | ||
console.error(err); | ||
throw err; | ||
} | ||
} | ||
@@ -61,5 +66,9 @@ | ||
return async (data) => { | ||
(await epsocket).send(data); | ||
if (typeof data === 'string') { | ||
(await epsocket).send_text(data); | ||
} else { | ||
(await epsocket).send_binary(data); | ||
} | ||
}; | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3391852
16205
+ Added@types/node@22.10.1(transitive)
- Removed@types/node@22.10.0(transitive)