@tool-bridge/server 0.20.0 → 0.21.0
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/{airtable-ZNWHIJMO.js → airtable-DMJEEGJP.js} +19 -16
- package/dist/{alt_text_generator_ai-X7RMDDM5.js → alt_text_generator_ai-RELFQ5FV.js} +4 -4
- package/dist/{amap-3VER75VH.js → amap-YSYEACKQ.js} +4 -4
- package/dist/{anthropic-N7NTB3UC.js → anthropic-D5X5GSYE.js} +23 -25
- package/dist/{apify-JB5P5AJI.js → apify-5NVFU3IZ.js} +20 -19
- package/dist/{brave_search-USL5OOBS.js → brave_search-X557FMGO.js} +16 -14
- package/dist/chunk-JEWFX6Z6.js +71 -0
- package/dist/{chunk-RVUERWUZ.js → chunk-MDY7K5CX.js} +748 -788
- package/dist/{chunk-WIGQCP6O.js → chunk-MZCIPUNQ.js} +141 -176
- package/dist/{chunk-6X55ALDX.js → chunk-Q74GLIDK.js} +3 -3
- package/dist/{chunk-6ANLYNFB.js → chunk-QR4LK3HF.js} +1 -1
- package/dist/{chunk-3WL6EXYX.js → chunk-ZTTN6AJG.js} +1 -1
- package/dist/{circleci-LBGB25LP.js → circleci-3P3QTUX2.js} +20 -24
- package/dist/{clerk-6RX37CNZ.js → clerk-GNMZQ2MY.js} +22 -21
- package/dist/{cloudflare_dns-NQGW7FHV.js → cloudflare_dns-VWZH3ZTR.js} +21 -17
- package/dist/{cohere-XPC2NAEW.js → cohere-C7QVIIMG.js} +19 -17
- package/dist/{confluence-ZUG2LT5A.js → confluence-52I37IUT.js} +16 -11
- package/dist/{convertapi-ZLXKWV3L.js → convertapi-3TRJ3WEO.js} +3 -3
- package/dist/{currencyapi-T3A3HSOD.js → currencyapi-LWEANWVI.js} +23 -26
- package/dist/{deepseek-NJMOD23E.js → deepseek-5U24YG4P.js} +27 -17
- package/dist/{docker_hub-D2MQCSJ7.js → docker_hub-CMISLRSE.js} +4 -4
- package/dist/{dropbox-MI6U3SOT.js → dropbox-TW4QN6FT.js} +9 -8
- package/dist/{dub-P2BYBYV4.js → dub-EFXGI5UH.js} +22 -19
- package/dist/{e2b-BGKIAE54.js → e2b-PHM63OVF.js} +20 -20
- package/dist/{exa-EUY7VV4C.js → exa-DYOQWURR.js} +22 -25
- package/dist/{fal_ai-AAOG5FYJ.js → fal_ai-VJPMCNRH.js} +18 -17
- package/dist/{feishu-AN5IJYOW.js → feishu-TFIZXPIN.js} +2 -2
- package/dist/{feishu_custom_bot-BWGMNVXF.js → feishu_custom_bot-ADSE23KU.js} +3 -3
- package/dist/{figma-SJSWYCGD.js → figma-4AK47AYY.js} +21 -23
- package/dist/{firehydrant-MOXK2PST.js → firehydrant-RGPTW4EA.js} +15 -15
- package/dist/{fixer-ISIDUDZU.js → fixer-OAMF4DKP.js} +4 -4
- package/dist/{fly-U4KPSGBF.js → fly-YB4AQD4O.js} +20 -16
- package/dist/{front-ZHM2YX2E.js → front-6GTVYKUM.js} +20 -23
- package/dist/{geocodio-SVCCAXAV.js → geocodio-YRT4K25M.js} +4 -4
- package/dist/{ghost-INTR7FIY.js → ghost-JCW6UIP2.js} +4 -4
- package/dist/{github-T275VVWR.js → github-CEGVRMNX.js} +28 -27
- package/dist/{gmail-KSSPOE67.js → gmail-JCMJD55P.js} +17 -17
- package/dist/{googlecalendar-JB5RW27L.js → googlecalendar-2EAW4MNM.js} +16 -14
- package/dist/{googledocs-G522PUGW.js → googledocs-YNKKBM6Q.js} +3 -3
- package/dist/{grafana-44ZPIV5P.js → grafana-353VSGXN.js} +24 -25
- package/dist/{graphhopper-2MORXLOW.js → graphhopper-H3IVJNDS.js} +4 -4
- package/dist/index.d.ts +31 -30
- package/dist/index.js +3 -3
- package/dist/{ip2proxy-R4K4KEMI.js → ip2proxy-DBGRWH7S.js} +4 -4
- package/dist/{ipgeolocation_io-H4J55OGI.js → ipgeolocation_io-5I2BDVMG.js} +4 -4
- package/dist/{ipqualityscore-XGID4OHA.js → ipqualityscore-ILV7TQCV.js} +4 -4
- package/dist/{jina_ai-7ZVDOR3Z.js → jina_ai-L5BH455V.js} +20 -21
- package/dist/{jira-CTIYZTT3.js → jira-IGTILUZA.js} +20 -16
- package/dist/{langsmith-ISP567FS.js → langsmith-BYRX4AOF.js} +25 -25
- package/dist/{lemlist-OGKK272F.js → lemlist-ZGNYTIQO.js} +23 -24
- package/dist/{linear-6JX4E3JI.js → linear-HLGOWISN.js} +3 -3
- package/dist/{logsnag-BVB36ZCL.js → logsnag-5RGTMTU2.js} +20 -22
- package/dist/main.js +102 -102
- package/dist/{mattermost-UECVPZGY.js → mattermost-BONGXVC7.js} +21 -17
- package/dist/{mem0-EUA7S2OO.js → mem0-RUVNUPTE.js} +15 -15
- package/dist/{memos-BYSBJRWZ.js → memos-TED4HI54.js} +36 -32
- package/dist/{metabase-4JXZH3YG.js → metabase-ZHXHRHZK.js} +22 -18
- package/dist/{mistral_ai-2C5BTBKW.js → mistral_ai-NGP5SHU7.js} +24 -21
- package/dist/{mother_duck-ZGNNNR3X.js → mother_duck-TKVQM35M.js} +23 -19
- package/dist/{ngrok-NTPGMRXI.js → ngrok-BYCUJ7QV.js} +17 -22
- package/dist/{notes-KGYXX6N6.js → notes-KXRNNYDW.js} +1 -1
- package/dist/{notion-EX3X2G7G.js → notion-2ILYKJOO.js} +20 -17
- package/dist/{open_exchange_rates-2V2LIGPS.js → open_exchange_rates-JU4DC6HZ.js} +4 -4
- package/dist/{openai-KQFQPK7Z.js → openai-6SOT26ZK.js} +22 -16
- package/dist/{opengraph_io-B63SEYJY.js → opengraph_io-ZEFHV2OL.js} +4 -4
- package/dist/{openrouter-62A4H62Q.js → openrouter-R4P7JL5L.js} +19 -14
- package/dist/{outline-QC33XLCK.js → outline-VCTQ5V2X.js} +18 -20
- package/dist/{paddle-HDZG35Y7.js → paddle-AZOAKBJS.js} +17 -15
- package/dist/{perplexity-M7LOMJWA.js → perplexity-OMRLGVAT.js} +19 -23
- package/dist/{pinecone-Y7YCJRZM.js → pinecone-DI62W3ZX.js} +19 -24
- package/dist/{pipedrive-FLJA62UX.js → pipedrive-CW7HONYW.js} +22 -23
- package/dist/{polar-AE55Q425.js → polar-5DRGTXNR.js} +19 -17
- package/dist/{posthog-IAY5D3YW.js → posthog-3DTHFCKE.js} +29 -24
- package/dist/{postmark-NMKAXDXZ.js → postmark-ME2V2XXI.js} +19 -17
- package/dist/{prerender-CDJM7I7N.js → prerender-5EAY7GDM.js} +4 -4
- package/dist/{pubmed-N437ZJOR.js → pubmed-GRQUBGVA.js} +3 -3
- package/dist/{railway-NBWYXCUM.js → railway-FTM75TMX.js} +3 -3
- package/dist/{readwise-QRO3UC3R.js → readwise-IJQGV6IQ.js} +16 -15
- package/dist/{render-NEW7SROG.js → render-TMSPHRTY.js} +21 -20
- package/dist/{replicate-73YQLRTY.js → replicate-RJCMDB7H.js} +20 -21
- package/dist/{resend-R5BAZFHZ.js → resend-YYN22NIL.js} +15 -11
- package/dist/{rootly-5BLALPCS.js → rootly-7RXE4K7L.js} +19 -18
- package/dist/{scrapfly-EHFLNNUZ.js → scrapfly-ZJJ6XM4Q.js} +4 -4
- package/dist/{scrapingbee-UXLYS72S.js → scrapingbee-QNGEOD6D.js} +4 -4
- package/dist/{screenshot_fyi-KC3NLTJ6.js → screenshot_fyi-SPZAABVD.js} +4 -4
- package/dist/{semantic_scholar-SA5OIUWA.js → semantic_scholar-SDPVGDDI.js} +21 -20
- package/dist/{sentry-BAE3XLJN.js → sentry-SJ5NN4C4.js} +22 -19
- package/dist/{shodan-FJR6MKKW.js → shodan-YMGOY7KW.js} +4 -4
- package/dist/{shopify-7OA6SLN5.js → shopify-SU5ABP54.js} +23 -19
- package/dist/{stripe-MUWDZGGF.js → stripe-JAC425KE.js} +3 -3
- package/dist/{supabase-SWWGNWYR.js → supabase-GQ2OFVIL.js} +18 -17
- package/dist/{tavily-XQNJ5EDI.js → tavily-Y7MDA5CI.js} +20 -20
- package/dist/{telegram-RR6JPZOG.js → telegram-OIDT3ZLH.js} +4 -4
- package/dist/{telnyx-7PKXOWSO.js → telnyx-4JGMC3K7.js} +19 -19
- package/dist/{todoist-63X5IUJE.js → todoist-O7S2OUGX.js} +18 -17
- package/dist/{trello-MOG63DAI.js → trello-3LDE4TAQ.js} +4 -4
- package/dist/{turso-ENWTSHDL.js → turso-MUQ44KCA.js} +23 -30
- package/dist/{twilio-FDXUN7VX.js → twilio-VYF3HUU6.js} +3 -3
- package/dist/{umami-TM7PROWF.js → umami-SVQIK26J.js} +23 -28
- package/dist/{unsplash-NWXLKSOW.js → unsplash-333XYDCJ.js} +19 -18
- package/dist/{upstash_redis-CUTQ5L2N.js → upstash_redis-IUM2HDLU.js} +17 -13
- package/dist/{uptimerobot-NNO32M3I.js → uptimerobot-7ZRU2NJV.js} +3 -3
- package/dist/{v2ex-24KMSWS7.js → v2ex-AVSJCQPS.js} +35 -18
- package/dist/{vercel-B45LPF6I.js → vercel-J7RGXNSA.js} +21 -18
- package/dist/{wolfram_alpha_api-DKJWVR6G.js → wolfram_alpha_api-6CRVUZOJ.js} +4 -4
- package/dist/{wordpress-XYFSDZXY.js → wordpress-THOJLPKA.js} +21 -17
- package/dist/{workos-BEM7EPHM.js → workos-ENTGRWF2.js} +26 -27
- package/dist/{zhihu-CFHZ4NC7.js → zhihu-W2BXICTX.js} +21 -21
- package/package.json +5 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -9,20 +10,18 @@ import {
|
|
|
9
10
|
} from "./chunk-JXHMDBAY.js";
|
|
10
11
|
import {
|
|
11
12
|
createProviderPlugin,
|
|
12
|
-
requireApiKey,
|
|
13
13
|
upstreamError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-QR4LK3HF.js";
|
|
15
|
+
import "./chunk-ZTTN6AJG.js";
|
|
16
16
|
import {
|
|
17
17
|
TBError,
|
|
18
18
|
external_exports
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
20
20
|
import "./chunk-U67V476Y.js";
|
|
21
21
|
|
|
22
22
|
// ../plugins/src/dub/api.ts
|
|
23
23
|
var SERVICE = "dub";
|
|
24
24
|
var API_BASE = "https://api.dub.co";
|
|
25
|
-
var http = createProviderHttpClient({ baseUrl: API_BASE, service: SERVICE });
|
|
26
25
|
var LINKS_PATH = "/links";
|
|
27
26
|
var LINKS_INFO_PATH = "/links/info";
|
|
28
27
|
var LINKS_COUNT_PATH = "/links/count";
|
|
@@ -41,23 +40,27 @@ function errorMessage(payload) {
|
|
|
41
40
|
if (object === void 0) return void 0;
|
|
42
41
|
return trimmedText(asJsonObject(object.error)?.message) ?? trimmedText(object.message) ?? trimmedText(object.error);
|
|
43
42
|
}
|
|
43
|
+
var http = createAuthedClient({
|
|
44
|
+
baseUrl: API_BASE,
|
|
45
|
+
service: SERVICE,
|
|
46
|
+
auth: { kind: "bearer" },
|
|
47
|
+
headers: { accept: "application/json" },
|
|
48
|
+
mapError: ({ data: payload, status, statusText }) => upstreamError(
|
|
49
|
+
status,
|
|
50
|
+
errorMessage(payload) ?? (statusText || `dub \u8FD4\u56DE HTTP ${status}`)
|
|
51
|
+
),
|
|
52
|
+
mapTransportError: ({ message }) => upstreamError(
|
|
53
|
+
502,
|
|
54
|
+
message === void 0 ? "dub \u8BF7\u6C42\u5931\u8D25" : `dub \u8BF7\u6C42\u5931\u8D25: ${message}`
|
|
55
|
+
)
|
|
56
|
+
});
|
|
44
57
|
async function request(ctx, path, input) {
|
|
45
|
-
const
|
|
46
|
-
const { bodyKind, data } = await http.request({
|
|
58
|
+
const { bodyKind, data } = await http.request(ctx, {
|
|
47
59
|
path,
|
|
48
60
|
method: input.method,
|
|
49
61
|
query: providerQuery(input.query ?? {}),
|
|
50
|
-
headers: { accept: "application/json", authorization: `Bearer ${apiKey}` },
|
|
51
62
|
...input.body === void 0 ? {} : { json: input.body },
|
|
52
|
-
invalidJson: "text"
|
|
53
|
-
mapError: ({ data: payload, status, statusText }) => upstreamError(
|
|
54
|
-
status,
|
|
55
|
-
errorMessage(payload) ?? (statusText || `dub \u8FD4\u56DE HTTP ${status}`)
|
|
56
|
-
),
|
|
57
|
-
mapTransportError: ({ message }) => upstreamError(
|
|
58
|
-
502,
|
|
59
|
-
message === void 0 ? "dub \u8BF7\u6C42\u5931\u8D25" : `dub \u8BF7\u6C42\u5931\u8D25: ${message}`
|
|
60
|
-
)
|
|
63
|
+
invalidJson: "text"
|
|
61
64
|
});
|
|
62
65
|
return bodyKind === "empty" ? null : data;
|
|
63
66
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -8,21 +9,31 @@ import {
|
|
|
8
9
|
} from "./chunk-JXHMDBAY.js";
|
|
9
10
|
import {
|
|
10
11
|
createProviderPlugin,
|
|
11
|
-
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-QR4LK3HF.js";
|
|
14
|
+
import "./chunk-ZTTN6AJG.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/e2b/api.ts
|
|
22
22
|
var SERVICE = "e2b";
|
|
23
23
|
var API_BASE = "https://api.e2b.app";
|
|
24
|
-
var http = createProviderHttpClient({ baseUrl: API_BASE, service: SERVICE });
|
|
25
24
|
var REQUEST_TIMEOUT_MS = 3e4;
|
|
25
|
+
var http = createAuthedClient({
|
|
26
|
+
baseUrl: API_BASE,
|
|
27
|
+
service: SERVICE,
|
|
28
|
+
auth: { kind: "header", name: "x-api-key" },
|
|
29
|
+
headers: { accept: "application/json" },
|
|
30
|
+
// E2B 的错误文案:纯文本 body 直接用,JSON 则依次看 message / error / detail。
|
|
31
|
+
errorMessage: {
|
|
32
|
+
keys: ["message", "error", "detail"],
|
|
33
|
+
fallback: (status) => `E2B request failed with status ${status}`
|
|
34
|
+
},
|
|
35
|
+
mapTransportError: ({ kind, message }) => kind === "timeout" ? upstreamError(504, `E2B ${REQUEST_TIMEOUT_MS / 1e3}s \u5185\u6CA1\u6709\u8FD4\u56DE`) : upstreamError(502, message === void 0 ? "E2B request failed" : `E2B request failed: ${message}`)
|
|
36
|
+
});
|
|
26
37
|
function requireText(value, field) {
|
|
27
38
|
const result = trimmedText(value);
|
|
28
39
|
if (result === void 0) throw new TBError("invalid_argument", `${field} is required.`);
|
|
@@ -38,30 +49,19 @@ function stringArray(value) {
|
|
|
38
49
|
const items = value.filter((item) => typeof item === "string" && item !== "");
|
|
39
50
|
return items.length > 0 ? items : void 0;
|
|
40
51
|
}
|
|
41
|
-
function errorMessage(payload, status) {
|
|
42
|
-
if (typeof payload === "string") {
|
|
43
|
-
const trimmed = payload.trim();
|
|
44
|
-
if (trimmed !== "") return trimmed;
|
|
45
|
-
}
|
|
46
|
-
const body = asJsonObject(payload);
|
|
47
|
-
return trimmedText(body?.message) ?? trimmedText(body?.error) ?? trimmedText(body?.detail) ?? `E2B request failed with status ${status}`;
|
|
48
|
-
}
|
|
49
52
|
async function request(ctx, options) {
|
|
50
53
|
const query = Object.entries(options.query ?? {}).map(([key, value]) => [
|
|
51
54
|
key,
|
|
52
55
|
// 数组 query 拼成一个逗号串:E2B 不认重复的同名参数。
|
|
53
56
|
Array.isArray(value) ? value.join(",") : value
|
|
54
57
|
]);
|
|
55
|
-
const { data } = await http.request({
|
|
58
|
+
const { data } = await http.request(ctx, {
|
|
56
59
|
path: options.path,
|
|
57
60
|
method: options.method ?? "GET",
|
|
58
61
|
query,
|
|
59
|
-
headers: { "accept": "application/json", "x-api-key": requireApiKey(ctx, SERVICE) },
|
|
60
62
|
...options.body === void 0 ? {} : { json: options.body },
|
|
61
63
|
timeoutMs: REQUEST_TIMEOUT_MS,
|
|
62
|
-
invalidJsonMessage: "E2B returned invalid JSON"
|
|
63
|
-
mapError: ({ data: payload, status }) => upstreamError(status, errorMessage(payload, status)),
|
|
64
|
-
mapTransportError: ({ kind, message }) => kind === "timeout" ? upstreamError(504, `E2B ${REQUEST_TIMEOUT_MS / 1e3}s \u5185\u6CA1\u6709\u8FD4\u56DE`) : upstreamError(502, message === void 0 ? "E2B request failed" : `E2B request failed: ${message}`)
|
|
64
|
+
invalidJsonMessage: "E2B returned invalid JSON"
|
|
65
65
|
});
|
|
66
66
|
return data === void 0 ? options.emptySuccess ?? null : data;
|
|
67
67
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -8,46 +9,42 @@ import {
|
|
|
8
9
|
} from "./chunk-JXHMDBAY.js";
|
|
9
10
|
import {
|
|
10
11
|
createProviderPlugin,
|
|
11
|
-
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-QR4LK3HF.js";
|
|
14
|
+
import "./chunk-ZTTN6AJG.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/exa/api.ts
|
|
22
22
|
var SERVICE = "exa";
|
|
23
23
|
var API_BASE = "https://api.exa.ai";
|
|
24
|
-
var http =
|
|
24
|
+
var http = createAuthedClient({
|
|
25
|
+
baseUrl: API_BASE,
|
|
26
|
+
service: SERVICE,
|
|
27
|
+
auth: { kind: "header", name: "x-api-key" },
|
|
28
|
+
headers: { accept: "application/json" },
|
|
29
|
+
errorMessage: {
|
|
30
|
+
keys: ["error", "message", "detail"],
|
|
31
|
+
fallback: (status, statusText) => statusText || `exa \u8FD4\u56DE HTTP ${status}`
|
|
32
|
+
},
|
|
33
|
+
mapTransportError: ({ message }) => upstreamError(
|
|
34
|
+
502,
|
|
35
|
+
message === void 0 ? "exa \u8BF7\u6C42\u5931\u8D25" : `exa \u8BF7\u6C42\u5931\u8D25: ${message}`
|
|
36
|
+
)
|
|
37
|
+
});
|
|
25
38
|
var SEARCH_PATH = "/search";
|
|
26
39
|
var CONTENTS_PATH = "/contents";
|
|
27
40
|
var ANSWER_PATH = "/answer";
|
|
28
41
|
var FIND_SIMILAR_PATH = "/findSimilar";
|
|
29
|
-
function errorMessage(payload) {
|
|
30
|
-
if (typeof payload === "string") return trimmedText(payload);
|
|
31
|
-
const object = asJsonObject(payload);
|
|
32
|
-
if (object === void 0) return void 0;
|
|
33
|
-
return trimmedText(object.error) ?? trimmedText(object.message) ?? trimmedText(object.detail);
|
|
34
|
-
}
|
|
35
42
|
async function request(ctx, path, body) {
|
|
36
|
-
const
|
|
37
|
-
const { bodyKind, data } = await http.request({
|
|
43
|
+
const { bodyKind, data } = await http.request(ctx, {
|
|
38
44
|
path,
|
|
39
45
|
method: "POST",
|
|
40
|
-
headers: { "accept": "application/json", "x-api-key": apiKey },
|
|
41
46
|
json: body,
|
|
42
|
-
invalidJson: "text"
|
|
43
|
-
mapError: ({ data: payload, status, statusText }) => upstreamError(
|
|
44
|
-
status,
|
|
45
|
-
errorMessage(payload) ?? (statusText || `exa \u8FD4\u56DE HTTP ${status}`)
|
|
46
|
-
),
|
|
47
|
-
mapTransportError: ({ message }) => upstreamError(
|
|
48
|
-
502,
|
|
49
|
-
message === void 0 ? "exa \u8BF7\u6C42\u5931\u8D25" : `exa \u8BF7\u6C42\u5931\u8D25: ${message}`
|
|
50
|
-
)
|
|
47
|
+
invalidJson: "text"
|
|
51
48
|
});
|
|
52
49
|
if (bodyKind === "empty") return {};
|
|
53
50
|
if (bodyKind === "invalid-json") throw upstreamError(502, "exa \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -10,21 +11,20 @@ import {
|
|
|
10
11
|
createProviderPlugin,
|
|
11
12
|
requireApiKey,
|
|
12
13
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QR4LK3HF.js";
|
|
14
15
|
import {
|
|
15
16
|
guardedFetch
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZTTN6AJG.js";
|
|
17
18
|
import {
|
|
18
19
|
TBError,
|
|
19
20
|
external_exports
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
21
22
|
import "./chunk-U67V476Y.js";
|
|
22
23
|
|
|
23
24
|
// ../plugins/src/fal_ai/api.ts
|
|
24
25
|
var SERVICE = "fal_ai";
|
|
25
26
|
var PLATFORM_BASE = "https://api.fal.ai";
|
|
26
27
|
var QUEUE_BASE = "https://queue.fal.run";
|
|
27
|
-
var http = createProviderHttpClient({ service: SERVICE });
|
|
28
28
|
function str(value) {
|
|
29
29
|
return typeof value === "string" ? value : void 0;
|
|
30
30
|
}
|
|
@@ -62,23 +62,24 @@ function errorMessage(payload, status) {
|
|
|
62
62
|
}
|
|
63
63
|
return `fal.ai \u8FD4\u56DE HTTP ${status}`;
|
|
64
64
|
}
|
|
65
|
+
var http = createAuthedClient({
|
|
66
|
+
service: SERVICE,
|
|
67
|
+
auth: { kind: "custom", headers: (ctx) => ({ authorization: `Key ${requireApiKey(ctx, SERVICE)}` }) },
|
|
68
|
+
headers: { "content-type": "application/json" },
|
|
69
|
+
mapError: ({ bodyKind, data, status }) => upstreamError(
|
|
70
|
+
status,
|
|
71
|
+
errorMessage(bodyKind === "json" ? data : null, status)
|
|
72
|
+
)
|
|
73
|
+
});
|
|
65
74
|
async function request(ctx, input) {
|
|
66
|
-
const result = await http.request({
|
|
75
|
+
const result = await http.request(ctx, {
|
|
67
76
|
baseUrl: input.base,
|
|
68
77
|
path: input.path,
|
|
69
78
|
method: input.method ?? (input.body === void 0 ? "GET" : "POST"),
|
|
70
79
|
query: Object.entries(input.query ?? {}),
|
|
71
|
-
headers: {
|
|
72
|
-
"authorization": `Key ${requireApiKey(ctx, SERVICE)}`,
|
|
73
|
-
"content-type": "application/json",
|
|
74
|
-
...input.headers
|
|
75
|
-
},
|
|
80
|
+
...input.headers === void 0 ? {} : { headers: input.headers },
|
|
76
81
|
...input.body === void 0 ? {} : { json: input.body },
|
|
77
|
-
invalidJsonMessage: "fal.ai \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
|
|
78
|
-
mapError: ({ bodyKind, data, status }) => upstreamError(
|
|
79
|
-
status,
|
|
80
|
-
errorMessage(bodyKind === "json" ? data : null, status)
|
|
81
|
-
)
|
|
82
|
+
invalidJsonMessage: "fal.ai \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
|
|
82
83
|
});
|
|
83
84
|
return result.data === void 0 ? null : result.data;
|
|
84
85
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGuardedFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZTTN6AJG.js";
|
|
4
4
|
import {
|
|
5
5
|
TBError,
|
|
6
6
|
createPlugin,
|
|
7
7
|
isTBError,
|
|
8
8
|
normalizeUpstreamError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
10
10
|
import "./chunk-U67V476Y.js";
|
|
11
11
|
|
|
12
12
|
// ../plugins/src/feishu/feishuMcp.ts
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
createProviderPlugin,
|
|
3
3
|
requireCredential,
|
|
4
4
|
upstreamError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QR4LK3HF.js";
|
|
6
6
|
import {
|
|
7
7
|
guardedFetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZTTN6AJG.js";
|
|
9
9
|
import {
|
|
10
10
|
TBError,
|
|
11
11
|
external_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
13
13
|
import "./chunk-U67V476Y.js";
|
|
14
14
|
|
|
15
15
|
// ../plugins/src/feishu_custom_bot/api.ts
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
7
8
|
trimmedText
|
|
8
9
|
} from "./chunk-JXHMDBAY.js";
|
|
9
10
|
import {
|
|
10
|
-
createProviderPlugin
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-6ANLYNFB.js";
|
|
14
|
-
import "./chunk-3WL6EXYX.js";
|
|
11
|
+
createProviderPlugin
|
|
12
|
+
} from "./chunk-QR4LK3HF.js";
|
|
13
|
+
import "./chunk-ZTTN6AJG.js";
|
|
15
14
|
import {
|
|
16
15
|
TBError,
|
|
17
16
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
19
18
|
import "./chunk-U67V476Y.js";
|
|
20
19
|
|
|
21
20
|
// ../plugins/src/figma/api.ts
|
|
22
21
|
var SERVICE = "figma";
|
|
23
22
|
var API_BASE = "https://api.figma.com";
|
|
24
|
-
var http =
|
|
23
|
+
var http = createAuthedClient({
|
|
24
|
+
baseUrl: API_BASE,
|
|
25
|
+
service: SERVICE,
|
|
26
|
+
auth: { kind: "header", name: "x-figma-token" },
|
|
27
|
+
headers: { accept: "application/json" },
|
|
28
|
+
// Figma 的错误消息散在六个位置,按上游的顺序找。payload 是纯文本时它本身就是消息。
|
|
29
|
+
errorMessage: {
|
|
30
|
+
keys: ["message", "err", "error", "status", "error.message", "error.detail"],
|
|
31
|
+
fallback: (status) => `Figma \u8FD4\u56DE HTTP ${status}`
|
|
32
|
+
},
|
|
33
|
+
mapTransportError: () => new TBError("unavailable", "Figma \u8BF7\u6C42\u5931\u8D25", { retryable: true })
|
|
34
|
+
});
|
|
25
35
|
function requireInput(value, field) {
|
|
26
36
|
const result = trimmedText(value);
|
|
27
37
|
if (result === void 0) throw new TBError("invalid_argument", `${field} \u4E0D\u80FD\u662F\u7A7A\u767D`);
|
|
@@ -46,27 +56,15 @@ function requireArray(value, label) {
|
|
|
46
56
|
if (!Array.isArray(value)) throw new TBError("unavailable", `${label}\u4E0D\u662F\u6570\u7EC4`, { retryable: true });
|
|
47
57
|
return value;
|
|
48
58
|
}
|
|
49
|
-
function errorMessage(payload, status) {
|
|
50
|
-
if (typeof payload === "string") return trimmedText(payload) ?? `Figma \u8FD4\u56DE HTTP ${status}`;
|
|
51
|
-
const body = asJsonObject(payload);
|
|
52
|
-
const error = asJsonObject(body?.error);
|
|
53
|
-
return trimmedText(body?.message) ?? trimmedText(body?.err) ?? trimmedText(body?.error) ?? trimmedText(body?.status) ?? trimmedText(error?.message) ?? trimmedText(error?.detail) ?? `Figma \u8FD4\u56DE HTTP ${status}`;
|
|
54
|
-
}
|
|
55
59
|
async function request(ctx, input) {
|
|
56
60
|
const hasBody = input.body !== void 0;
|
|
57
|
-
const { data } = await http.request({
|
|
61
|
+
const { data } = await http.request(ctx, {
|
|
58
62
|
path: input.path,
|
|
59
63
|
method: input.method ?? "GET",
|
|
60
64
|
query: Object.entries(input.query ?? {}),
|
|
61
|
-
headers: {
|
|
62
|
-
"accept": "application/json",
|
|
63
|
-
"x-figma-token": requireApiKey(ctx, SERVICE)
|
|
64
|
-
},
|
|
65
65
|
...hasBody ? { json: input.body } : {},
|
|
66
66
|
// Figma 的错误消息有时是纯文本;成功响应也保留旧实现的原文 payload 语义。
|
|
67
|
-
invalidJson: "text"
|
|
68
|
-
mapError: ({ data: payload, status }) => upstreamError(status, errorMessage(payload, status)),
|
|
69
|
-
mapTransportError: () => new TBError("unavailable", "Figma \u8BF7\u6C42\u5931\u8D25", { retryable: true })
|
|
67
|
+
invalidJson: "text"
|
|
70
68
|
});
|
|
71
69
|
return data ?? null;
|
|
72
70
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -8,20 +9,18 @@ import {
|
|
|
8
9
|
} from "./chunk-JXHMDBAY.js";
|
|
9
10
|
import {
|
|
10
11
|
createProviderPlugin,
|
|
11
|
-
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-QR4LK3HF.js";
|
|
14
|
+
import "./chunk-ZTTN6AJG.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/firehydrant/api.ts
|
|
22
22
|
var SERVICE = "firehydrant";
|
|
23
23
|
var API_BASE = "https://api.firehydrant.io/v1";
|
|
24
|
-
var http = createProviderHttpClient({ baseUrl: `${API_BASE}/`, service: SERVICE });
|
|
25
24
|
function responseObject(value, what) {
|
|
26
25
|
const object = asJsonObject(value);
|
|
27
26
|
if (object === void 0) {
|
|
@@ -39,19 +38,20 @@ function errorMessage(payload, status) {
|
|
|
39
38
|
}
|
|
40
39
|
return `FireHydrant request failed with status ${status}`;
|
|
41
40
|
}
|
|
41
|
+
var http = createAuthedClient({
|
|
42
|
+
baseUrl: `${API_BASE}/`,
|
|
43
|
+
service: SERVICE,
|
|
44
|
+
auth: { kind: "bearer" },
|
|
45
|
+
headers: { "accept": "application/json", "content-type": "application/json" },
|
|
46
|
+
mapError: ({ bodyKind, data: payload, status }) => bodyKind === "invalid-json" ? new TBError("unavailable", "FireHydrant \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON", { retryable: true }) : upstreamError(status, errorMessage(payload, status))
|
|
47
|
+
});
|
|
42
48
|
async function request(ctx, input) {
|
|
43
|
-
const { data } = await http.request({
|
|
49
|
+
const { data } = await http.request(ctx, {
|
|
44
50
|
path: input.path,
|
|
45
51
|
method: input.method ?? "GET",
|
|
46
52
|
query: Object.entries(input.query ?? {}),
|
|
47
|
-
headers: {
|
|
48
|
-
"accept": "application/json",
|
|
49
|
-
"authorization": `Bearer ${requireApiKey(ctx, SERVICE)}`,
|
|
50
|
-
"content-type": "application/json"
|
|
51
|
-
},
|
|
52
53
|
...input.body === void 0 ? {} : { json: input.body },
|
|
53
|
-
invalidJsonMessage: "FireHydrant \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON"
|
|
54
|
-
mapError: ({ bodyKind, data: payload, status }) => bodyKind === "invalid-json" ? new TBError("unavailable", "FireHydrant \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON", { retryable: true }) : upstreamError(status, errorMessage(payload, status))
|
|
54
|
+
invalidJsonMessage: "FireHydrant \u8FD4\u56DE\u4E86\u975E\u6CD5 JSON"
|
|
55
55
|
});
|
|
56
56
|
return data ?? {};
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q74GLIDK.js";
|
|
4
4
|
import {
|
|
5
5
|
asJsonObject,
|
|
6
6
|
trimmedText
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
createProviderPlugin,
|
|
10
10
|
requireApiKey,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-QR4LK3HF.js";
|
|
13
|
+
import "./chunk-ZTTN6AJG.js";
|
|
14
14
|
import {
|
|
15
15
|
TBError,
|
|
16
16
|
external_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
18
18
|
import "./chunk-U67V476Y.js";
|
|
19
19
|
|
|
20
20
|
// ../plugins/src/fixer/api.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
compactDefined,
|
|
@@ -8,20 +9,18 @@ import {
|
|
|
8
9
|
} from "./chunk-JXHMDBAY.js";
|
|
9
10
|
import {
|
|
10
11
|
createProviderPlugin,
|
|
11
|
-
requireApiKey,
|
|
12
12
|
upstreamError
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-QR4LK3HF.js";
|
|
14
|
+
import "./chunk-ZTTN6AJG.js";
|
|
15
15
|
import {
|
|
16
16
|
TBError,
|
|
17
17
|
external_exports
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
19
19
|
import "./chunk-U67V476Y.js";
|
|
20
20
|
|
|
21
21
|
// ../plugins/src/fly/api.ts
|
|
22
22
|
var SERVICE = "fly";
|
|
23
23
|
var API_BASE = "https://api.machines.dev/v1/";
|
|
24
|
-
var http = createProviderHttpClient({ baseUrl: API_BASE, service: SERVICE });
|
|
25
24
|
function requireText(value, field) {
|
|
26
25
|
const result = trimmedText(value);
|
|
27
26
|
if (result === void 0) throw new TBError("invalid_argument", `${field} is required`);
|
|
@@ -60,22 +59,27 @@ function errorMessage(payload, status) {
|
|
|
60
59
|
}
|
|
61
60
|
return `Fly.io request failed with status ${status}`;
|
|
62
61
|
}
|
|
62
|
+
var http = createAuthedClient({
|
|
63
|
+
baseUrl: API_BASE,
|
|
64
|
+
service: SERVICE,
|
|
65
|
+
auth: { kind: "bearer" },
|
|
66
|
+
headers: { accept: "application/json" },
|
|
67
|
+
// 错误消息要先过 flyPayload 二次解析(content-type 不可信),不是标准键序提取。
|
|
68
|
+
mapError: (context) => upstreamError(
|
|
69
|
+
context.status,
|
|
70
|
+
errorMessage(flyPayload(context.data, context.bodyKind, context.headers), context.status)
|
|
71
|
+
),
|
|
72
|
+
mapTransportError: ({ message }) => upstreamError(502, message ?? "Fly.io request failed")
|
|
73
|
+
});
|
|
63
74
|
async function request(ctx, input) {
|
|
64
|
-
const
|
|
65
|
-
const result = await http.request({
|
|
75
|
+
const result = await http.request(ctx, {
|
|
66
76
|
path: input.path,
|
|
67
77
|
method: input.method,
|
|
68
78
|
// 空串与 undefined 同等对待:Fly 把 `?region=` 当成真的按空 region 过滤。
|
|
69
79
|
query: Object.entries(input.query ?? {}).filter(([, value]) => value !== void 0 && value !== ""),
|
|
70
|
-
headers: { accept: "application/json", authorization: `Bearer ${apiKey}` },
|
|
71
80
|
...input.body === void 0 ? {} : { json: input.body },
|
|
72
81
|
invalidJson: "text",
|
|
73
|
-
responseType: "auto"
|
|
74
|
-
mapError: (context) => upstreamError(
|
|
75
|
-
context.status,
|
|
76
|
-
errorMessage(flyPayload(context.data, context.bodyKind, context.headers), context.status)
|
|
77
|
-
),
|
|
78
|
-
mapTransportError: ({ message }) => upstreamError(502, message ?? "Fly.io request failed")
|
|
82
|
+
responseType: "auto"
|
|
79
83
|
});
|
|
80
84
|
const payload = flyPayload(result.data, result.bodyKind, result.headers);
|
|
81
85
|
if (input.expectJson === false) return payload;
|
|
@@ -1,53 +1,50 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
createAuthedClient
|
|
3
|
+
} from "./chunk-JEWFX6Z6.js";
|
|
4
|
+
import "./chunk-Q74GLIDK.js";
|
|
4
5
|
import {
|
|
5
6
|
asJsonObject,
|
|
6
7
|
trimmedText
|
|
7
8
|
} from "./chunk-JXHMDBAY.js";
|
|
8
9
|
import {
|
|
9
10
|
createProviderPlugin,
|
|
10
|
-
requireApiKey,
|
|
11
11
|
upstreamError
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-QR4LK3HF.js";
|
|
13
|
+
import "./chunk-ZTTN6AJG.js";
|
|
14
14
|
import {
|
|
15
15
|
external_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
17
17
|
import "./chunk-U67V476Y.js";
|
|
18
18
|
|
|
19
19
|
// ../plugins/src/front/api.ts
|
|
20
20
|
var SERVICE = "front";
|
|
21
21
|
var API_BASE = "https://api2.frontapp.com";
|
|
22
22
|
var REQUEST_TIMEOUT_MS = 15e3;
|
|
23
|
-
var http =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
var http = createAuthedClient({
|
|
24
|
+
baseUrl: `${API_BASE}/`,
|
|
25
|
+
service: SERVICE,
|
|
26
|
+
auth: { kind: "bearer" },
|
|
27
|
+
headers: { accept: "application/json" },
|
|
28
|
+
// Front 的错误体形状不止一种,四个候选键按上游顺序取第一个有文本的。
|
|
29
|
+
errorMessage: {
|
|
30
|
+
keys: ["message", "_error", "error", "error.message"],
|
|
31
|
+
fallback: (status) => `front \u8FD4\u56DE HTTP ${status}`
|
|
32
|
+
},
|
|
33
|
+
mapTransportError: ({ kind, message }) => kind === "timeout" ? upstreamError(504, "front \u8BF7\u6C42\u8D85\u65F6") : upstreamError(502, message === void 0 ? "front \u8BF7\u6C42\u5931\u8D25" : `front \u8BF7\u6C42\u5931\u8D25: ${message}`)
|
|
34
|
+
});
|
|
31
35
|
async function request(ctx, path, input) {
|
|
32
|
-
const apiKey = requireApiKey(ctx, SERVICE);
|
|
33
36
|
const query = [];
|
|
34
37
|
for (const [key, value] of input.query ?? []) {
|
|
35
38
|
if (typeof value === "string" && value !== "") query.push([key, value]);
|
|
36
39
|
else if (typeof value === "number") query.push([key, value]);
|
|
37
40
|
}
|
|
38
|
-
const { data } = await http.request({
|
|
41
|
+
const { data } = await http.request(ctx, {
|
|
39
42
|
path,
|
|
40
43
|
method: input.method,
|
|
41
44
|
query,
|
|
42
|
-
headers: { accept: "application/json", authorization: `Bearer ${apiKey}` },
|
|
43
45
|
...input.body === void 0 ? {} : { json: input.body },
|
|
44
46
|
timeoutMs: REQUEST_TIMEOUT_MS,
|
|
45
|
-
invalidJson: "text"
|
|
46
|
-
mapError: ({ data: payload, status }) => upstreamError(
|
|
47
|
-
status,
|
|
48
|
-
errorMessage(payload) ?? `front \u8FD4\u56DE HTTP ${status}`
|
|
49
|
-
),
|
|
50
|
-
mapTransportError: ({ kind, message }) => kind === "timeout" ? upstreamError(504, "front \u8BF7\u6C42\u8D85\u65F6") : upstreamError(502, message === void 0 ? "front \u8BF7\u6C42\u5931\u8D25" : `front \u8BF7\u6C42\u5931\u8D25: ${message}`)
|
|
47
|
+
invalidJson: "text"
|
|
51
48
|
});
|
|
52
49
|
return data ?? {};
|
|
53
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProviderHttpClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q74GLIDK.js";
|
|
4
4
|
import {
|
|
5
5
|
messageFrom
|
|
6
6
|
} from "./chunk-JXHMDBAY.js";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
createProviderPlugin,
|
|
9
9
|
requireApiKey,
|
|
10
10
|
upstreamError
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-QR4LK3HF.js";
|
|
12
|
+
import "./chunk-ZTTN6AJG.js";
|
|
13
13
|
import {
|
|
14
14
|
TBError,
|
|
15
15
|
external_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MZCIPUNQ.js";
|
|
17
17
|
import "./chunk-U67V476Y.js";
|
|
18
18
|
|
|
19
19
|
// ../plugins/src/geocodio/api.ts
|