@trpc/client 11.3.1 → 11.3.2-canary.4
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/TRPCClientError-CGgRtttT.cjs +67 -0
- package/dist/TRPCClientError-COkhCKf3.mjs +56 -0
- package/dist/TRPCClientError-COkhCKf3.mjs.map +1 -0
- package/dist/chunk-DWy1uDak.cjs +39 -0
- package/dist/httpBatchLink-CIC9PZ_Z.cjs +267 -0
- package/dist/httpBatchLink-DIfnmmcu.mjs +238 -0
- package/dist/httpBatchLink-DIfnmmcu.mjs.map +1 -0
- package/dist/httpBatchLink.d-BN2Iw_cK.d.mts +33 -0
- package/dist/httpBatchLink.d-BN2Iw_cK.d.mts.map +1 -0
- package/dist/httpBatchLink.d-CLAuJKNV.d.cts +33 -0
- package/dist/httpBatchLink.d-CLAuJKNV.d.cts.map +1 -0
- package/dist/httpLink-9bpwQ15c.mjs +90 -0
- package/dist/httpLink-9bpwQ15c.mjs.map +1 -0
- package/dist/httpLink-BbVj_TgM.cjs +113 -0
- package/dist/httpLink.d-CTSOARfE.d.mts +23 -0
- package/dist/httpLink.d-CTSOARfE.d.mts.map +1 -0
- package/dist/httpLink.d-yMKfOlTU.d.cts +23 -0
- package/dist/httpLink.d-yMKfOlTU.d.cts.map +1 -0
- package/dist/httpUtils-3pbQzhUL.mjs +123 -0
- package/dist/httpUtils-3pbQzhUL.mjs.map +1 -0
- package/dist/httpUtils-Buf6jCgh.cjs +163 -0
- package/dist/httpUtils.d-C8wPxU79.d.mts +25 -0
- package/dist/httpUtils.d-C8wPxU79.d.mts.map +1 -0
- package/dist/httpUtils.d-DNRVGNHs.d.cts +25 -0
- package/dist/httpUtils.d-DNRVGNHs.d.cts.map +1 -0
- package/dist/index.cjs +736 -0
- package/dist/index.d.cts +201 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +201 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +737 -16
- package/dist/index.mjs.map +1 -0
- package/dist/links/httpBatchLink.cjs +6 -0
- package/dist/links/httpBatchLink.d.cts +6 -0
- package/dist/links/httpBatchLink.d.mts +6 -0
- package/dist/links/httpBatchLink.mjs +5 -107
- package/dist/links/httpLink.cjs +6 -0
- package/dist/links/httpLink.d.cts +6 -0
- package/dist/links/httpLink.d.mts +6 -0
- package/dist/links/httpLink.mjs +5 -92
- package/dist/links/loggerLink.cjs +3 -0
- package/dist/links/loggerLink.d.cts +4 -0
- package/dist/links/loggerLink.d.mts +4 -0
- package/dist/links/loggerLink.mjs +2 -175
- package/dist/links/splitLink.cjs +3 -0
- package/dist/links/splitLink.d.cts +4 -0
- package/dist/links/splitLink.d.mts +4 -0
- package/dist/links/splitLink.mjs +2 -24
- package/dist/links/wsLink/wsLink.cjs +6 -0
- package/dist/links/wsLink/wsLink.d.cts +5 -0
- package/dist/links/wsLink/wsLink.d.mts +5 -0
- package/dist/links/wsLink/wsLink.mjs +4 -31
- package/dist/loggerLink-CsDfg5Bb.cjs +130 -0
- package/dist/loggerLink-PGBSQFcR.mjs +125 -0
- package/dist/loggerLink-PGBSQFcR.mjs.map +1 -0
- package/dist/loggerLink.d-CZjK1CXm.d.mts +54 -0
- package/dist/loggerLink.d-CZjK1CXm.d.mts.map +1 -0
- package/dist/loggerLink.d-DU855urG.d.cts +54 -0
- package/dist/loggerLink.d-DU855urG.d.cts.map +1 -0
- package/dist/splitLink-BMgxggng.cjs +58 -0
- package/dist/splitLink-BVblHq4n.mjs +47 -0
- package/dist/splitLink-BVblHq4n.mjs.map +1 -0
- package/dist/splitLink.d-BAqgq0NG.d.mts +20 -0
- package/dist/splitLink.d-BAqgq0NG.d.mts.map +1 -0
- package/dist/splitLink.d-GdevSkGW.d.cts +20 -0
- package/dist/splitLink.d-GdevSkGW.d.cts.map +1 -0
- package/dist/subscriptions.d-Ciljg_dH.d.cts +19 -0
- package/dist/subscriptions.d-Ciljg_dH.d.cts.map +1 -0
- package/dist/subscriptions.d-U92STdZl.d.mts +19 -0
- package/dist/subscriptions.d-U92STdZl.d.mts.map +1 -0
- package/dist/types.d-DXbqQLCC.d.mts +182 -0
- package/dist/types.d-DXbqQLCC.d.mts.map +1 -0
- package/dist/types.d-DqGYG6S_.d.cts +182 -0
- package/dist/types.d-DqGYG6S_.d.cts.map +1 -0
- package/dist/unstable-internals-CYBH4jbF.cjs +34 -0
- package/dist/unstable-internals-DU4WecoG.mjs +29 -0
- package/dist/unstable-internals-DU4WecoG.mjs.map +1 -0
- package/dist/unstable-internals.cjs +3 -0
- package/dist/unstable-internals.d-DyLd-B0J.d.mts +46 -0
- package/dist/unstable-internals.d-DyLd-B0J.d.mts.map +1 -0
- package/dist/unstable-internals.d-kWsZTlQq.d.cts +46 -0
- package/dist/unstable-internals.d-kWsZTlQq.d.cts.map +1 -0
- package/dist/unstable-internals.d.cts +3 -0
- package/dist/unstable-internals.d.mts +3 -0
- package/dist/unstable-internals.mjs +3 -1
- package/dist/wsLink-DbSHOzlB.mjs +698 -0
- package/dist/wsLink-DbSHOzlB.mjs.map +1 -0
- package/dist/wsLink-DhJ50EC5.cjs +715 -0
- package/dist/wsLink.d-BqO7ltN_.d.mts +194 -0
- package/dist/wsLink.d-BqO7ltN_.d.mts.map +1 -0
- package/dist/wsLink.d-DtZjg09g.d.cts +194 -0
- package/dist/wsLink.d-DtZjg09g.d.cts.map +1 -0
- package/links/httpBatchLink/package.json +1 -0
- package/links/httpLink/package.json +1 -0
- package/links/loggerLink/package.json +1 -0
- package/links/splitLink/package.json +1 -0
- package/links/wsLink/wsLink/package.json +1 -0
- package/package.json +67 -33
- package/src/links/localLink.ts +6 -1
- package/unstable-internals/package.json +1 -0
- package/dist/TRPCClientError.d.ts +0 -30
- package/dist/TRPCClientError.d.ts.map +0 -1
- package/dist/TRPCClientError.js +0 -79
- package/dist/TRPCClientError.mjs +0 -76
- package/dist/createTRPCClient.d.ts +0 -69
- package/dist/createTRPCClient.d.ts.map +0 -1
- package/dist/createTRPCClient.js +0 -48
- package/dist/createTRPCClient.mjs +0 -43
- package/dist/createTRPCUntypedClient.d.ts +0 -7
- package/dist/createTRPCUntypedClient.d.ts.map +0 -1
- package/dist/createTRPCUntypedClient.js +0 -10
- package/dist/createTRPCUntypedClient.mjs +0 -7
- package/dist/getFetch.d.ts +0 -3
- package/dist/getFetch.d.ts.map +0 -1
- package/dist/getFetch.js +0 -17
- package/dist/getFetch.mjs +0 -15
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -46
- package/dist/internals/TRPCUntypedClient.d.ts +0 -39
- package/dist/internals/TRPCUntypedClient.d.ts.map +0 -1
- package/dist/internals/TRPCUntypedClient.js +0 -115
- package/dist/internals/TRPCUntypedClient.mjs +0 -113
- package/dist/internals/dataLoader.d.ts +0 -13
- package/dist/internals/dataLoader.d.ts.map +0 -1
- package/dist/internals/dataLoader.js +0 -117
- package/dist/internals/dataLoader.mjs +0 -115
- package/dist/internals/inputWithTrackedEventId.d.ts +0 -2
- package/dist/internals/inputWithTrackedEventId.d.ts.map +0 -1
- package/dist/internals/inputWithTrackedEventId.js +0 -16
- package/dist/internals/inputWithTrackedEventId.mjs +0 -14
- package/dist/internals/signals.d.ts +0 -16
- package/dist/internals/signals.d.ts.map +0 -1
- package/dist/internals/signals.js +0 -61
- package/dist/internals/signals.mjs +0 -57
- package/dist/internals/transformer.d.ts +0 -42
- package/dist/internals/transformer.d.ts.map +0 -1
- package/dist/internals/transformer.js +0 -30
- package/dist/internals/transformer.mjs +0 -28
- package/dist/internals/types.d.ts +0 -82
- package/dist/internals/types.d.ts.map +0 -1
- package/dist/links/HTTPBatchLinkOptions.d.ts +0 -20
- package/dist/links/HTTPBatchLinkOptions.d.ts.map +0 -1
- package/dist/links/httpBatchLink.d.ts +0 -8
- package/dist/links/httpBatchLink.d.ts.map +0 -1
- package/dist/links/httpBatchLink.js +0 -110
- package/dist/links/httpBatchStreamLink.d.ts +0 -12
- package/dist/links/httpBatchStreamLink.d.ts.map +0 -1
- package/dist/links/httpBatchStreamLink.js +0 -150
- package/dist/links/httpBatchStreamLink.mjs +0 -147
- package/dist/links/httpLink.d.ts +0 -17
- package/dist/links/httpLink.d.ts.map +0 -1
- package/dist/links/httpLink.js +0 -95
- package/dist/links/httpSubscriptionLink.d.ts +0 -26
- package/dist/links/httpSubscriptionLink.d.ts.map +0 -1
- package/dist/links/httpSubscriptionLink.js +0 -177
- package/dist/links/httpSubscriptionLink.mjs +0 -174
- package/dist/links/internals/contentTypes.d.ts +0 -4
- package/dist/links/internals/contentTypes.d.ts.map +0 -1
- package/dist/links/internals/contentTypes.js +0 -16
- package/dist/links/internals/contentTypes.mjs +0 -12
- package/dist/links/internals/createChain.d.ts +0 -8
- package/dist/links/internals/createChain.d.ts.map +0 -1
- package/dist/links/internals/createChain.js +0 -26
- package/dist/links/internals/createChain.mjs +0 -24
- package/dist/links/internals/dedupeLink.d.ts +0 -7
- package/dist/links/internals/dedupeLink.d.ts.map +0 -1
- package/dist/links/internals/httpUtils.d.ts +0 -68
- package/dist/links/internals/httpUtils.d.ts.map +0 -1
- package/dist/links/internals/httpUtils.js +0 -141
- package/dist/links/internals/httpUtils.mjs +0 -133
- package/dist/links/internals/subscriptions.d.ts +0 -17
- package/dist/links/internals/subscriptions.d.ts.map +0 -1
- package/dist/links/internals/urlWithConnectionParams.d.ts +0 -23
- package/dist/links/internals/urlWithConnectionParams.d.ts.map +0 -1
- package/dist/links/internals/urlWithConnectionParams.js +0 -10
- package/dist/links/internals/urlWithConnectionParams.mjs +0 -8
- package/dist/links/localLink.d.ts +0 -15
- package/dist/links/localLink.d.ts.map +0 -1
- package/dist/links/localLink.js +0 -333
- package/dist/links/localLink.mjs +0 -331
- package/dist/links/loggerLink.d.ts +0 -52
- package/dist/links/loggerLink.d.ts.map +0 -1
- package/dist/links/loggerLink.js +0 -178
- package/dist/links/retryLink.d.ts +0 -33
- package/dist/links/retryLink.d.ts.map +0 -1
- package/dist/links/retryLink.js +0 -72
- package/dist/links/retryLink.mjs +0 -70
- package/dist/links/splitLink.d.ts +0 -14
- package/dist/links/splitLink.d.ts.map +0 -1
- package/dist/links/splitLink.js +0 -27
- package/dist/links/types.d.ts +0 -63
- package/dist/links/types.d.ts.map +0 -1
- package/dist/links/wsLink/createWsClient.d.ts +0 -6
- package/dist/links/wsLink/createWsClient.d.ts.map +0 -1
- package/dist/links/wsLink/createWsClient.js +0 -9
- package/dist/links/wsLink/createWsClient.mjs +0 -7
- package/dist/links/wsLink/wsClient/options.d.ts +0 -79
- package/dist/links/wsLink/wsClient/options.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/options.js +0 -22
- package/dist/links/wsLink/wsClient/options.mjs +0 -18
- package/dist/links/wsLink/wsClient/requestManager.d.ts +0 -106
- package/dist/links/wsLink/wsClient/requestManager.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/requestManager.js +0 -143
- package/dist/links/wsLink/wsClient/requestManager.mjs +0 -141
- package/dist/links/wsLink/wsClient/utils.d.ts +0 -38
- package/dist/links/wsLink/wsClient/utils.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/utils.js +0 -94
- package/dist/links/wsLink/wsClient/utils.mjs +0 -88
- package/dist/links/wsLink/wsClient/wsClient.d.ts +0 -84
- package/dist/links/wsLink/wsClient/wsClient.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/wsClient.js +0 -325
- package/dist/links/wsLink/wsClient/wsClient.mjs +0 -323
- package/dist/links/wsLink/wsClient/wsConnection.d.ts +0 -79
- package/dist/links/wsLink/wsClient/wsConnection.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/wsConnection.js +0 -188
- package/dist/links/wsLink/wsClient/wsConnection.mjs +0 -185
- package/dist/links/wsLink/wsLink.d.ts +0 -11
- package/dist/links/wsLink/wsLink.d.ts.map +0 -1
- package/dist/links/wsLink/wsLink.js +0 -35
- package/dist/links.d.ts +0 -12
- package/dist/links.d.ts.map +0 -1
- package/dist/unstable-internals.d.ts +0 -3
- package/dist/unstable-internals.d.ts.map +0 -1
- package/dist/unstable-internals.js +0 -7
- package/links/httpBatchLink/index.d.ts +0 -1
- package/links/httpBatchLink/index.js +0 -1
- package/links/httpLink/index.d.ts +0 -1
- package/links/httpLink/index.js +0 -1
- package/links/loggerLink/index.d.ts +0 -1
- package/links/loggerLink/index.js +0 -1
- package/links/splitLink/index.d.ts +0 -1
- package/links/splitLink/index.js +0 -1
- package/links/wsLink/index.d.ts +0 -1
- package/links/wsLink/index.js +0 -1
- package/links/wsLink/wsLink/index.d.ts +0 -1
- package/links/wsLink/wsLink/index.js +0 -1
- package/unstable-internals/index.d.ts +0 -1
- package/unstable-internals/index.js +0 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
const require_unstable_internals = require('./unstable-internals-CYBH4jbF.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/getFetch.ts
|
|
4
|
+
const isFunction = (fn) => typeof fn === "function";
|
|
5
|
+
function getFetch(customFetchImpl) {
|
|
6
|
+
if (customFetchImpl) return customFetchImpl;
|
|
7
|
+
if (typeof window !== "undefined" && isFunction(window.fetch)) return window.fetch;
|
|
8
|
+
if (typeof globalThis !== "undefined" && isFunction(globalThis.fetch)) return globalThis.fetch;
|
|
9
|
+
throw new Error("No fetch implementation found");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/links/internals/httpUtils.ts
|
|
14
|
+
function resolveHTTPLinkOptions(opts) {
|
|
15
|
+
return {
|
|
16
|
+
url: opts.url.toString(),
|
|
17
|
+
fetch: opts.fetch,
|
|
18
|
+
transformer: require_unstable_internals.getTransformer(opts.transformer),
|
|
19
|
+
methodOverride: opts.methodOverride
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function arrayToDict(array) {
|
|
23
|
+
const dict = {};
|
|
24
|
+
for (let index = 0; index < array.length; index++) {
|
|
25
|
+
const element = array[index];
|
|
26
|
+
dict[index] = element;
|
|
27
|
+
}
|
|
28
|
+
return dict;
|
|
29
|
+
}
|
|
30
|
+
const METHOD = {
|
|
31
|
+
query: "GET",
|
|
32
|
+
mutation: "POST",
|
|
33
|
+
subscription: "PATCH"
|
|
34
|
+
};
|
|
35
|
+
function getInput(opts) {
|
|
36
|
+
return "input" in opts ? opts.transformer.input.serialize(opts.input) : arrayToDict(opts.inputs.map((_input) => opts.transformer.input.serialize(_input)));
|
|
37
|
+
}
|
|
38
|
+
const getUrl = (opts) => {
|
|
39
|
+
const parts = opts.url.split("?");
|
|
40
|
+
const base = parts[0].replace(/\/$/, "");
|
|
41
|
+
let url = base + "/" + opts.path;
|
|
42
|
+
const queryParts = [];
|
|
43
|
+
if (parts[1]) queryParts.push(parts[1]);
|
|
44
|
+
if ("inputs" in opts) queryParts.push("batch=1");
|
|
45
|
+
if (opts.type === "query" || opts.type === "subscription") {
|
|
46
|
+
const input = getInput(opts);
|
|
47
|
+
if (input !== void 0 && opts.methodOverride !== "POST") queryParts.push(`input=${encodeURIComponent(JSON.stringify(input))}`);
|
|
48
|
+
}
|
|
49
|
+
if (queryParts.length) url += "?" + queryParts.join("&");
|
|
50
|
+
return url;
|
|
51
|
+
};
|
|
52
|
+
const getBody = (opts) => {
|
|
53
|
+
if (opts.type === "query" && opts.methodOverride !== "POST") return void 0;
|
|
54
|
+
const input = getInput(opts);
|
|
55
|
+
return input !== void 0 ? JSON.stringify(input) : void 0;
|
|
56
|
+
};
|
|
57
|
+
const jsonHttpRequester = (opts) => {
|
|
58
|
+
return httpRequest({
|
|
59
|
+
...opts,
|
|
60
|
+
contentTypeHeader: "application/json",
|
|
61
|
+
getUrl,
|
|
62
|
+
getBody
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Polyfill for DOMException with AbortError name
|
|
67
|
+
*/
|
|
68
|
+
var AbortError = class extends Error {
|
|
69
|
+
constructor() {
|
|
70
|
+
const name = "AbortError";
|
|
71
|
+
super(name);
|
|
72
|
+
this.name = name;
|
|
73
|
+
this.message = name;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Polyfill for `signal.throwIfAborted()`
|
|
78
|
+
*
|
|
79
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted
|
|
80
|
+
*/
|
|
81
|
+
const throwIfAborted = (signal) => {
|
|
82
|
+
if (!signal?.aborted) return;
|
|
83
|
+
signal.throwIfAborted?.();
|
|
84
|
+
if (typeof DOMException !== "undefined") throw new DOMException("AbortError", "AbortError");
|
|
85
|
+
throw new AbortError();
|
|
86
|
+
};
|
|
87
|
+
async function fetchHTTPResponse(opts) {
|
|
88
|
+
throwIfAborted(opts.signal);
|
|
89
|
+
const url = opts.getUrl(opts);
|
|
90
|
+
const body = opts.getBody(opts);
|
|
91
|
+
const { type } = opts;
|
|
92
|
+
const resolvedHeaders = await (async () => {
|
|
93
|
+
const heads = await opts.headers();
|
|
94
|
+
if (Symbol.iterator in heads) return Object.fromEntries(heads);
|
|
95
|
+
return heads;
|
|
96
|
+
})();
|
|
97
|
+
const headers = {
|
|
98
|
+
...opts.contentTypeHeader ? { "content-type": opts.contentTypeHeader } : {},
|
|
99
|
+
...opts.trpcAcceptHeader ? { "trpc-accept": opts.trpcAcceptHeader } : void 0,
|
|
100
|
+
...resolvedHeaders
|
|
101
|
+
};
|
|
102
|
+
return getFetch(opts.fetch)(url, {
|
|
103
|
+
method: opts.methodOverride ?? METHOD[type],
|
|
104
|
+
signal: opts.signal,
|
|
105
|
+
body,
|
|
106
|
+
headers
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async function httpRequest(opts) {
|
|
110
|
+
const meta = {};
|
|
111
|
+
const res = await fetchHTTPResponse(opts);
|
|
112
|
+
meta.response = res;
|
|
113
|
+
const json = await res.json();
|
|
114
|
+
meta.responseJSON = json;
|
|
115
|
+
return {
|
|
116
|
+
json,
|
|
117
|
+
meta
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
Object.defineProperty(exports, 'fetchHTTPResponse', {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () {
|
|
125
|
+
return fetchHTTPResponse;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, 'getBody', {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () {
|
|
131
|
+
return getBody;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Object.defineProperty(exports, 'getFetch', {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function () {
|
|
137
|
+
return getFetch;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, 'getUrl', {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () {
|
|
143
|
+
return getUrl;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, 'httpRequest', {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function () {
|
|
149
|
+
return httpRequest;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, 'jsonHttpRequester', {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () {
|
|
155
|
+
return jsonHttpRequester;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, 'resolveHTTPLinkOptions', {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function () {
|
|
161
|
+
return resolveHTTPLinkOptions;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FetchEsque } from "./types.d-DXbqQLCC.mjs";
|
|
2
|
+
import { TransformerOptions } from "./unstable-internals.d-DyLd-B0J.mjs";
|
|
3
|
+
import { AnyClientTypes, CombinedDataTransformer, Maybe, ProcedureType } from "@trpc/server/unstable-core-do-not-import";
|
|
4
|
+
|
|
5
|
+
//#region src/links/internals/httpUtils.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type HTTPLinkBaseOptions<TRoot extends Pick<AnyClientTypes, 'transformer'>> = {
|
|
11
|
+
url: string | URL;
|
|
12
|
+
/**
|
|
13
|
+
* Add ponyfill for fetch
|
|
14
|
+
*/
|
|
15
|
+
fetch?: FetchEsque;
|
|
16
|
+
/**
|
|
17
|
+
* Send all requests `as POST`s requests regardless of the procedure type
|
|
18
|
+
* The HTTP handler must separately allow overriding the method. See:
|
|
19
|
+
* @see https://trpc.io/docs/rpc
|
|
20
|
+
*/
|
|
21
|
+
methodOverride?: 'POST';
|
|
22
|
+
} & TransformerOptions<TRoot>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { HTTPLinkBaseOptions };
|
|
25
|
+
//# sourceMappingURL=httpUtils.d-C8wPxU79.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpUtils.d-C8wPxU79.d.mts","names":[],"sources":["../src/links/internals/httpUtils.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;AACqB,KADT,mBACS,CAAA,cAAL,IAAK,CAAA,cAAA,EAAA,aAAA,CAAA,CAAA,GAAA;EAAc,GAAnB,EAAA,MAAA,GAEA,GAFA;EAAI;;;EAaQ,KAAxB,CAAA,EAPM,UAON;EAAkB;;;;;;IAAlB,mBAAmB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FetchEsque } from "./types.d-DqGYG6S_.cjs";
|
|
2
|
+
import { TransformerOptions } from "./unstable-internals.d-kWsZTlQq.cjs";
|
|
3
|
+
import { AnyClientTypes, CombinedDataTransformer, Maybe, ProcedureType } from "@trpc/server/unstable-core-do-not-import";
|
|
4
|
+
|
|
5
|
+
//#region src/links/internals/httpUtils.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type HTTPLinkBaseOptions<TRoot extends Pick<AnyClientTypes, 'transformer'>> = {
|
|
11
|
+
url: string | URL;
|
|
12
|
+
/**
|
|
13
|
+
* Add ponyfill for fetch
|
|
14
|
+
*/
|
|
15
|
+
fetch?: FetchEsque;
|
|
16
|
+
/**
|
|
17
|
+
* Send all requests `as POST`s requests regardless of the procedure type
|
|
18
|
+
* The HTTP handler must separately allow overriding the method. See:
|
|
19
|
+
* @see https://trpc.io/docs/rpc
|
|
20
|
+
*/
|
|
21
|
+
methodOverride?: 'POST';
|
|
22
|
+
} & TransformerOptions<TRoot>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { HTTPLinkBaseOptions };
|
|
25
|
+
//# sourceMappingURL=httpUtils.d-DNRVGNHs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpUtils.d-DNRVGNHs.d.cts","names":[],"sources":["../src/links/internals/httpUtils.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;AACqB,KADT,mBACS,CAAA,cAAL,IAAK,CAAA,cAAA,EAAA,aAAA,CAAA,CAAA,GAAA;EAAc,GAAnB,EAAA,MAAA,GAEA,GAFA;EAAI;;;EAaQ,KAAxB,CAAA,EAPM,UAON;EAAkB;;;;;;IAAlB,mBAAmB"}
|