@trpc/client 11.1.3-alpha-tmp-issues-6785.34 → 11.1.3-alpha-tmp-tsdown.24
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.d.mts +32 -0
- package/dist/TRPCClientError.d.mts.map +1 -0
- package/dist/TRPCClientError.d.ts +28 -25
- package/dist/TRPCClientError.d.ts.map +1 -1
- package/dist/TRPCClientError.js +48 -72
- package/dist/TRPCClientError.mjs +48 -71
- package/dist/TRPCClientError.mjs.map +1 -0
- package/dist/_virtual/rolldown_runtime.js +39 -0
- package/dist/_virtual/rolldown_runtime.mjs +27 -0
- package/dist/createTRPCClient.d.mts +69 -0
- package/dist/createTRPCClient.d.mts.map +1 -0
- package/dist/createTRPCClient.d.ts +34 -34
- package/dist/createTRPCClient.d.ts.map +1 -1
- package/dist/createTRPCClient.js +34 -34
- package/dist/createTRPCClient.mjs +33 -31
- package/dist/createTRPCClient.mjs.map +1 -0
- package/dist/createTRPCUntypedClient.d.mts +8 -0
- package/dist/createTRPCUntypedClient.d.mts.map +1 -0
- package/dist/createTRPCUntypedClient.d.ts +7 -6
- package/dist/createTRPCUntypedClient.d.ts.map +1 -1
- package/dist/createTRPCUntypedClient.js +5 -6
- package/dist/createTRPCUntypedClient.mjs +6 -3
- package/dist/createTRPCUntypedClient.mjs.map +1 -0
- package/dist/getFetch.d.mts +9 -0
- package/dist/getFetch.d.mts.map +1 -0
- package/dist/getFetch.d.ts +8 -2
- package/dist/getFetch.d.ts.map +1 -1
- package/dist/getFetch.js +8 -13
- package/dist/getFetch.mjs +8 -11
- package/dist/getFetch.mjs.map +1 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.d.ts +21 -16
- package/dist/index.js +42 -42
- package/dist/index.mjs +19 -15
- package/dist/internals/TRPCUntypedClient.d.mts +45 -0
- package/dist/internals/TRPCUntypedClient.d.mts.map +1 -0
- package/dist/internals/TRPCUntypedClient.d.ts +39 -33
- package/dist/internals/TRPCUntypedClient.d.ts.map +1 -1
- package/dist/internals/TRPCUntypedClient.js +94 -113
- package/dist/internals/TRPCUntypedClient.mjs +93 -110
- package/dist/internals/TRPCUntypedClient.mjs.map +1 -0
- package/dist/internals/dataLoader.js +101 -112
- package/dist/internals/dataLoader.mjs +101 -110
- package/dist/internals/dataLoader.mjs.map +1 -0
- package/dist/internals/inputWithTrackedEventId.js +9 -12
- package/dist/internals/inputWithTrackedEventId.mjs +9 -10
- package/dist/internals/inputWithTrackedEventId.mjs.map +1 -0
- package/dist/internals/signals.js +39 -40
- package/dist/internals/signals.mjs +39 -39
- package/dist/internals/signals.mjs.map +1 -0
- package/dist/internals/transformer.d.mts +46 -0
- package/dist/internals/transformer.d.mts.map +1 -0
- package/dist/internals/transformer.d.ts +26 -22
- package/dist/internals/transformer.d.ts.map +1 -1
- package/dist/internals/transformer.js +25 -26
- package/dist/internals/transformer.mjs +25 -24
- package/dist/internals/transformer.mjs.map +1 -0
- package/dist/internals/types.d.mts +84 -0
- package/dist/internals/types.d.mts.map +1 -0
- package/dist/internals/types.d.ts +44 -42
- package/dist/internals/types.d.ts.map +1 -1
- package/dist/links/HTTPBatchLinkOptions.d.mts +25 -0
- package/dist/links/HTTPBatchLinkOptions.d.mts.map +1 -0
- package/dist/links/HTTPBatchLinkOptions.d.ts +23 -18
- package/dist/links/HTTPBatchLinkOptions.d.ts.map +1 -1
- package/dist/links/httpBatchLink.d.mts +15 -0
- package/dist/links/httpBatchLink.d.mts.map +1 -0
- package/dist/links/httpBatchLink.d.ts +11 -4
- package/dist/links/httpBatchLink.d.ts.map +1 -1
- package/dist/links/httpBatchLink.js +90 -106
- package/dist/links/httpBatchLink.mjs +89 -103
- package/dist/links/httpBatchLink.mjs.map +1 -0
- package/dist/links/httpBatchStreamLink.d.mts +19 -0
- package/dist/links/httpBatchStreamLink.d.mts.map +1 -0
- package/dist/links/httpBatchStreamLink.d.ts +12 -5
- package/dist/links/httpBatchStreamLink.d.ts.map +1 -1
- package/dist/links/httpBatchStreamLink.js +120 -144
- package/dist/links/httpBatchStreamLink.mjs +119 -141
- package/dist/links/httpBatchStreamLink.mjs.map +1 -0
- package/dist/links/httpLink.d.mts +23 -0
- package/dist/links/httpLink.d.mts.map +1 -0
- package/dist/links/httpLink.d.ts +18 -12
- package/dist/links/httpLink.d.ts.map +1 -1
- package/dist/links/httpLink.js +74 -90
- package/dist/links/httpLink.mjs +73 -87
- package/dist/links/httpLink.mjs.map +1 -0
- package/dist/links/httpSubscriptionLink.d.mts +29 -0
- package/dist/links/httpSubscriptionLink.d.mts.map +1 -0
- package/dist/links/httpSubscriptionLink.d.ts +20 -17
- package/dist/links/httpSubscriptionLink.d.ts.map +1 -1
- package/dist/links/httpSubscriptionLink.js +134 -179
- package/dist/links/httpSubscriptionLink.mjs +133 -176
- package/dist/links/httpSubscriptionLink.mjs.map +1 -0
- package/dist/links/internals/contentTypes.d.mts +9 -0
- package/dist/links/internals/contentTypes.d.mts.map +1 -0
- package/dist/links/internals/contentTypes.d.ts +8 -3
- package/dist/links/internals/contentTypes.d.ts.map +1 -1
- package/dist/links/internals/contentTypes.js +6 -6
- package/dist/links/internals/contentTypes.mjs +6 -4
- package/dist/links/internals/contentTypes.mjs.map +1 -0
- package/dist/links/internals/createChain.js +23 -23
- package/dist/links/internals/createChain.mjs +22 -20
- package/dist/links/internals/createChain.mjs.map +1 -0
- package/dist/links/internals/httpUtils.d.mts +25 -0
- package/dist/links/internals/httpUtils.d.mts.map +1 -0
- package/dist/links/internals/httpUtils.d.ts +20 -63
- package/dist/links/internals/httpUtils.d.ts.map +1 -1
- package/dist/links/internals/httpUtils.js +93 -116
- package/dist/links/internals/httpUtils.mjs +94 -113
- package/dist/links/internals/httpUtils.mjs.map +1 -0
- package/dist/links/internals/subscriptions.d.mts +19 -0
- package/dist/links/internals/subscriptions.d.mts.map +1 -0
- package/dist/links/internals/subscriptions.d.ts +10 -8
- package/dist/links/internals/subscriptions.d.ts.map +1 -1
- package/dist/links/internals/urlWithConnectionParams.d.mts +24 -0
- package/dist/links/internals/urlWithConnectionParams.d.mts.map +1 -0
- package/dist/links/internals/urlWithConnectionParams.d.ts +19 -18
- package/dist/links/internals/urlWithConnectionParams.d.ts.map +1 -1
- package/dist/links/internals/urlWithConnectionParams.js +8 -6
- package/dist/links/internals/urlWithConnectionParams.mjs +8 -4
- package/dist/links/internals/urlWithConnectionParams.mjs.map +1 -0
- package/dist/links/localLink.d.mts +21 -0
- package/dist/links/localLink.d.mts.map +1 -0
- package/dist/links/localLink.d.ts +21 -0
- package/dist/links/localLink.d.ts.map +1 -0
- package/dist/links/localLink.js +192 -0
- package/dist/links/localLink.mjs +193 -0
- package/dist/links/localLink.mjs.map +1 -0
- package/dist/links/loggerLink.d.mts +55 -0
- package/dist/links/loggerLink.d.mts.map +1 -0
- package/dist/links/loggerLink.d.ts +39 -36
- package/dist/links/loggerLink.d.ts.map +1 -1
- package/dist/links/loggerLink.js +113 -166
- package/dist/links/loggerLink.mjs +112 -163
- package/dist/links/loggerLink.mjs.map +1 -0
- package/dist/links/retryLink.d.mts +36 -0
- package/dist/links/retryLink.d.mts.map +1 -0
- package/dist/links/retryLink.d.ts +28 -25
- package/dist/links/retryLink.d.ts.map +1 -1
- package/dist/links/retryLink.js +60 -68
- package/dist/links/retryLink.mjs +59 -65
- package/dist/links/retryLink.mjs.map +1 -0
- package/dist/links/splitLink.d.mts +20 -0
- package/dist/links/splitLink.d.mts.map +1 -0
- package/dist/links/splitLink.d.ts +18 -12
- package/dist/links/splitLink.d.ts.map +1 -1
- package/dist/links/splitLink.js +20 -21
- package/dist/links/splitLink.mjs +19 -18
- package/dist/links/splitLink.mjs.map +1 -0
- package/dist/links/types.d.mts +68 -0
- package/dist/links/types.d.mts.map +1 -0
- package/dist/links/types.d.ts +34 -29
- package/dist/links/types.d.ts.map +1 -1
- package/dist/links/wsLink/createWsClient.d.mts +9 -0
- package/dist/links/wsLink/createWsClient.d.mts.map +1 -0
- package/dist/links/wsLink/createWsClient.d.ts +8 -5
- package/dist/links/wsLink/createWsClient.d.ts.map +1 -1
- package/dist/links/wsLink/createWsClient.js +5 -5
- package/dist/links/wsLink/createWsClient.mjs +5 -2
- package/dist/links/wsLink/createWsClient.mjs.map +1 -0
- package/dist/links/wsLink/wsClient/options.d.mts +69 -0
- package/dist/links/wsLink/wsClient/options.d.mts.map +1 -0
- package/dist/links/wsLink/wsClient/options.d.ts +53 -63
- package/dist/links/wsLink/wsClient/options.d.ts.map +1 -1
- package/dist/links/wsLink/wsClient/options.js +14 -12
- package/dist/links/wsLink/wsClient/options.mjs +14 -10
- package/dist/links/wsLink/wsClient/options.mjs.map +1 -0
- package/dist/links/wsLink/wsClient/requestManager.js +133 -140
- package/dist/links/wsLink/wsClient/requestManager.mjs +133 -137
- package/dist/links/wsLink/wsClient/requestManager.mjs.map +1 -0
- package/dist/links/wsLink/wsClient/utils.js +64 -81
- package/dist/links/wsLink/wsClient/utils.mjs +64 -78
- package/dist/links/wsLink/wsClient/utils.mjs.map +1 -0
- package/dist/links/wsLink/wsClient/wsClient.d.mts +101 -0
- package/dist/links/wsLink/wsClient/wsClient.d.mts.map +1 -0
- package/dist/links/wsLink/wsClient/wsClient.d.ts +95 -78
- package/dist/links/wsLink/wsClient/wsClient.d.ts.map +1 -1
- package/dist/links/wsLink/wsClient/wsClient.js +273 -322
- package/dist/links/wsLink/wsClient/wsClient.mjs +272 -319
- package/dist/links/wsLink/wsClient/wsClient.mjs.map +1 -0
- package/dist/links/wsLink/wsClient/wsConnection.js +155 -178
- package/dist/links/wsLink/wsClient/wsConnection.mjs +154 -175
- package/dist/links/wsLink/wsClient/wsConnection.mjs.map +1 -0
- package/dist/links/wsLink/wsLink.d.mts +14 -0
- package/dist/links/wsLink/wsLink.d.mts.map +1 -0
- package/dist/links/wsLink/wsLink.d.ts +12 -9
- package/dist/links/wsLink/wsLink.d.ts.map +1 -1
- package/dist/links/wsLink/wsLink.js +30 -31
- package/dist/links/wsLink/wsLink.mjs +29 -28
- package/dist/links/wsLink/wsLink.mjs.map +1 -0
- package/dist/links.js +11 -0
- package/dist/links.mjs +11 -0
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +68 -0
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.mjs +66 -0
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.mjs.map +1 -0
- package/dist/unstable-internals.d.mts +3 -0
- package/dist/unstable-internals.d.ts +3 -3
- package/dist/unstable-internals.js +2 -6
- package/dist/unstable-internals.mjs +3 -1
- 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 +63 -30
- package/src/TRPCClientError.ts +4 -9
- package/src/internals/signals.ts +16 -0
- package/src/links/httpSubscriptionLink.ts +3 -18
- package/src/links/localLink.ts +277 -0
- package/src/links.ts +1 -0
- package/unstable-internals/package.json +1 -0
- package/dist/bundle-analysis.json +0 -433
- package/dist/index.d.ts.map +0 -1
- package/dist/internals/dataLoader.d.ts +0 -13
- package/dist/internals/dataLoader.d.ts.map +0 -1
- package/dist/internals/inputWithTrackedEventId.d.ts +0 -2
- package/dist/internals/inputWithTrackedEventId.d.ts.map +0 -1
- package/dist/internals/signals.d.ts +0 -15
- package/dist/internals/signals.d.ts.map +0 -1
- package/dist/links/internals/createChain.d.ts +0 -8
- package/dist/links/internals/createChain.d.ts.map +0 -1
- package/dist/links/internals/dedupeLink.d.ts +0 -7
- package/dist/links/internals/dedupeLink.d.ts.map +0 -1
- 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/utils.d.ts +0 -38
- package/dist/links/wsLink/wsClient/utils.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/wsConnection.d.ts +0 -79
- package/dist/links/wsLink/wsClient/wsConnection.d.ts.map +0 -1
- package/dist/links.d.ts +0 -11
- package/dist/links.d.ts.map +0 -1
- package/dist/unstable-internals.d.ts.map +0 -1
- 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCClient.d.ts","
|
|
1
|
+
{"version":3,"file":"createTRPCClient.d.ts","names":[],"sources":["../src/createTRPCClient.ts"],"sourcesContent":[],"mappings":"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"}
|
package/dist/createTRPCClient.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
|
|
2
|
+
const require_TRPCUntypedClient = require('./internals/TRPCUntypedClient.js');
|
|
3
|
+
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const untypedClientSymbol = Symbol.for('trpc_untypedClient');
|
|
5
|
+
//#region src/createTRPCClient.ts
|
|
6
|
+
const untypedClientSymbol = Symbol.for("trpc_untypedClient");
|
|
7
7
|
const clientCallTypeMap = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
query: "query",
|
|
9
|
+
mutate: "mutation",
|
|
10
|
+
subscribe: "subscription"
|
|
11
11
|
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
|
|
12
|
+
/** @internal */
|
|
13
|
+
const clientCallTypeToProcedureType = (clientCallType) => {
|
|
14
|
+
return clientCallTypeMap[clientCallType];
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return proxy[key];
|
|
31
|
-
});
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
function createTRPCClientProxy(client) {
|
|
20
|
+
const proxy = (0, __trpc_server_unstable_core_do_not_import.createRecursiveProxy)(({ path, args }) => {
|
|
21
|
+
const pathCopy = [...path];
|
|
22
|
+
const procedureType = clientCallTypeToProcedureType(pathCopy.pop());
|
|
23
|
+
const fullPath = pathCopy.join(".");
|
|
24
|
+
return client[procedureType](fullPath, ...args);
|
|
25
|
+
});
|
|
26
|
+
return (0, __trpc_server_unstable_core_do_not_import.createFlatProxy)((key) => {
|
|
27
|
+
if (key === untypedClientSymbol) return client;
|
|
28
|
+
return proxy[key];
|
|
29
|
+
});
|
|
32
30
|
}
|
|
33
31
|
function createTRPCClient(opts) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const client = new require_TRPCUntypedClient.TRPCUntypedClient(opts);
|
|
33
|
+
const proxy = createTRPCClientProxy(client);
|
|
34
|
+
return proxy;
|
|
37
35
|
}
|
|
38
36
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
* Get an untyped client from a proxy client
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
function getUntypedClient(client) {
|
|
41
|
+
return client[untypedClientSymbol];
|
|
43
42
|
}
|
|
44
43
|
|
|
44
|
+
//#endregion
|
|
45
45
|
exports.clientCallTypeToProcedureType = clientCallTypeToProcedureType;
|
|
46
46
|
exports.createTRPCClient = createTRPCClient;
|
|
47
47
|
exports.createTRPCClientProxy = createTRPCClientProxy;
|
|
48
|
-
exports.getUntypedClient = getUntypedClient;
|
|
48
|
+
exports.getUntypedClient = getUntypedClient;
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TRPCUntypedClient } from "./internals/TRPCUntypedClient.mjs";
|
|
2
|
+
import { createFlatProxy, createRecursiveProxy } from "@trpc/server/unstable-core-do-not-import";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
//#region src/createTRPCClient.ts
|
|
5
|
+
const untypedClientSymbol = Symbol.for("trpc_untypedClient");
|
|
5
6
|
const clientCallTypeMap = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
query: "query",
|
|
8
|
+
mutate: "mutation",
|
|
9
|
+
subscribe: "subscription"
|
|
9
10
|
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
|
|
11
|
+
/** @internal */
|
|
12
|
+
const clientCallTypeToProcedureType = (clientCallType) => {
|
|
13
|
+
return clientCallTypeMap[clientCallType];
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return proxy[key];
|
|
29
|
-
});
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
function createTRPCClientProxy(client) {
|
|
19
|
+
const proxy = createRecursiveProxy(({ path, args }) => {
|
|
20
|
+
const pathCopy = [...path];
|
|
21
|
+
const procedureType = clientCallTypeToProcedureType(pathCopy.pop());
|
|
22
|
+
const fullPath = pathCopy.join(".");
|
|
23
|
+
return client[procedureType](fullPath, ...args);
|
|
24
|
+
});
|
|
25
|
+
return createFlatProxy((key) => {
|
|
26
|
+
if (key === untypedClientSymbol) return client;
|
|
27
|
+
return proxy[key];
|
|
28
|
+
});
|
|
30
29
|
}
|
|
31
30
|
function createTRPCClient(opts) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
const client = new TRPCUntypedClient(opts);
|
|
32
|
+
const proxy = createTRPCClientProxy(client);
|
|
33
|
+
return proxy;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
* Get an untyped client from a proxy client
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
function getUntypedClient(client) {
|
|
40
|
+
return client[untypedClientSymbol];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
//#endregion
|
|
43
44
|
export { clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, getUntypedClient };
|
|
45
|
+
//# sourceMappingURL=createTRPCClient.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTRPCClient.mjs","names":["clientCallTypeMap: Record<\n keyof DecorateProcedure<any, any>,\n ProcedureType\n>","clientCallType: string","client: TRPCUntypedClient<TRouter>","opts: CreateTRPCClientOptions<TRouter>","client: TRPCClient<TRouter>"],"sources":["../src/createTRPCClient.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport type { Unsubscribable } from '@trpc/server/observable';\nimport type {\n AnyProcedure,\n AnyRouter,\n inferClientTypes,\n inferProcedureInput,\n InferrableClientTypes,\n inferTransformedProcedureOutput,\n ProcedureType,\n RouterRecord,\n} from '@trpc/server/unstable-core-do-not-import';\nimport {\n createFlatProxy,\n createRecursiveProxy,\n} from '@trpc/server/unstable-core-do-not-import';\nimport type { CreateTRPCClientOptions } from './createTRPCUntypedClient';\nimport type { TRPCSubscriptionObserver } from './internals/TRPCUntypedClient';\nimport { TRPCUntypedClient } from './internals/TRPCUntypedClient';\nimport type { TRPCProcedureOptions } from './internals/types';\nimport type { TRPCClientError } from './TRPCClientError';\n\n/**\n * @public\n * @deprecated use {@link TRPCClient} instead, will be removed in v12\n **/\nexport type inferRouterClient<TRouter extends AnyRouter> = TRPCClient<TRouter>;\n\n/**\n * @public\n * @deprecated use {@link TRPCClient} instead, will be removed in v12\n **/\nexport type CreateTRPCClient<TRouter extends AnyRouter> = TRPCClient<TRouter>;\n\nconst untypedClientSymbol = Symbol.for('trpc_untypedClient');\n\n/**\n * @public\n **/\nexport type TRPCClient<TRouter extends AnyRouter> = DecoratedProcedureRecord<\n {\n transformer: TRouter['_def']['_config']['$types']['transformer'];\n errorShape: TRouter['_def']['_config']['$types']['errorShape'];\n },\n TRouter['_def']['record']\n> & {\n [untypedClientSymbol]: TRPCUntypedClient<TRouter>;\n};\n\ntype ResolverDef = {\n input: any;\n output: any;\n transformer: boolean;\n errorShape: any;\n};\n\ntype coerceAsyncGeneratorToIterable<T> =\n T extends AsyncGenerator<infer $T, infer $Return, infer $Next>\n ? AsyncIterable<$T, $Return, $Next>\n : T;\n\n/** @internal */\nexport type Resolver<TDef extends ResolverDef> = (\n input: TDef['input'],\n opts?: TRPCProcedureOptions,\n) => Promise<coerceAsyncGeneratorToIterable<TDef['output']>>;\n\ntype SubscriptionResolver<TDef extends ResolverDef> = (\n input: TDef['input'],\n opts: Partial<\n TRPCSubscriptionObserver<TDef['output'], TRPCClientError<TDef>>\n > &\n TRPCProcedureOptions,\n) => Unsubscribable;\n\ntype DecorateProcedure<\n TType extends ProcedureType,\n TDef extends ResolverDef,\n> = TType extends 'query'\n ? {\n query: Resolver<TDef>;\n }\n : TType extends 'mutation'\n ? {\n mutate: Resolver<TDef>;\n }\n : TType extends 'subscription'\n ? {\n subscribe: SubscriptionResolver<TDef>;\n }\n : never;\n\n/**\n * @internal\n */\ntype DecoratedProcedureRecord<\n TRoot extends InferrableClientTypes,\n TRecord extends RouterRecord,\n> = {\n [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value\n ? $Value extends AnyProcedure\n ? DecorateProcedure<\n $Value['_def']['type'],\n {\n input: inferProcedureInput<$Value>;\n output: inferTransformedProcedureOutput<\n inferClientTypes<TRoot>,\n $Value\n >;\n errorShape: inferClientTypes<TRoot>['errorShape'];\n transformer: inferClientTypes<TRoot>['transformer'];\n }\n >\n : $Value extends RouterRecord\n ? DecoratedProcedureRecord<TRoot, $Value>\n : never\n : never;\n};\n\nconst clientCallTypeMap: Record<\n keyof DecorateProcedure<any, any>,\n ProcedureType\n> = {\n query: 'query',\n mutate: 'mutation',\n subscribe: 'subscription',\n};\n\n/** @internal */\nexport const clientCallTypeToProcedureType = (\n clientCallType: string,\n): ProcedureType => {\n return clientCallTypeMap[clientCallType as keyof typeof clientCallTypeMap];\n};\n\n/**\n * @internal\n */\nexport function createTRPCClientProxy<TRouter extends AnyRouter>(\n client: TRPCUntypedClient<TRouter>,\n): TRPCClient<TRouter> {\n const proxy = createRecursiveProxy<TRPCClient<TRouter>>(({ path, args }) => {\n const pathCopy = [...path];\n const procedureType = clientCallTypeToProcedureType(pathCopy.pop()!);\n\n const fullPath = pathCopy.join('.');\n\n return (client[procedureType] as any)(fullPath, ...(args as any));\n });\n return createFlatProxy<TRPCClient<TRouter>>((key) => {\n if (key === untypedClientSymbol) {\n return client;\n }\n return proxy[key];\n });\n}\n\nexport function createTRPCClient<TRouter extends AnyRouter>(\n opts: CreateTRPCClientOptions<TRouter>,\n): TRPCClient<TRouter> {\n const client = new TRPCUntypedClient(opts);\n const proxy = createTRPCClientProxy<TRouter>(client);\n return proxy;\n}\n\n/**\n * Get an untyped client from a proxy client\n * @internal\n */\nexport function getUntypedClient<TRouter extends AnyRouter>(\n client: TRPCClient<TRouter>,\n): TRPCUntypedClient<TRouter> {\n return client[untypedClientSymbol];\n}\n"],"mappings":";;;;AAkCA,MAAM,sBAAsB,OAAO,IAAI,qBAAqB;AAqF5D,MAAMA,oBAGF;CACF,OAAO;CACP,QAAQ;CACR,WAAW;AACZ;;AAGD,MAAa,gCAAgC,CAC3CC,mBACkB;AAClB,QAAO,kBAAkB;AAC1B;;;;AAKD,SAAgB,sBACdC,QACqB;CACrB,MAAM,QAAQ,qBAA0C,CAAC,EAAE,MAAM,MAAM,KAAK;EAC1E,MAAM,WAAW,CAAC,GAAG,IAAK;EAC1B,MAAM,gBAAgB,8BAA8B,SAAS,KAAK,CAAE;EAEpE,MAAM,WAAW,SAAS,KAAK,IAAI;AAEnC,SAAO,AAAC,OAAO,eAAuB,UAAU,GAAI,KAAa;CAClE,EAAC;AACF,QAAO,gBAAqC,CAAC,QAAQ;AACnD,MAAI,QAAQ,oBACV,QAAO;AAET,SAAO,MAAM;CACd,EAAC;AACH;AAED,SAAgB,iBACdC,MACqB;CACrB,MAAM,SAAS,IAAI,kBAAkB;CACrC,MAAM,QAAQ,sBAA+B,OAAO;AACpD,QAAO;AACR;;;;;AAMD,SAAgB,iBACdC,QAC4B;AAC5B,QAAO,OAAO;AACf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from "./internals/TRPCUntypedClient.mjs";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/createTRPCUntypedClient.d.ts
|
|
5
|
+
declare function createTRPCUntypedClient<TRouter extends AnyRouter>(opts: CreateTRPCClientOptions<TRouter>): TRPCUntypedClient<TRouter>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createTRPCUntypedClient };
|
|
8
|
+
//# sourceMappingURL=createTRPCUntypedClient.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTRPCUntypedClient.d.mts","names":[],"sources":["../src/createTRPCUntypedClient.ts"],"sourcesContent":[],"mappings":";;;;iBAIgB,wCAAwC,iBAChD,wBAAwB,WAC7B,kBAAkB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from "./internals/TRPCUntypedClient.js";
|
|
2
|
+
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
3
|
+
|
|
4
|
+
//#region src/createTRPCUntypedClient.d.ts
|
|
5
|
+
declare function createTRPCUntypedClient<TRouter extends AnyRouter>(opts: CreateTRPCClientOptions<TRouter>): TRPCUntypedClient<TRouter>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createTRPCUntypedClient };
|
|
7
8
|
//# sourceMappingURL=createTRPCUntypedClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCUntypedClient.d.ts","
|
|
1
|
+
{"version":3,"file":"createTRPCUntypedClient.d.ts","names":[],"sources":["../src/createTRPCUntypedClient.ts"],"sourcesContent":[],"mappings":";;;;iBAIgB,wCAAwC,iBAChD,wBAAwB,WAC7B,kBAAkB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var TRPCUntypedClient = require('./internals/TRPCUntypedClient.js');
|
|
1
|
+
const require_TRPCUntypedClient = require('./internals/TRPCUntypedClient.js');
|
|
4
2
|
|
|
3
|
+
//#region src/createTRPCUntypedClient.ts
|
|
5
4
|
function createTRPCUntypedClient(opts) {
|
|
6
|
-
|
|
5
|
+
return new require_TRPCUntypedClient.TRPCUntypedClient(opts);
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
exports.createTRPCUntypedClient = createTRPCUntypedClient;
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.createTRPCUntypedClient = createTRPCUntypedClient;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { TRPCUntypedClient } from
|
|
1
|
+
import { TRPCUntypedClient } from "./internals/TRPCUntypedClient.mjs";
|
|
2
2
|
|
|
3
|
+
//#region src/createTRPCUntypedClient.ts
|
|
3
4
|
function createTRPCUntypedClient(opts) {
|
|
4
|
-
|
|
5
|
+
return new TRPCUntypedClient(opts);
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
export { createTRPCUntypedClient };
|
|
10
|
+
//# sourceMappingURL=createTRPCUntypedClient.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTRPCUntypedClient.mjs","names":["opts: CreateTRPCClientOptions<TRouter>"],"sources":["../src/createTRPCUntypedClient.ts"],"sourcesContent":["import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';\nimport type { CreateTRPCClientOptions } from './internals/TRPCUntypedClient';\nimport { TRPCUntypedClient } from './internals/TRPCUntypedClient';\n\nexport function createTRPCUntypedClient<TRouter extends AnyRouter>(\n opts: CreateTRPCClientOptions<TRouter>,\n): TRPCUntypedClient<TRouter> {\n return new TRPCUntypedClient(opts);\n}\n\nexport type {\n CreateTRPCClientOptions,\n TRPCRequestOptions,\n} from './internals/TRPCUntypedClient';\nexport { TRPCUntypedClient } from './internals/TRPCUntypedClient';\n"],"mappings":";;;AAIA,SAAgB,wBACdA,MAC4B;AAC5B,QAAO,IAAI,kBAAkB;AAC9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FetchEsque, NativeFetchEsque } from "./internals/types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/getFetch.d.ts
|
|
4
|
+
declare function getFetch(customFetchImpl?: FetchEsque | NativeFetchEsque): FetchEsque;
|
|
5
|
+
//# sourceMappingURL=getFetch.d.ts.map
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { getFetch };
|
|
9
|
+
//# sourceMappingURL=getFetch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFetch.d.mts","names":[],"sources":["../src/getFetch.ts"],"sourcesContent":[],"mappings":";;;iBAMgB,QAAA,mBACI,aAAa,mBAC9B"}
|
package/dist/getFetch.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { FetchEsque, NativeFetchEsque } from "./internals/types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/getFetch.d.ts
|
|
4
|
+
declare function getFetch(customFetchImpl?: FetchEsque | NativeFetchEsque): FetchEsque;
|
|
5
|
+
//# sourceMappingURL=getFetch.d.ts.map
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { getFetch };
|
|
3
9
|
//# sourceMappingURL=getFetch.d.ts.map
|
package/dist/getFetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFetch.d.ts","
|
|
1
|
+
{"version":3,"file":"getFetch.d.ts","names":[],"sources":["../src/getFetch.ts"],"sourcesContent":[],"mappings":";;;iBAMgB,QAAA,mBACI,aAAa,mBAC9B"}
|
package/dist/getFetch.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
//#region src/getFetch.ts
|
|
3
|
+
const isFunction = (fn) => typeof fn === "function";
|
|
4
4
|
function getFetch(customFetchImpl) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return window.fetch;
|
|
10
|
-
}
|
|
11
|
-
if (typeof globalThis !== 'undefined' && isFunction(globalThis.fetch)) {
|
|
12
|
-
return globalThis.fetch;
|
|
13
|
-
}
|
|
14
|
-
throw new Error('No fetch implementation found');
|
|
5
|
+
if (customFetchImpl) return customFetchImpl;
|
|
6
|
+
if (typeof window !== "undefined" && isFunction(window.fetch)) return window.fetch;
|
|
7
|
+
if (typeof globalThis !== "undefined" && isFunction(globalThis.fetch)) return globalThis.fetch;
|
|
8
|
+
throw new Error("No fetch implementation found");
|
|
15
9
|
}
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.getFetch = getFetch;
|
package/dist/getFetch.mjs
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/getFetch.ts
|
|
2
|
+
const isFunction = (fn) => typeof fn === "function";
|
|
2
3
|
function getFetch(customFetchImpl) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return window.fetch;
|
|
8
|
-
}
|
|
9
|
-
if (typeof globalThis !== 'undefined' && isFunction(globalThis.fetch)) {
|
|
10
|
-
return globalThis.fetch;
|
|
11
|
-
}
|
|
12
|
-
throw new Error('No fetch implementation found');
|
|
4
|
+
if (customFetchImpl) return customFetchImpl;
|
|
5
|
+
if (typeof window !== "undefined" && isFunction(window.fetch)) return window.fetch;
|
|
6
|
+
if (typeof globalThis !== "undefined" && isFunction(globalThis.fetch)) return globalThis.fetch;
|
|
7
|
+
throw new Error("No fetch implementation found");
|
|
13
8
|
}
|
|
14
9
|
|
|
10
|
+
//#endregion
|
|
15
11
|
export { getFetch };
|
|
12
|
+
//# sourceMappingURL=getFetch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFetch.mjs","names":["fn: unknown","customFetchImpl?: FetchEsque | NativeFetchEsque"],"sources":["../src/getFetch.ts"],"sourcesContent":["import type { FetchEsque, NativeFetchEsque } from './internals/types';\n\ntype AnyFn = (...args: any[]) => unknown;\n\nconst isFunction = (fn: unknown): fn is AnyFn => typeof fn === 'function';\n\nexport function getFetch(\n customFetchImpl?: FetchEsque | NativeFetchEsque,\n): FetchEsque {\n if (customFetchImpl) {\n return customFetchImpl as FetchEsque;\n }\n\n if (typeof window !== 'undefined' && isFunction(window.fetch)) {\n return window.fetch as FetchEsque;\n }\n\n if (typeof globalThis !== 'undefined' && isFunction(globalThis.fetch)) {\n return globalThis.fetch as FetchEsque;\n }\n\n throw new Error('No fetch implementation found');\n}\n"],"mappings":";AAIA,MAAM,aAAa,CAACA,cAAoC,OAAO;AAE/D,SAAgB,SACdC,iBACY;AACZ,KAAI,gBACF,QAAO;AAGT,YAAW,WAAW,eAAe,WAAW,OAAO,MAAM,CAC3D,QAAO,OAAO;AAGhB,YAAW,eAAe,eAAe,WAAW,WAAW,MAAM,CACnE,QAAO,WAAW;AAGpB,OAAM,IAAI,MAAM;AACjB"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TRPCProcedureOptions } from "./internals/types.mjs";
|
|
2
|
+
import { TRPCClientError, TRPCClientErrorBase, TRPCClientErrorLike, isTRPCClientError } from "./TRPCClientError.mjs";
|
|
3
|
+
import { isFormData, isNonJsonSerializable, isOctetType } from "./links/internals/contentTypes.mjs";
|
|
4
|
+
import { HTTPHeaders, Operation, OperationContext, OperationLink, OperationResultEnvelope, OperationResultObservable, OperationResultObserver, TRPCClientRuntime, TRPCFetch, TRPCLink } from "./links/types.mjs";
|
|
5
|
+
import { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from "./internals/TRPCUntypedClient.mjs";
|
|
6
|
+
import { createTRPCUntypedClient } from "./createTRPCUntypedClient.mjs";
|
|
7
|
+
import { CreateTRPCClient, Resolver, TRPCClient, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, getUntypedClient, inferRouterClient } from "./createTRPCClient.mjs";
|
|
8
|
+
import { getFetch } from "./getFetch.mjs";
|
|
9
|
+
import { HTTPBatchLinkOptions } from "./links/HTTPBatchLinkOptions.mjs";
|
|
10
|
+
import { httpBatchLink } from "./links/httpBatchLink.mjs";
|
|
11
|
+
import { httpBatchStreamLink, unstable_httpBatchStreamLink } from "./links/httpBatchStreamLink.mjs";
|
|
12
|
+
import { HTTPLinkOptions, httpLink } from "./links/httpLink.mjs";
|
|
13
|
+
import { LoggerLinkOptions, loggerLink } from "./links/loggerLink.mjs";
|
|
14
|
+
import { splitLink } from "./links/splitLink.mjs";
|
|
15
|
+
import { WebSocketClientOptions } from "./links/wsLink/wsClient/options.mjs";
|
|
16
|
+
import { TRPCWebSocketClient, createWSClient } from "./links/wsLink/createWsClient.mjs";
|
|
17
|
+
import { WebSocketLinkOptions, wsLink } from "./links/wsLink/wsLink.mjs";
|
|
18
|
+
import { httpSubscriptionLink, unstable_httpSubscriptionLink } from "./links/httpSubscriptionLink.mjs";
|
|
19
|
+
import { retryLink } from "./links/retryLink.mjs";
|
|
20
|
+
import { LocalLinkOptions, experimental_localLink } from "./links/localLink.mjs";
|
|
21
|
+
export { CreateTRPCClient, CreateTRPCClientOptions, HTTPBatchLinkOptions, HTTPHeaders, HTTPLinkOptions, LocalLinkOptions, LoggerLinkOptions, Operation, OperationContext, OperationLink, OperationResultEnvelope, OperationResultObservable, OperationResultObserver, Resolver, TRPCClient, TRPCClientError, TRPCClientErrorBase, TRPCClientErrorLike, TRPCClientRuntime, TRPCFetch, TRPCLink, TRPCProcedureOptions, TRPCRequestOptions, TRPCUntypedClient, TRPCWebSocketClient, WebSocketClientOptions, WebSocketLinkOptions, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, createTRPCClient as createTRPCProxyClient, createTRPCUntypedClient, createWSClient, experimental_localLink, getFetch, getUntypedClient, httpBatchLink, httpBatchStreamLink, httpLink, httpSubscriptionLink, inferRouterClient, inferRouterClient as inferRouterProxyClient, isFormData, isNonJsonSerializable, isOctetType, isTRPCClientError, loggerLink, retryLink, splitLink, unstable_httpBatchStreamLink, unstable_httpSubscriptionLink, wsLink };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { TRPCProcedureOptions } from "./internals/types.js";
|
|
2
|
+
import { TRPCClientError, TRPCClientErrorBase, TRPCClientErrorLike, isTRPCClientError } from "./TRPCClientError.js";
|
|
3
|
+
import { isFormData, isNonJsonSerializable, isOctetType } from "./links/internals/contentTypes.js";
|
|
4
|
+
import { HTTPHeaders, Operation, OperationContext, OperationLink, OperationResultEnvelope, OperationResultObservable, OperationResultObserver, TRPCClientRuntime, TRPCFetch, TRPCLink } from "./links/types.js";
|
|
5
|
+
import { CreateTRPCClientOptions, TRPCRequestOptions, TRPCUntypedClient } from "./internals/TRPCUntypedClient.js";
|
|
6
|
+
import { createTRPCUntypedClient } from "./createTRPCUntypedClient.js";
|
|
7
|
+
import { CreateTRPCClient, Resolver, TRPCClient, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, getUntypedClient, inferRouterClient } from "./createTRPCClient.js";
|
|
8
|
+
import { getFetch } from "./getFetch.js";
|
|
9
|
+
import { HTTPBatchLinkOptions } from "./links/HTTPBatchLinkOptions.js";
|
|
10
|
+
import { httpBatchLink } from "./links/httpBatchLink.js";
|
|
11
|
+
import { httpBatchStreamLink, unstable_httpBatchStreamLink } from "./links/httpBatchStreamLink.js";
|
|
12
|
+
import { HTTPLinkOptions, httpLink } from "./links/httpLink.js";
|
|
13
|
+
import { LoggerLinkOptions, loggerLink } from "./links/loggerLink.js";
|
|
14
|
+
import { splitLink } from "./links/splitLink.js";
|
|
15
|
+
import { WebSocketClientOptions } from "./links/wsLink/wsClient/options.js";
|
|
16
|
+
import { TRPCWebSocketClient, createWSClient } from "./links/wsLink/createWsClient.js";
|
|
17
|
+
import { WebSocketLinkOptions, wsLink } from "./links/wsLink/wsLink.js";
|
|
18
|
+
import { httpSubscriptionLink, unstable_httpSubscriptionLink } from "./links/httpSubscriptionLink.js";
|
|
19
|
+
import { retryLink } from "./links/retryLink.js";
|
|
20
|
+
import { LocalLinkOptions, experimental_localLink } from "./links/localLink.js";
|
|
21
|
+
export { CreateTRPCClient, CreateTRPCClientOptions, HTTPBatchLinkOptions, HTTPHeaders, HTTPLinkOptions, LocalLinkOptions, LoggerLinkOptions, Operation, OperationContext, OperationLink, OperationResultEnvelope, OperationResultObservable, OperationResultObserver, Resolver, TRPCClient, TRPCClientError, TRPCClientErrorBase, TRPCClientErrorLike, TRPCClientRuntime, TRPCFetch, TRPCLink, TRPCProcedureOptions, TRPCRequestOptions, TRPCUntypedClient, TRPCWebSocketClient, WebSocketClientOptions, WebSocketLinkOptions, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, createTRPCClient as createTRPCProxyClient, createTRPCUntypedClient, createWSClient, experimental_localLink, getFetch, getUntypedClient, httpBatchLink, httpBatchStreamLink, httpLink, httpSubscriptionLink, inferRouterClient, inferRouterClient as inferRouterProxyClient, isFormData, isNonJsonSerializable, isOctetType, isTRPCClientError, loggerLink, retryLink, splitLink, unstable_httpBatchStreamLink, unstable_httpSubscriptionLink, wsLink };
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
const require_TRPCClientError = require('./TRPCClientError.js');
|
|
2
|
+
const require_TRPCUntypedClient = require('./internals/TRPCUntypedClient.js');
|
|
3
|
+
const require_createTRPCUntypedClient = require('./createTRPCUntypedClient.js');
|
|
4
|
+
const require_createTRPCClient = require('./createTRPCClient.js');
|
|
5
|
+
const require_getFetch = require('./getFetch.js');
|
|
6
|
+
const require_contentTypes = require('./links/internals/contentTypes.js');
|
|
7
|
+
const require_httpBatchLink = require('./links/httpBatchLink.js');
|
|
8
|
+
const require_httpBatchStreamLink = require('./links/httpBatchStreamLink.js');
|
|
9
|
+
const require_httpLink = require('./links/httpLink.js');
|
|
10
|
+
const require_loggerLink = require('./links/loggerLink.js');
|
|
11
|
+
const require_splitLink = require('./links/splitLink.js');
|
|
12
|
+
const require_createWsClient = require('./links/wsLink/createWsClient.js');
|
|
13
|
+
const require_wsLink = require('./links/wsLink/wsLink.js');
|
|
14
|
+
const require_httpSubscriptionLink = require('./links/httpSubscriptionLink.js');
|
|
15
|
+
const require_retryLink = require('./links/retryLink.js');
|
|
16
|
+
const require_localLink = require('./links/localLink.js');
|
|
17
|
+
require('./links.js');
|
|
2
18
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.TRPCClientError = TRPCClientError.TRPCClientError;
|
|
29
|
-
exports.isFormData = contentTypes.isFormData;
|
|
30
|
-
exports.isNonJsonSerializable = contentTypes.isNonJsonSerializable;
|
|
31
|
-
exports.isOctetType = contentTypes.isOctetType;
|
|
32
|
-
exports.httpBatchLink = httpBatchLink.httpBatchLink;
|
|
33
|
-
exports.httpBatchStreamLink = httpBatchStreamLink.httpBatchStreamLink;
|
|
34
|
-
exports.unstable_httpBatchStreamLink = httpBatchStreamLink.unstable_httpBatchStreamLink;
|
|
35
|
-
exports.httpLink = httpLink.httpLink;
|
|
36
|
-
exports.loggerLink = loggerLink.loggerLink;
|
|
37
|
-
exports.splitLink = splitLink.splitLink;
|
|
38
|
-
exports.wsLink = wsLink.wsLink;
|
|
39
|
-
exports.httpSubscriptionLink = httpSubscriptionLink.httpSubscriptionLink;
|
|
40
|
-
exports.unstable_httpSubscriptionLink = httpSubscriptionLink.unstable_httpSubscriptionLink;
|
|
41
|
-
exports.retryLink = retryLink.retryLink;
|
|
42
|
-
exports.TRPCUntypedClient = TRPCUntypedClient.TRPCUntypedClient;
|
|
43
|
-
exports.createWSClient = createWsClient.createWSClient;
|
|
19
|
+
exports.TRPCClientError = require_TRPCClientError.TRPCClientError;
|
|
20
|
+
exports.TRPCUntypedClient = require_TRPCUntypedClient.TRPCUntypedClient;
|
|
21
|
+
exports.clientCallTypeToProcedureType = require_createTRPCClient.clientCallTypeToProcedureType;
|
|
22
|
+
exports.createTRPCClient = require_createTRPCClient.createTRPCClient;
|
|
23
|
+
exports.createTRPCClientProxy = require_createTRPCClient.createTRPCClientProxy;
|
|
24
|
+
exports.createTRPCProxyClient = require_createTRPCClient.createTRPCClient;
|
|
25
|
+
exports.createTRPCUntypedClient = require_createTRPCUntypedClient.createTRPCUntypedClient;
|
|
26
|
+
exports.createWSClient = require_createWsClient.createWSClient;
|
|
27
|
+
exports.experimental_localLink = require_localLink.experimental_localLink;
|
|
28
|
+
exports.getFetch = require_getFetch.getFetch;
|
|
29
|
+
exports.getUntypedClient = require_createTRPCClient.getUntypedClient;
|
|
30
|
+
exports.httpBatchLink = require_httpBatchLink.httpBatchLink;
|
|
31
|
+
exports.httpBatchStreamLink = require_httpBatchStreamLink.httpBatchStreamLink;
|
|
32
|
+
exports.httpLink = require_httpLink.httpLink;
|
|
33
|
+
exports.httpSubscriptionLink = require_httpSubscriptionLink.httpSubscriptionLink;
|
|
34
|
+
exports.isFormData = require_contentTypes.isFormData;
|
|
35
|
+
exports.isNonJsonSerializable = require_contentTypes.isNonJsonSerializable;
|
|
36
|
+
exports.isOctetType = require_contentTypes.isOctetType;
|
|
37
|
+
exports.isTRPCClientError = require_TRPCClientError.isTRPCClientError;
|
|
38
|
+
exports.loggerLink = require_loggerLink.loggerLink;
|
|
39
|
+
exports.retryLink = require_retryLink.retryLink;
|
|
40
|
+
exports.splitLink = require_splitLink.splitLink;
|
|
41
|
+
exports.unstable_httpBatchStreamLink = require_httpBatchStreamLink.unstable_httpBatchStreamLink;
|
|
42
|
+
exports.unstable_httpSubscriptionLink = require_httpSubscriptionLink.unstable_httpSubscriptionLink;
|
|
43
|
+
exports.wsLink = require_wsLink.wsLink;
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { TRPCClientError, isTRPCClientError } from "./TRPCClientError.mjs";
|
|
2
|
+
import { TRPCUntypedClient } from "./internals/TRPCUntypedClient.mjs";
|
|
3
|
+
import { createTRPCUntypedClient } from "./createTRPCUntypedClient.mjs";
|
|
4
|
+
import { clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, getUntypedClient } from "./createTRPCClient.mjs";
|
|
5
|
+
import { getFetch } from "./getFetch.mjs";
|
|
6
|
+
import { isFormData, isNonJsonSerializable, isOctetType } from "./links/internals/contentTypes.mjs";
|
|
7
|
+
import { httpBatchLink } from "./links/httpBatchLink.mjs";
|
|
8
|
+
import { httpBatchStreamLink, unstable_httpBatchStreamLink } from "./links/httpBatchStreamLink.mjs";
|
|
9
|
+
import { httpLink } from "./links/httpLink.mjs";
|
|
10
|
+
import { loggerLink } from "./links/loggerLink.mjs";
|
|
11
|
+
import { splitLink } from "./links/splitLink.mjs";
|
|
12
|
+
import { createWSClient } from "./links/wsLink/createWsClient.mjs";
|
|
13
|
+
import { wsLink } from "./links/wsLink/wsLink.mjs";
|
|
14
|
+
import { httpSubscriptionLink, unstable_httpSubscriptionLink } from "./links/httpSubscriptionLink.mjs";
|
|
15
|
+
import { retryLink } from "./links/retryLink.mjs";
|
|
16
|
+
import { experimental_localLink } from "./links/localLink.mjs";
|
|
17
|
+
import "./links.mjs";
|
|
18
|
+
|
|
19
|
+
export { TRPCClientError, TRPCUntypedClient, clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, createTRPCClient as createTRPCProxyClient, createTRPCUntypedClient, createWSClient, experimental_localLink, getFetch, getUntypedClient, httpBatchLink, httpBatchStreamLink, httpLink, httpSubscriptionLink, isFormData, isNonJsonSerializable, isOctetType, isTRPCClientError, loggerLink, retryLink, splitLink, unstable_httpBatchStreamLink, unstable_httpSubscriptionLink, wsLink };
|