File tree Expand file tree Collapse file tree 11 files changed +412
-24
lines changed Expand file tree Collapse file tree 11 files changed +412
-24
lines changed Original file line number Diff line number Diff line change 1- import LibcurlClient from "./curltransport" ;
2- import EpoxyTransport from "./epoxytransport" ;
3- import { config } from "./shared" ;
4-
51export type BareHeaders = Record < string , string | string [ ] > ;
62
73export type BareMeta = {
@@ -86,15 +82,10 @@ export interface BareResponseFetch extends BareResponse {
8682 finalURL : string ;
8783}
8884export class BareClient {
89- transport : BareTransport ;
9085 /**
9186 * Create a BareClient. Calls to fetch and connect will wait for an implementation to be ready.
9287 */
93- constructor ( ) {
94- this . transport = new LibcurlClient ( {
95- wisp : config . wisp ,
96- } ) ;
97- }
88+ constructor ( public transport : BareTransport ) { }
9889
9990 createWebSocket (
10091 remote : string | URL ,
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @mercuryworkshop/bare-mux-custom" ,
3+ "version" : " 1.0.0" ,
4+ "type" : " module" ,
5+ "packageManager" :
" [email protected] " ,
6+ "main" : " index.ts"
7+ }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type {
22 BareHeaders ,
33 TransferrableResponse ,
44 BareTransport ,
5- } from ". /bare-mux-custom" ;
5+ } from "@mercuryworkshop /bare-mux-custom" ;
66import initEpoxy , {
77 EpoxyClient ,
88 EpoxyClientOptions ,
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @mercuryworkshop/epoxy-transport" ,
3+ "version" : " 2.0.0" ,
4+ "description" : " a bare transport that implements end-to-end encryption with libcurl.js and wisp" ,
5+ "author" : " ading2210" ,
6+ "license" : " AGPL-3.0-only" ,
7+ "type" : " module" ,
8+ "scripts" : {
9+ "build" : " node esbuild.bundle.mjs; cp dist/index.cjs dist/index.js" ,
10+ "prepack" : " npm run build"
11+ },
12+ "dependencies" : {
13+ "@mercuryworkshop/bare-mux-custom" : " workspace:*" ,
14+ "@mercuryworkshop/epoxy-tls" : " 2.1.18-1" ,
15+ "libcurl.js" : " ^0.7.1"
16+ },
17+ "main" : " index.ts"
18+ }
Original file line number Diff line number Diff line change 1212 "license" : " ISC" ,
1313 "packageManager" :
" [email protected] " ,
1414 "dependencies" : {
15- "@mercuryworkshop/scramjet" : " link:../scramjet " ,
15+ "@mercuryworkshop/scramjet" : " workspace:* " ,
1616 "chobitsu" : " workspace:*" ,
1717 "html-to-image" : " ^1.11.13"
1818 }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type {
33 BareResponse ,
44 TransferrableResponse ,
55 BareTransport ,
6- } from ". /bare-mux-custom" ;
6+ } from "@mercuryworkshop /bare-mux-custom" ;
77import { libcurl } from "libcurl.js/bundled" ;
88export default class LibcurlClient implements BareTransport {
99 wisp : string ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @mercuryworkshop/libcurl-transport" ,
3+ "version" : " 2.0.0" ,
4+ "description" : " a bare transport that implements end-to-end encryption with libcurl.js and wisp" ,
5+ "author" : " ading2210" ,
6+ "license" : " AGPL-3.0-only" ,
7+ "type" : " module" ,
8+ "scripts" : {
9+ "build" : " node esbuild.bundle.mjs; cp dist/index.cjs dist/index.js" ,
10+ "prepack" : " npm run build"
11+ },
12+ "dependencies" : {
13+ "@mercuryworkshop/bare-mux-custom" : " workspace:*" ,
14+ "libcurl.js" : " ^0.7.1"
15+ },
16+ "main" : " index.ts"
17+ }
Original file line number Diff line number Diff line change 1212 "vite" : " ^7.1.2"
1313 },
1414 "dependencies" : {
15- "@mercuryworkshop/scramjet" : " link:.. " ,
16- "dreamland" : " link:../dreamlandjs " ,
15+ "@mercuryworkshop/scramjet" : " workspace:* " ,
16+ "dreamland" : " workspace:* " ,
1717 "monaco-editor" : " ^0.52.2" ,
1818 "vite-plugin-static-copy" : " ^3.1.1"
1919 }
Original file line number Diff line number Diff line change 8888 "@typescript-eslint/parser" : " ^8.43.0" ,
8989 "actionlint" : " ^2.0.6" ,
9090 "ava" : " ^6.4.1" ,
91+ "@mercuryworkshop/bare-mux-custom" : " workspace:*" ,
9192 "dotenv" : " ^17.2.2" ,
9293 "eslint" : " ^9.35.0" ,
9394 "fastify" : " ^5.6.0" ,
111112 "typescript" : " ^5.9.2"
112113 },
113114 "dependencies" : {
114- "@mercuryworkshop/epoxy-tls" : " 2.1.18-1" ,
115115 "dom-serializer" : " ^2.0.0" ,
116116 "domhandler" : " ^5.0.3" ,
117117 "domutils" : " ^3.2.2" ,
118118 "htmlparser2" : " 10.0.0" ,
119- "libcurl.js" : " ^0.7.2" ,
120119 "idb" : " ^8.0.3" ,
121120 "parse-domain" : " ^8.2.2" ,
122121 "set-cookie-parser" : " ^2.7.1"
You can’t perform that action at this time.
0 commit comments