@mercuryworkshop/epoxy-transport 2.1.20 → 2.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1581 -0
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/dist/module.js +1598 -0
- package/package.json +33 -34
- package/src/main.ts +2 -2
package/package.json
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
2
|
+
"name": "@mercuryworkshop/epoxy-transport",
|
|
3
|
+
"version": "2.1.21",
|
|
4
|
+
"description": "a bare transport that implements end-to-end encryption with epoxy-tls and wisp",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"license": "AGPL-3.0-only",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@mercuryworkshop/epoxy-tls": "2.1.11-1"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@mercuryworkshop/bare-mux": "^2.1.4",
|
|
15
|
+
"esbuild": "^0.24.0",
|
|
16
|
+
"esbuild-plugin-d.ts": "^1.3.1",
|
|
17
|
+
"esbuild-plugin-umd-wrapper": "^3.0.0"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"browser": {
|
|
22
|
+
"import": "./dist/index.mjs",
|
|
23
|
+
"require": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"node": {
|
|
26
|
+
"require": "./lib/index.cjs",
|
|
27
|
+
"import": "./lib/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "node esbuild.bundle.mjs"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -87,7 +87,6 @@ export default class EpoxyTransport implements BareTransport {
|
|
|
87
87
|
|
|
88
88
|
connect(
|
|
89
89
|
url: URL,
|
|
90
|
-
origin: string,
|
|
91
90
|
protocols: string[],
|
|
92
91
|
requestHeaders: BareHeaders,
|
|
93
92
|
onopen: (protocol: string) => void,
|
|
@@ -106,11 +105,12 @@ export default class EpoxyTransport implements BareTransport {
|
|
|
106
105
|
handlers,
|
|
107
106
|
url.href,
|
|
108
107
|
protocols,
|
|
109
|
-
Object.assign(
|
|
108
|
+
Object.assign(requestHeaders)
|
|
110
109
|
);
|
|
111
110
|
|
|
112
111
|
return [
|
|
113
112
|
async (data) => {
|
|
113
|
+
if (data instanceof Blob) data = await data.arrayBuffer();
|
|
114
114
|
(await ws).send(data);
|
|
115
115
|
},
|
|
116
116
|
async (code, reason) => {
|