@tibame201020/queqiao-http 0.1.1 → 0.1.3
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/README.md +135 -27
- package/README.zh-TW.md +156 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -8
- package/dist/index.js.map +1 -1
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -1,48 +1,156 @@
|
|
|
1
|
-
|
|
1
|
+
# @tibame201020/queqiao-http
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](https://github.com/tibame201020/queqiao-http/blob/main/README.md) | [繁體中文](https://github.com/tibame201020/queqiao-http/blob/main/README.zh-TW.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Official curl-like HTTP extension for [Queqiao](https://github.com/tibame201020/Queqiao).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`@tibame201020/queqiao-http` gives an attached Queqiao Worker a convenient `http_request` capability for direct HTTP/HTTPS requests. The trust decision is the extension install/attach itself: the extension does **not** maintain an origin allowlist.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The implementation uses the Worker's native `fetch` directly. It does not invoke `curl`, a shell, or `child_process`.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- `http://localhost:9889`
|
|
11
|
+
## Status
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
v0.1.3 targets Queqiao 0.9.7. The canonical npm package is `@tibame201020/queqiao-http`.
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
Starting with v0.1.1, npm publication is handled by the repository's GitHub Release workflow using npm Trusted Publishing with provenance.
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Current request path:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
MCP client / LLM
|
|
21
|
+
→ Queqiao Gateway
|
|
22
|
+
→ Queqiao Worker
|
|
23
|
+
→ stable extension proxy
|
|
24
|
+
→ queqiao-http
|
|
25
|
+
→ direct HTTP/HTTPS request
|
|
26
|
+
→ target service
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Verified behavior includes:
|
|
30
|
+
|
|
31
|
+
- JSON GET/POST requests;
|
|
32
|
+
- automatic JSON request serialization and response parsing;
|
|
33
|
+
- backend HTTP 4xx responses preserved as normal HTTP responses;
|
|
34
|
+
- arbitrary HTTP/HTTPS origins, including localhost, WSL/private-network addresses, and internet origins;
|
|
35
|
+
- no public Queqiao connector manifest expansion when the extension is installed or updated.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
queqiao extension install npm:@tibame201020/queqiao-http --attach-all
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or install into the Extension Hub first and attach a selected Worker later:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
queqiao extension install npm:@tibame201020/queqiao-http
|
|
47
|
+
queqiao extension attach dev.queqiao.http --worker windows
|
|
22
48
|
```
|
|
23
49
|
|
|
50
|
+
`attach` is activation.
|
|
51
|
+
|
|
52
|
+
## Network authority
|
|
53
|
+
|
|
54
|
+
There is no per-origin grant list in `queqiao-http`.
|
|
55
|
+
|
|
56
|
+
Installing and attaching this extension is the explicit authorization for it to issue HTTP/HTTPS requests from the Worker. This is intentional: the extension is meant to be a convenient curl-like network capability, not a service-specific adapter.
|
|
57
|
+
|
|
58
|
+
The package manifest therefore declares no managed-runtime HTTP origins:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"runtime": {
|
|
63
|
+
"processes": { "allow": [] },
|
|
64
|
+
"outboundHttp": { "allowOrigins": [] }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The empty `allowOrigins` list is intentional because v0.1.3 no longer routes requests through `context.runtime.http.request()`.
|
|
70
|
+
|
|
24
71
|
## Capability
|
|
25
72
|
|
|
26
|
-
`
|
|
73
|
+
`queqiao-http` registers one capability: `http_request`.
|
|
74
|
+
|
|
75
|
+
Input fields:
|
|
76
|
+
|
|
77
|
+
- `workspaceId` — selected Queqiao Workspace;
|
|
78
|
+
- `url` — full HTTP or HTTPS URL;
|
|
79
|
+
- `method` — `GET | POST | PUT | PATCH | DELETE | HEAD`, default `GET`;
|
|
80
|
+
- `headers` — optional string header map;
|
|
81
|
+
- `body` — optional raw string body;
|
|
82
|
+
- `json` — optional JSON value, mutually exclusive with `body`;
|
|
83
|
+
- `timeoutMs` — `100` to `120000`, default `30000`.
|
|
84
|
+
|
|
85
|
+
When `json` is supplied, the extension serializes it and adds `content-type: application/json` unless the caller already supplied a Content-Type header.
|
|
86
|
+
|
|
87
|
+
### Example
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"workspaceId": "codes",
|
|
92
|
+
"operation": "call",
|
|
93
|
+
"extensionId": "dev.queqiao.http",
|
|
94
|
+
"capability": "http_request",
|
|
95
|
+
"arguments": {
|
|
96
|
+
"url": "http://172.31.39.34:9889/api/meal/types",
|
|
97
|
+
"method": "GET"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Response contract
|
|
103
|
+
|
|
104
|
+
Non-2xx status codes remain ordinary downstream HTTP responses:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"status": 200,
|
|
109
|
+
"headers": { "content-type": "application/json" },
|
|
110
|
+
"body": "{\"ok\":true}",
|
|
111
|
+
"json": { "ok": true }
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`json` is included only when the response body is JSON. `body` preserves the response text.
|
|
27
116
|
|
|
28
|
-
|
|
29
|
-
- `url`
|
|
30
|
-
- `method`: `GET | POST | PUT | PATCH | DELETE | HEAD` (default `GET`)
|
|
31
|
-
- `headers` (optional)
|
|
32
|
-
- `body` or `json` (mutually exclusive)
|
|
33
|
-
- `timeoutMs` (100-120000, default 30000)
|
|
117
|
+
## Trust boundary
|
|
34
118
|
|
|
35
|
-
|
|
119
|
+
Queqiao extensions are trusted plugin code. Installing and attaching `queqiao-http` grants this extension open-world HTTP/HTTPS network authority from that Worker.
|
|
120
|
+
|
|
121
|
+
Queqiao remains authoritative for package installation/attachment, Extension contract validation, Gateway → Worker routing, and ExtensionHost lifecycle. The extension validates request shape, restricts the URL scheme to HTTP/HTTPS, applies the caller timeout, performs direct `fetch`, and normalizes the response.
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
process allowlist: empty
|
|
125
|
+
shell access: none
|
|
126
|
+
curl execution: none
|
|
127
|
+
child_process: none
|
|
128
|
+
origin allowlist: none
|
|
129
|
+
direct global fetch: yes
|
|
130
|
+
risk: execute
|
|
131
|
+
openWorldHint: true
|
|
132
|
+
```
|
|
36
133
|
|
|
37
134
|
## Development
|
|
38
135
|
|
|
39
|
-
```
|
|
40
|
-
npm
|
|
41
|
-
npm run typecheck
|
|
42
|
-
npm run build
|
|
136
|
+
```bash
|
|
137
|
+
npm ci
|
|
43
138
|
npm run check
|
|
139
|
+
npm pack --ignore-scripts --dry-run
|
|
44
140
|
```
|
|
45
141
|
|
|
46
|
-
##
|
|
142
|
+
## Releasing
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
main CI passes
|
|
146
|
+
→ tag v<package-version>
|
|
147
|
+
→ publish matching GitHub Release
|
|
148
|
+
→ Publish npm workflow
|
|
149
|
+
→ npm Trusted Publishing + provenance
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
See [`docs/releasing.md`](docs/releasing.md).
|
|
153
|
+
|
|
154
|
+
## License
|
|
47
155
|
|
|
48
|
-
|
|
156
|
+
MIT
|
package/README.zh-TW.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# @tibame201020/queqiao-http
|
|
2
|
+
|
|
3
|
+
[English](https://github.com/tibame201020/queqiao-http/blob/main/README.md) | [繁體中文](https://github.com/tibame201020/queqiao-http/blob/main/README.zh-TW.md)
|
|
4
|
+
|
|
5
|
+
[Queqiao](https://github.com/tibame201020/Queqiao) 的官方 curl-like HTTP extension。
|
|
6
|
+
|
|
7
|
+
`@tibame201020/queqiao-http` 讓已 attach 的 Queqiao Worker 取得方便的 `http_request` 能力,可直接發送 HTTP/HTTPS request。**安裝/attach extension 本身就是信任決策**;extension 不再維護 origin allowlist。
|
|
8
|
+
|
|
9
|
+
底層直接使用 Worker 執行環境的 native `fetch`,不執行 `curl`、shell 或 `child_process`。
|
|
10
|
+
|
|
11
|
+
## 狀態
|
|
12
|
+
|
|
13
|
+
v0.1.3 對應 Queqiao 0.9.7。Canonical npm package 為 `@tibame201020/queqiao-http`。
|
|
14
|
+
|
|
15
|
+
自 v0.1.1 起,npm 發布由 GitHub Release workflow 透過 npm Trusted Publishing + provenance 自動處理。
|
|
16
|
+
|
|
17
|
+
目前 request path:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
MCP client / LLM
|
|
21
|
+
→ Queqiao Gateway
|
|
22
|
+
→ Queqiao Worker
|
|
23
|
+
→ stable extension proxy
|
|
24
|
+
→ queqiao-http
|
|
25
|
+
→ direct HTTP/HTTPS request
|
|
26
|
+
→ target service
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
已驗證行為包括:
|
|
30
|
+
|
|
31
|
+
- JSON GET/POST request;
|
|
32
|
+
- JSON request 自動 serialize、JSON response 自動 parse;
|
|
33
|
+
- backend HTTP 4xx 保留為正常 HTTP response;
|
|
34
|
+
- 可呼叫任意 HTTP/HTTPS origin,包括 localhost、WSL/private-network IP 與網際網路 origin;
|
|
35
|
+
- 安裝或更新 extension 不會擴張 Queqiao 公開 connector manifest。
|
|
36
|
+
|
|
37
|
+
## 安裝
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
queqiao extension install npm:@tibame201020/queqiao-http --attach-all
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
或先安裝到 Extension Hub,再 attach 到指定 Worker:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
queqiao extension install npm:@tibame201020/queqiao-http
|
|
47
|
+
queqiao extension attach dev.queqiao.http --worker windows
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`attach` 即 activation。
|
|
51
|
+
|
|
52
|
+
## Network authority
|
|
53
|
+
|
|
54
|
+
`queqiao-http` 不再有 per-origin grant list。
|
|
55
|
+
|
|
56
|
+
安裝並 attach 此 extension,即明確授權它從 Worker 發送 HTTP/HTTPS request。這是刻意設計:此 extension 的定位是方便的 curl-like network capability,而不是綁定某個服務的 adapter。
|
|
57
|
+
|
|
58
|
+
Package manifest 因此不宣告 managed-runtime HTTP origin:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"runtime": {
|
|
63
|
+
"processes": { "allow": [] },
|
|
64
|
+
"outboundHttp": { "allowOrigins": [] }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`allowOrigins` 為空是刻意的,因為 v0.1.3 已不再透過 `context.runtime.http.request()` 發送 request。
|
|
70
|
+
|
|
71
|
+
## Capability
|
|
72
|
+
|
|
73
|
+
`queqiao-http` 只註冊一個 capability:`http_request`。
|
|
74
|
+
|
|
75
|
+
輸入欄位:
|
|
76
|
+
|
|
77
|
+
- `workspaceId` — 選定的 Queqiao Workspace;
|
|
78
|
+
- `url` — 完整 HTTP 或 HTTPS URL;
|
|
79
|
+
- `method` — `GET | POST | PUT | PATCH | DELETE | HEAD`,預設 `GET`;
|
|
80
|
+
- `headers` — optional string header map;
|
|
81
|
+
- `body` — optional raw string body;
|
|
82
|
+
- `json` — optional JSON value,與 `body` 互斥;
|
|
83
|
+
- `timeoutMs` — `100` 到 `120000`,預設 `30000`。
|
|
84
|
+
|
|
85
|
+
提供 `json` 時,extension 會自動 serialize,且 caller 未提供 Content-Type 時會補上 `content-type: application/json`。
|
|
86
|
+
|
|
87
|
+
### 範例
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"workspaceId": "codes",
|
|
92
|
+
"operation": "call",
|
|
93
|
+
"extensionId": "dev.queqiao.http",
|
|
94
|
+
"capability": "http_request",
|
|
95
|
+
"arguments": {
|
|
96
|
+
"url": "http://172.31.39.34:9889/api/meal/types",
|
|
97
|
+
"method": "GET"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Response contract
|
|
103
|
+
|
|
104
|
+
非 2xx status 會保留為普通 downstream HTTP response:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"status": 200,
|
|
109
|
+
"headers": { "content-type": "application/json" },
|
|
110
|
+
"body": "{\"ok\":true}",
|
|
111
|
+
"json": { "ok": true }
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
只有 response body 能成功 parse 為 JSON 時才提供 `json`;`body` 保留文字 response。
|
|
116
|
+
|
|
117
|
+
## 信任邊界
|
|
118
|
+
|
|
119
|
+
Queqiao extension 屬於 trusted plugin code。安裝並 attach `queqiao-http`,代表授權此 extension 從該 Worker 對外發送 open-world HTTP/HTTPS request。
|
|
120
|
+
|
|
121
|
+
Queqiao 仍負責 package install/attach、Extension contract validation、Gateway → Worker routing 與 ExtensionHost lifecycle。Extension 本身負責 request schema、限制 URL scheme 為 HTTP/HTTPS、timeout、直接 `fetch` 與 response normalize。
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
process allowlist: empty
|
|
125
|
+
shell access: none
|
|
126
|
+
curl execution: none
|
|
127
|
+
child_process: none
|
|
128
|
+
origin allowlist: none
|
|
129
|
+
direct global fetch: yes
|
|
130
|
+
risk: execute
|
|
131
|
+
openWorldHint: true
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 開發
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npm ci
|
|
138
|
+
npm run check
|
|
139
|
+
npm pack --ignore-scripts --dry-run
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 發布
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
main CI passes
|
|
146
|
+
→ tag v<package-version>
|
|
147
|
+
→ publish matching GitHub Release
|
|
148
|
+
→ Publish npm workflow
|
|
149
|
+
→ npm Trusted Publishing + provenance
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
另見 [`docs/releasing.md`](docs/releasing.md)。
|
|
153
|
+
|
|
154
|
+
## 授權
|
|
155
|
+
|
|
156
|
+
MIT
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAEV,cAAc,EACd,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAQzC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;iBAYpC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAEV,cAAc,EACd,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAQzC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;iBAYpC,CAAC;AAkCH,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,sBAAsB,CAmD1E,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;CAUqC,CAAC;eAEtC,SAAS"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const EXTENSION_ID = "dev.queqiao.http";
|
|
3
|
-
const EXTENSION_VERSION = "0.1.
|
|
3
|
+
const EXTENSION_VERSION = "0.1.3";
|
|
4
4
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
5
5
|
const headersSchema = z.record(z.string().min(1).max(256), z.string().max(8192));
|
|
6
6
|
export const HTTP_REQUEST_INPUT_SCHEMA = z.object({
|
|
@@ -38,10 +38,17 @@ function maybeParseJson(body, headers) {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
function validateHttpUrl(value) {
|
|
42
|
+
const url = new URL(value);
|
|
43
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
44
|
+
throw new Error("url must use http or https");
|
|
45
|
+
}
|
|
46
|
+
return url;
|
|
47
|
+
}
|
|
41
48
|
export const HTTP_REQUEST_DEFINITION = {
|
|
42
49
|
name: "http_request",
|
|
43
50
|
title: "HTTP request",
|
|
44
|
-
description: "Send one
|
|
51
|
+
description: "Send one direct HTTP/HTTPS request from the trusted Worker extension without an origin allowlist.",
|
|
45
52
|
inputSchema: HTTP_REQUEST_INPUT_SCHEMA,
|
|
46
53
|
requiredCapabilities: [],
|
|
47
54
|
risk: "execute",
|
|
@@ -51,8 +58,9 @@ export const HTTP_REQUEST_DEFINITION = {
|
|
|
51
58
|
openWorldHint: true,
|
|
52
59
|
idempotentHint: false,
|
|
53
60
|
},
|
|
54
|
-
async execute(input
|
|
61
|
+
async execute(input) {
|
|
55
62
|
const parsed = HTTP_REQUEST_INPUT_SCHEMA.parse(input);
|
|
63
|
+
validateHttpUrl(parsed.url);
|
|
56
64
|
const headers = parsed.headers ? { ...parsed.headers } : undefined;
|
|
57
65
|
let body = parsed.body;
|
|
58
66
|
if (parsed.json !== undefined) {
|
|
@@ -66,17 +74,24 @@ export const HTTP_REQUEST_DEFINITION = {
|
|
|
66
74
|
? { "content-type": "application/json" }
|
|
67
75
|
: headers;
|
|
68
76
|
const request = {
|
|
69
|
-
url: parsed.url,
|
|
70
77
|
method: parsed.method,
|
|
71
|
-
|
|
78
|
+
signal: AbortSignal.timeout(parsed.timeoutMs),
|
|
79
|
+
redirect: "follow",
|
|
72
80
|
};
|
|
73
81
|
if (requestHeaders !== undefined)
|
|
74
82
|
request.headers = requestHeaders;
|
|
75
83
|
if (body !== undefined)
|
|
76
84
|
request.body = body;
|
|
77
|
-
const response = await
|
|
78
|
-
const
|
|
79
|
-
|
|
85
|
+
const response = await fetch(parsed.url, request);
|
|
86
|
+
const responseHeaders = Object.fromEntries(response.headers.entries());
|
|
87
|
+
const responseBody = parsed.method === "HEAD" ? "" : await response.text();
|
|
88
|
+
const json = maybeParseJson(responseBody, responseHeaders);
|
|
89
|
+
const normalized = {
|
|
90
|
+
status: response.status,
|
|
91
|
+
headers: responseHeaders,
|
|
92
|
+
body: responseBody,
|
|
93
|
+
};
|
|
94
|
+
return json === undefined ? normalized : { ...normalized, json };
|
|
80
95
|
},
|
|
81
96
|
};
|
|
82
97
|
const extension = {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,MAAM,YAAY,GAAG,kBAAkB,CAAC;AACxC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAClC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAEjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI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,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC3E,MAAM,IAAI,GAAG,cAAc,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAG;YACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,OAAO,EAAE,eAAe;YACxB,IAAI,EAAE,YAAY;SACnB,CAAC;QACF,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,CAAC;IACnE,CAAC;CACF,CAAC;AAEF,MAAM,SAAS,GAAG;IAChB,QAAQ,EAAE;QACR,EAAE,EAAE,YAAY;QAChB,OAAO,EAAE,iBAAiB;QAC1B,WAAW,EAAE,cAAc;QAC3B,qBAAqB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;KACtD;IACD,QAAQ,CAAC,GAAG;QACV,GAAG,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;IAC5C,CAAC;CACiD,CAAC;AAErD,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tibame201020/queqiao-http",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Trusted curl-like HTTP extension for Queqiao",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist/",
|
|
17
17
|
"README.md",
|
|
18
|
+
"README.zh-TW.md",
|
|
18
19
|
"LICENSE"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"module": "./dist/index.js",
|
|
43
44
|
"manifest": {
|
|
44
45
|
"id": "dev.queqiao.http",
|
|
45
|
-
"version": "0.1.
|
|
46
|
+
"version": "0.1.3",
|
|
46
47
|
"displayName": "Queqiao HTTP",
|
|
47
48
|
"host": {
|
|
48
49
|
"kind": "worker"
|
|
@@ -57,10 +58,7 @@
|
|
|
57
58
|
"allow": []
|
|
58
59
|
},
|
|
59
60
|
"outboundHttp": {
|
|
60
|
-
"allowOrigins": [
|
|
61
|
-
"http://127.0.0.1:9889",
|
|
62
|
-
"http://localhost:9889"
|
|
63
|
-
]
|
|
61
|
+
"allowOrigins": []
|
|
64
62
|
}
|
|
65
63
|
},
|
|
66
64
|
"contributions": [
|
|
@@ -69,7 +67,7 @@
|
|
|
69
67
|
"tool": "http_request",
|
|
70
68
|
"visibility": "public",
|
|
71
69
|
"title": "HTTP request",
|
|
72
|
-
"description": "Send one
|
|
70
|
+
"description": "Send one direct HTTP/HTTPS request from the trusted Worker extension without an origin allowlist.",
|
|
73
71
|
"inputSchema": {
|
|
74
72
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
75
73
|
"type": "object",
|