Skip to content

Commit

Permalink
chore: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Feb 12, 2024
1 parent 1af22fe commit 06ef47a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 24 deletions.
1 change: 1 addition & 0 deletions README.md
18 changes: 8 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "undios",
"description": "Axios-style HTTP client service for Cordis",
"version": "0.1.0",
"description": "Fetch-based axios-style HTTP client",
"version": "0.1.1",
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -31,22 +31,22 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/cordiverse/cordis.git",
"directory": "packages/http"
"url": "git+https://github.com/cordiverse/undios.git",
"directory": "packages/core"
},
"bugs": {
"url": "https://github.com/cordiverse/cordis/issues"
"url": "https://github.com/cordiverse/undios/issues"
},
"homepage": "https://github.com/cordiverse/cordis",
"homepage": "https://github.com/cordiverse/undios",
"keywords": [
"cordis",
"http",
"fetch",
"axios",
"http",
"undici",
"client",
"request",
"service",
"cordis",
"plugin"
],
"devDependencies": {
Expand All @@ -59,8 +59,6 @@
"dependencies": {
"cosmokit": "^1.5.2",
"file-type": "^16.5.4",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"ws": "^8.16.0"
}
}
12 changes: 10 additions & 2 deletions packages/core/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# @cordisjs/plugin-http
# Undios

Axios-style HTTP client service for Cordis.
Fetch-based axios-style HTTP client.

> "und" comes from undici, an HTTP/1.1 client officially supported by Node.js team.
> "ios" comes from axios, a popular HTTP client for browser and Node.js.
## Features

- Browser and Node.js support
- Proxy agents (HTTP / HTTPS / SOCKS)
23 changes: 13 additions & 10 deletions packages/proxy-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "undios-proxy-agent",
"description": "Proxy agent support for undios",
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -21,30 +21,33 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/cordiverse/http.git",
"directory": "packages/socks"
"url": "git+https://github.com/cordiverse/undios.git",
"directory": "packages/proxy-agent"
},
"bugs": {
"url": "https://github.com/cordiverse/http/issues"
"url": "https://github.com/cordiverse/undios/issues"
},
"homepage": "https://github.com/cordiverse/http",
"homepage": "https://github.com/cordiverse/undios",
"keywords": [
"cordis",
"http",
"client",
"undici",
"fetch",
"axios",
"socks",
"http",
"https",
"proxy",
"agent",
"request",
"service",
"plugin",
"undici"
"cordis",
"plugin"
],
"devDependencies": {
"cordis": "^3.10.0"
},
"peerDependencies": {
"@cordisjs/plugin-http": "^0.1.0",
"undios": "^0.1.0",
"cordis": "^3.10.0"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/proxy-agent/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @cordisjs/plugin-http-socks
# undios-proxy-agent

Supports HTTP, HTTPS, and SOCKS proxy agents for [undios](https://github.com/cordiverse/undios).
2 changes: 1 addition & 1 deletion packages/proxy-agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function parseSocksURL(url: URL): ParseResult | undefined {
default: return
}

const proxy: SocksProxy = { host, port, type }
const proxy: ParseResult['proxy'] = { host, port, type }
if (url.username) proxy.userId = decodeURIComponent(url.username)
if (url.password) proxy.password = decodeURIComponent(url.password)

Expand Down

0 comments on commit 06ef47a

Please sign in to comment.