@arcjet/transport
Advanced tools
+5
-5
| { | ||
| "name": "@arcjet/transport", | ||
| "version": "1.3.0", | ||
| "version": "1.3.1", | ||
| "description": "Transport mechanisms for the Arcjet protocol", | ||
@@ -63,7 +63,7 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "@arcjet/eslint-config": "1.3.0", | ||
| "@arcjet/rollup-config": "1.3.0", | ||
| "@rollup/wasm-node": "4.57.1", | ||
| "@arcjet/eslint-config": "1.3.1", | ||
| "@arcjet/rollup-config": "1.3.1", | ||
| "@rollup/wasm-node": "4.59.0", | ||
| "@types/node": "24.11.0", | ||
| "eslint": "9.39.2", | ||
| "eslint": "9.39.3", | ||
| "typescript": "5.9.3" | ||
@@ -70,0 +70,0 @@ }, |
+32
-1
@@ -0,1 +1,3 @@ | ||
| <!-- trunk-ignore-all(markdownlint/MD001) --> | ||
| <a href="https://arcjet.com" target="_arcjet-home"> | ||
@@ -43,3 +45,3 @@ <picture> | ||
| ## Example | ||
| ## Use | ||
@@ -53,2 +55,28 @@ ```ts | ||
| ## API | ||
| This package exports the identifier | ||
| [`createTransport`][api-create-transport]. | ||
| There is no default export. | ||
| This package exports no [TypeScript][] types. | ||
| ### `createTransport(baseUrl)` | ||
| Creates a transport that talks over HTTP/2 using | ||
| `@connectrpc/connect-node`. This is a thin wrapper around | ||
| [`createConnectTransport`][connect-create-transport]. | ||
| Alternative entry points exist for Bun, Edge Light, and `workerd` that use | ||
| `@connectrpc/connect-web` instead. | ||
| ###### Parameters | ||
| - `baseUrl` (`string`, example: `https://example.com/my-api`) | ||
| — the base URL for all HTTP requests | ||
| ###### Returns | ||
| A Connect transport that you can pass to `createClient` from | ||
| `@arcjet/protocol`. | ||
| ## License | ||
@@ -59,3 +87,6 @@ | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 | ||
| [api-create-transport]: #createtransportbaseurl | ||
| [arcjet]: https://arcjet.com | ||
| [arcjet-get-started]: https://docs.arcjet.com/get-started | ||
| [connect-create-transport]: https://connectrpc.com/docs/web/choosing-a-protocol/ | ||
| [typescript]: https://www.typescriptlang.org/ |
20178
4.7%90
52.54%