@trpc/next 11.1.3-alpha-tmp-tsdown.23 → 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/app-dir/client.d.mts +2 -3
- package/dist/app-dir/client.d.ts +1 -2
- package/dist/app-dir/client.js +4 -4
- package/dist/app-dir/client.mjs +1 -1
- package/dist/app-dir/client.mjs.map +1 -1
- package/dist/app-dir/create-action-hook.d.mts +1 -2
- package/dist/app-dir/create-action-hook.d.ts +0 -1
- package/dist/app-dir/create-action-hook.js +2 -2
- package/dist/app-dir/links/nextCache.d.mts +0 -1
- package/dist/app-dir/links/nextCache.d.ts +0 -1
- package/dist/app-dir/links/nextCache.js +2 -2
- package/dist/app-dir/links/nextHttp.d.mts +0 -1
- package/dist/app-dir/links/nextHttp.d.ts +0 -1
- package/dist/app-dir/links/nextHttp.js +2 -2
- package/dist/app-dir/server.d.mts +1 -2
- package/dist/app-dir/server.d.mts.map +1 -1
- package/dist/app-dir/server.d.ts +1 -2
- package/dist/app-dir/server.d.ts.map +1 -1
- package/dist/app-dir/server.js +4 -4
- package/dist/app-dir/shared.d.mts +2 -4
- package/dist/app-dir/shared.d.mts.map +1 -1
- package/dist/app-dir/shared.d.ts +2 -4
- package/dist/app-dir/shared.d.ts.map +1 -1
- package/dist/app-dir/types.d.mts +0 -1
- package/dist/app-dir/types.d.ts +0 -1
- package/dist/createTRPCNext.d.mts +4 -7
- package/dist/createTRPCNext.d.mts.map +1 -1
- package/dist/createTRPCNext.d.ts +2 -5
- package/dist/createTRPCNext.d.ts.map +1 -1
- package/dist/createTRPCNext.js +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.js +4 -4
- package/dist/ssrPrepass.d.mts +1 -2
- package/dist/ssrPrepass.d.ts +1 -2
- package/dist/withTRPC.d.mts +1 -2
- package/dist/withTRPC.d.ts +0 -1
- package/package.json +9 -11
- package/app-dir/client/index.d.ts +0 -1
- package/app-dir/client/index.js +0 -1
- package/app-dir/links/nextCache/index.d.ts +0 -1
- package/app-dir/links/nextCache/index.js +0 -1
- package/app-dir/links/nextHttp/index.d.ts +0 -1
- package/app-dir/links/nextHttp/index.js +0 -1
- package/app-dir/server/index.d.ts +0 -1
- package/app-dir/server/index.js +0 -1
- package/ssrPrepass/index.d.ts +0 -1
- package/ssrPrepass/index.js +0 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CreateTRPCNextAppRouterOptions } from "./shared.mjs";
|
|
2
|
-
import { UseTRPCActionResult, experimental_createActionHook
|
|
2
|
+
import { UseTRPCActionResult, experimental_createActionHook, experimental_serverActionLink } from "./create-action-hook.mjs";
|
|
3
3
|
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
4
4
|
import { TRPCClient } from "@trpc/client";
|
|
5
5
|
|
|
6
6
|
//#region src/app-dir/client.d.ts
|
|
7
7
|
declare function experimental_createTRPCNextAppDirClient<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): TRPCClient<TRouter>;
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=client.d.ts.map
|
|
11
9
|
|
|
10
|
+
//#endregion
|
|
12
11
|
export { UseTRPCActionResult, experimental_createActionHook, experimental_createTRPCNextAppDirClient, experimental_serverActionLink };
|
|
13
12
|
//# sourceMappingURL=client.d.mts.map
|
package/dist/app-dir/client.d.ts
CHANGED
|
@@ -5,9 +5,8 @@ import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
|
|
|
5
5
|
|
|
6
6
|
//#region src/app-dir/client.d.ts
|
|
7
7
|
declare function experimental_createTRPCNextAppDirClient<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): TRPCClient<TRouter>;
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=client.d.ts.map
|
|
11
9
|
|
|
10
|
+
//#endregion
|
|
12
11
|
export { UseTRPCActionResult, experimental_createActionHook, experimental_createTRPCNextAppDirClient, experimental_serverActionLink };
|
|
13
12
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/app-dir/client.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_create_action_hook = require('./create-action-hook.js');
|
|
3
3
|
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
4
4
|
const __trpc_client = require_rolldown_runtime.__toESM(require("@trpc/client"));
|
|
5
5
|
|
|
6
6
|
//#region src/app-dir/client.ts
|
|
7
7
|
function experimental_createTRPCNextAppDirClient(opts) {
|
|
8
8
|
const client = (0, __trpc_client.createTRPCUntypedClient)(opts.config());
|
|
9
|
-
const cache = new Map();
|
|
9
|
+
const cache = /* @__PURE__ */ new Map();
|
|
10
10
|
return (0, __trpc_server_unstable_core_do_not_import.createRecursiveProxy)(({ path, args }) => {
|
|
11
11
|
const pathCopy = [...path];
|
|
12
12
|
const procedureType = (0, __trpc_client.clientCallTypeToProcedureType)(pathCopy.pop());
|
|
@@ -25,6 +25,6 @@ function experimental_createTRPCNextAppDirClient(opts) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
exports.experimental_createActionHook =
|
|
28
|
+
exports.experimental_createActionHook = require_create_action_hook.experimental_createActionHook;
|
|
29
29
|
exports.experimental_createTRPCNextAppDirClient = experimental_createTRPCNextAppDirClient;
|
|
30
|
-
exports.experimental_serverActionLink =
|
|
30
|
+
exports.experimental_serverActionLink = require_create_action_hook.experimental_serverActionLink;
|
package/dist/app-dir/client.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { clientCallTypeToProcedureType, createTRPCUntypedClient } from "@trpc/cl
|
|
|
5
5
|
//#region src/app-dir/client.ts
|
|
6
6
|
function experimental_createTRPCNextAppDirClient(opts) {
|
|
7
7
|
const client = createTRPCUntypedClient(opts.config());
|
|
8
|
-
const cache = new Map();
|
|
8
|
+
const cache = /* @__PURE__ */ new Map();
|
|
9
9
|
return createRecursiveProxy(({ path, args }) => {
|
|
10
10
|
const pathCopy = [...path];
|
|
11
11
|
const procedureType = clientCallTypeToProcedureType(pathCopy.pop());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.mjs","names":["opts: CreateTRPCNextAppRouterOptions<TRouter>","queryCacheKey","promise: Promise<unknown>"],"sources":["../../src/app-dir/client.ts"],"sourcesContent":["import type { TRPCClient } from '@trpc/client';\nimport {\n clientCallTypeToProcedureType,\n createTRPCUntypedClient,\n} from '@trpc/client';\nimport type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';\nimport { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';\nimport type { CreateTRPCNextAppRouterOptions } from './shared';\n\nexport {\n // ts-prune-ignore-next\n experimental_createActionHook,\n // ts-prune-ignore-next\n experimental_serverActionLink,\n // ts-prune-ignore-next\n type UseTRPCActionResult,\n} from './create-action-hook';\n\ntype QueryResult = {\n data?: unknown;\n error?: unknown;\n promise?: Promise<unknown>;\n};\n\n// ts-prune-ignore-next\nexport function experimental_createTRPCNextAppDirClient<\n TRouter extends AnyRouter,\n>(opts: CreateTRPCNextAppRouterOptions<TRouter>) {\n const client = createTRPCUntypedClient<TRouter>(opts.config());\n // const useProxy = createUseProxy<TRouter>(client);\n\n const cache = new Map<string, QueryResult>();\n\n return createRecursiveProxy<TRPCClient<TRouter>>(({ path, args }) => {\n // const pathCopy = [key, ...path];\n const pathCopy = [...path];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const procedureType = clientCallTypeToProcedureType(pathCopy.pop()!);\n\n if (procedureType === 'query') {\n const queryCacheKey = JSON.stringify([path, args[0]]);\n const cached = cache.get(queryCacheKey);\n\n if (cached?.promise) {\n return cached.promise;\n }\n }\n\n const fullPath = pathCopy.join('.');\n\n const promise: Promise<unknown> = (client as any)[procedureType](\n fullPath,\n ...args,\n );\n if (procedureType !== 'query') {\n return promise;\n }\n\n const queryCacheKey = JSON.stringify([path, args[0]]);\n\n cache.set(queryCacheKey, {\n promise,\n });\n\n return promise;\n });\n // });\n}\n"],"mappings":";;;;;AAyBA,SAAgB,wCAEdA,MAA+C;CAC/C,MAAM,SAAS,wBAAiC,KAAK,QAAQ,CAAC;CAG9D,MAAM,
|
|
1
|
+
{"version":3,"file":"client.mjs","names":["opts: CreateTRPCNextAppRouterOptions<TRouter>","queryCacheKey","promise: Promise<unknown>"],"sources":["../../src/app-dir/client.ts"],"sourcesContent":["import type { TRPCClient } from '@trpc/client';\nimport {\n clientCallTypeToProcedureType,\n createTRPCUntypedClient,\n} from '@trpc/client';\nimport type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';\nimport { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';\nimport type { CreateTRPCNextAppRouterOptions } from './shared';\n\nexport {\n // ts-prune-ignore-next\n experimental_createActionHook,\n // ts-prune-ignore-next\n experimental_serverActionLink,\n // ts-prune-ignore-next\n type UseTRPCActionResult,\n} from './create-action-hook';\n\ntype QueryResult = {\n data?: unknown;\n error?: unknown;\n promise?: Promise<unknown>;\n};\n\n// ts-prune-ignore-next\nexport function experimental_createTRPCNextAppDirClient<\n TRouter extends AnyRouter,\n>(opts: CreateTRPCNextAppRouterOptions<TRouter>) {\n const client = createTRPCUntypedClient<TRouter>(opts.config());\n // const useProxy = createUseProxy<TRouter>(client);\n\n const cache = new Map<string, QueryResult>();\n\n return createRecursiveProxy<TRPCClient<TRouter>>(({ path, args }) => {\n // const pathCopy = [key, ...path];\n const pathCopy = [...path];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const procedureType = clientCallTypeToProcedureType(pathCopy.pop()!);\n\n if (procedureType === 'query') {\n const queryCacheKey = JSON.stringify([path, args[0]]);\n const cached = cache.get(queryCacheKey);\n\n if (cached?.promise) {\n return cached.promise;\n }\n }\n\n const fullPath = pathCopy.join('.');\n\n const promise: Promise<unknown> = (client as any)[procedureType](\n fullPath,\n ...args,\n );\n if (procedureType !== 'query') {\n return promise;\n }\n\n const queryCacheKey = JSON.stringify([path, args[0]]);\n\n cache.set(queryCacheKey, {\n promise,\n });\n\n return promise;\n });\n // });\n}\n"],"mappings":";;;;;AAyBA,SAAgB,wCAEdA,MAA+C;CAC/C,MAAM,SAAS,wBAAiC,KAAK,QAAQ,CAAC;CAG9D,MAAM,wBAAQ,IAAI;AAElB,QAAO,qBAA0C,CAAC,EAAE,MAAM,MAAM,KAAK;EAEnE,MAAM,WAAW,CAAC,GAAG,IAAK;EAE1B,MAAM,gBAAgB,8BAA8B,SAAS,KAAK,CAAE;AAEpE,MAAI,kBAAkB,SAAS;GAC7B,MAAMC,kBAAgB,KAAK,UAAU,CAAC,MAAM,KAAK,EAAG,EAAC;GACrD,MAAM,SAAS,MAAM,IAAIA,gBAAc;AAEvC,OAAI,QAAQ,QACV,QAAO,OAAO;EAEjB;EAED,MAAM,WAAW,SAAS,KAAK,IAAI;EAEnC,MAAMC,UAA4B,AAAC,OAAe,eAChD,UACA,GAAG,KACJ;AACD,MAAI,kBAAkB,QACpB,QAAO;EAGT,MAAM,gBAAgB,KAAK,UAAU,CAAC,MAAM,KAAK,EAAG,EAAC;AAErD,QAAM,IAAI,eAAe,EACvB,QACD,EAAC;AAEF,SAAO;CACR,EAAC;AAEH"}
|
|
@@ -41,7 +41,6 @@ interface UseTRPCActionOptions<TDef extends ActionHandlerDef> {
|
|
|
41
41
|
onError?: (result: TRPCClientError<TDef['errorShape']>) => MaybePromise<void>;
|
|
42
42
|
}
|
|
43
43
|
declare function experimental_createActionHook<TInferrable extends InferrableClientTypes>(opts: InferrableClientTypes extends TInferrable ? TypeError<'Generic parameter missing in `experimental_createActionHook<HERE>()`'> : CreateTRPCClientOptions<TInferrable>): <TDef extends ActionHandlerDef>(handler: TRPCActionHandler<TDef>, useActionOpts?: UseTRPCActionOptions<Simplify<TDef>>) => UseTRPCActionResult<TDef>;
|
|
44
|
-
|
|
45
44
|
//#endregion
|
|
46
|
-
export { UseTRPCActionResult, experimental_createActionHook
|
|
45
|
+
export { UseTRPCActionResult, experimental_createActionHook, experimental_serverActionLink };
|
|
47
46
|
//# sourceMappingURL=create-action-hook.d.mts.map
|
|
@@ -41,7 +41,6 @@ interface UseTRPCActionOptions<TDef extends ActionHandlerDef> {
|
|
|
41
41
|
onError?: (result: TRPCClientError<TDef['errorShape']>) => MaybePromise<void>;
|
|
42
42
|
}
|
|
43
43
|
declare function experimental_createActionHook<TInferrable extends InferrableClientTypes>(opts: InferrableClientTypes extends TInferrable ? TypeError<'Generic parameter missing in `experimental_createActionHook<HERE>()`'> : CreateTRPCClientOptions<TInferrable>): <TDef extends ActionHandlerDef>(handler: TRPCActionHandler<TDef>, useActionOpts?: UseTRPCActionOptions<Simplify<TDef>>) => UseTRPCActionResult<TDef>;
|
|
44
|
-
|
|
45
44
|
//#endregion
|
|
46
45
|
export { UseTRPCActionResult, experimental_createActionHook, experimental_serverActionLink };
|
|
47
46
|
//# sourceMappingURL=create-action-hook.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_shared = require('./shared.js');
|
|
3
3
|
const __trpc_client_unstable_internals = require_rolldown_runtime.__toESM(require("@trpc/client/unstable-internals"));
|
|
4
4
|
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
5
5
|
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
@@ -12,7 +12,7 @@ function experimental_serverActionLink(...args) {
|
|
|
12
12
|
const transformer = (0, __trpc_client_unstable_internals.getTransformer)(opts?.transformer);
|
|
13
13
|
return () => ({ op }) => (0, __trpc_server_observable.observable)((observer) => {
|
|
14
14
|
const context = op.context;
|
|
15
|
-
context._action(
|
|
15
|
+
context._action(require_shared.isFormData(op.input) ? op.input : transformer.input.serialize(op.input)).then((data) => {
|
|
16
16
|
const transformed = (0, __trpc_server_unstable_core_do_not_import.transformResult)(data, transformer.output);
|
|
17
17
|
if (!transformed.ok) {
|
|
18
18
|
observer.error(__trpc_client.TRPCClientError.from(transformed.error, {}));
|
|
@@ -10,7 +10,6 @@ type NextCacheLinkOptions<TRouter extends AnyRouter> = {
|
|
|
10
10
|
revalidate?: number | false;
|
|
11
11
|
} & TransformerOptions<inferClientTypes<TRouter>>;
|
|
12
12
|
declare function experimental_nextCacheLink<TRouter extends AnyRouter>(opts: NextCacheLinkOptions<TRouter>): TRPCLink<TRouter>;
|
|
13
|
-
|
|
14
13
|
//#endregion
|
|
15
14
|
export { experimental_nextCacheLink };
|
|
16
15
|
//# sourceMappingURL=nextCache.d.mts.map
|
|
@@ -10,7 +10,6 @@ type NextCacheLinkOptions<TRouter extends AnyRouter> = {
|
|
|
10
10
|
revalidate?: number | false;
|
|
11
11
|
} & TransformerOptions<inferClientTypes<TRouter>>;
|
|
12
12
|
declare function experimental_nextCacheLink<TRouter extends AnyRouter>(opts: NextCacheLinkOptions<TRouter>): TRPCLink<TRouter>;
|
|
13
|
-
|
|
14
13
|
//#endregion
|
|
15
14
|
export { experimental_nextCacheLink };
|
|
16
15
|
//# sourceMappingURL=nextCache.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_shared = require('../shared.js');
|
|
3
3
|
const __trpc_client_unstable_internals = require_rolldown_runtime.__toESM(require("@trpc/client/unstable-internals"));
|
|
4
4
|
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
5
5
|
const __trpc_client = require_rolldown_runtime.__toESM(require("@trpc/client"));
|
|
@@ -11,7 +11,7 @@ function experimental_nextCacheLink(opts) {
|
|
|
11
11
|
const transformer = (0, __trpc_client_unstable_internals.getTransformer)(opts.transformer);
|
|
12
12
|
return () => ({ op }) => (0, __trpc_server_observable.observable)((observer) => {
|
|
13
13
|
const { path, input, type, context } = op;
|
|
14
|
-
const cacheTag =
|
|
14
|
+
const cacheTag = require_shared.generateCacheTag(path, input);
|
|
15
15
|
const requestRevalidate = typeof context["revalidate"] === "number" || context["revalidate"] === false ? context["revalidate"] : void 0;
|
|
16
16
|
const revalidate = requestRevalidate ?? opts.revalidate ?? false;
|
|
17
17
|
const promise = opts.createContext().then(async (ctx) => {
|
|
@@ -13,7 +13,6 @@ type NextLinkBatchOptions<TRoot extends AnyRootTypes> = NextLinkBaseOptions & Om
|
|
|
13
13
|
batch: true;
|
|
14
14
|
};
|
|
15
15
|
declare function experimental_nextHttpLink<TRouter extends AnyRouter>(opts: NextLinkSingleOptions<TRouter['_def']['_config']['$types']> | NextLinkBatchOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>;
|
|
16
|
-
|
|
17
16
|
//#endregion
|
|
18
17
|
export { experimental_nextHttpLink };
|
|
19
18
|
//# sourceMappingURL=nextHttp.d.mts.map
|
|
@@ -13,7 +13,6 @@ type NextLinkBatchOptions<TRoot extends AnyRootTypes> = NextLinkBaseOptions & Om
|
|
|
13
13
|
batch: true;
|
|
14
14
|
};
|
|
15
15
|
declare function experimental_nextHttpLink<TRouter extends AnyRouter>(opts: NextLinkSingleOptions<TRouter['_def']['_config']['$types']> | NextLinkBatchOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>;
|
|
16
|
-
|
|
17
16
|
//#endregion
|
|
18
17
|
export { experimental_nextHttpLink };
|
|
19
18
|
//# sourceMappingURL=nextHttp.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_shared = require('../shared.js');
|
|
3
3
|
const __trpc_client = require_rolldown_runtime.__toESM(require("@trpc/client"));
|
|
4
4
|
|
|
5
5
|
//#region src/app-dir/links/nextHttp.ts
|
|
@@ -7,7 +7,7 @@ function experimental_nextHttpLink(opts) {
|
|
|
7
7
|
return (runtime) => {
|
|
8
8
|
return (ctx) => {
|
|
9
9
|
const { path, input, context } = ctx.op;
|
|
10
|
-
const cacheTag =
|
|
10
|
+
const cacheTag = require_shared.generateCacheTag(path, input);
|
|
11
11
|
const requestRevalidate = typeof context["revalidate"] === "number" || context["revalidate"] === false ? context["revalidate"] : void 0;
|
|
12
12
|
const revalidate = requestRevalidate ?? opts.revalidate ?? false;
|
|
13
13
|
const _fetch = (url, fetchOpts) => {
|
|
@@ -28,9 +28,8 @@ declare function experimental_createServerActionHandler<TInstance extends {
|
|
|
28
28
|
rethrowNextErrors?: boolean;
|
|
29
29
|
}): <TProc extends AnyProcedure>(proc: TProc) => TRPCActionHandler<Simplify<inferActionDef<inferClientTypes<TInstance>, TProc>>>;
|
|
30
30
|
declare function experimental_revalidateEndpoint(req: Request): Promise<Response>;
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
31
|
//# sourceMappingURL=server.d.ts.map
|
|
34
32
|
|
|
33
|
+
//#endregion
|
|
35
34
|
export { ActionHandlerDef, TRPCActionHandler, experimental_createServerActionHandler, experimental_createTRPCNextAppDirServer, experimental_revalidateEndpoint };
|
|
36
35
|
//# sourceMappingURL=server.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.mts","names":[],"sources":["../../src/app-dir/server.ts"],"sourcesContent":[],"mappings":";;;;;;iBAwCgB,wDACE,iBACV,+BAA+B,WAAQ,+BAAA,sCAAA;AAF/C;;;AAEuC,KAkC3B,iBAlC2B,CAAA,aAkCI,gBAlCJ,CAAA,GAAA,CAAA,KAAA,EAmC9B,QAnC8B,GAmCnB,IAnCmB,CAAA,OAAA,CAAA,EAAA,GAoClC,OApCkC,CAoC1B,YApC0B,CAoCb,IApCa,CAAA,QAAA,CAAA,EAoCG,IApCH,CAAA,YAAA,CAAA,CAAA,CAAA;AAA/B,iBAsCQ,sCAtCR,CAAA,kBAAA;EAA8B,OAAS,EAwClC,UAxCkC,CAwCvB,YAxCuB,CAAA;CAAA,CAAA,CAAA,CAAA,EA2C1C,SA3C0C,EAAA,IAAA,EA4CvC,qBA5CuC,CA6C3C,SA7C2C,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,EAAA,GAAA,GA8CrC,YA9CqC,CA8CxB,SA9CwB,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,GAAA;EAAA;AAAA
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../../src/app-dir/server.ts"],"sourcesContent":[],"mappings":";;;;;;iBAwCgB,wDACE,iBACV,+BAA+B,WAAQ,+BAAA,sCAAA;AAF/C;;;AAEuC,KAkC3B,iBAlC2B,CAAA,aAkCI,gBAlCJ,CAAA,GAAA,CAAA,KAAA,EAmC9B,QAnC8B,GAmCnB,IAnCmB,CAAA,OAAA,CAAA,EAAA,GAoClC,OApCkC,CAoC1B,YApC0B,CAoCb,IApCa,CAAA,QAAA,CAAA,EAoCG,IApCH,CAAA,YAAA,CAAA,CAAA,CAAA;AAA/B,iBAsCQ,sCAtCR,CAAA,kBAAA;EAA8B,OAAS,EAwClC,UAxCkC,CAwCvB,YAxCuB,CAAA;CAAA,CAAA,CAAA,CAAA,EA2C1C,SA3C0C,EAAA,IAAA,EA4CvC,qBA5CuC,CA6C3C,SA7C2C,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,EAAA,GAAA,GA8CrC,YA9CqC,CA8CxB,SA9CwB,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,GAAA;EAAA;AAAA;AAkC/C;;EAA6B,iBAAc,CAAA,EAAA,OAAA;EAAgB;;;EAE7B,OAAY,CAAA,EAAA,CAAA,IAAA,EAqB9B,mBArB8B,CAqBV,SArBU,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,EAAA,GAAA,IAAA;EAAI;;AAAlC;AAEZ;EAAsD,iBAAA,CAAA,EAAA,OAAA;CAAA,CAAA,EAAA,CAAA,cAuCH,YArC3B,CAAA,CAAA,IAAA,EAsCd,KAtCc,EAAA,GAuCnB,iBAvCmB,CAwCpB,QAxCoB,CAwCX,cAxCW,CAwCI,gBAxCJ,CAwCqB,SAxCrB,CAAA,EAwCiC,KAxCjC,CAAA,CAAA,CAAA;AAAX,iBAmHS,+BAAA,CAnHT,GAAA,EAmH8C,OAnH9C,CAAA,EAmHqD,OAnHrD,CAmHqD,QAnHrD,CAAA"}
|
package/dist/app-dir/server.d.ts
CHANGED
|
@@ -28,9 +28,8 @@ declare function experimental_createServerActionHandler<TInstance extends {
|
|
|
28
28
|
rethrowNextErrors?: boolean;
|
|
29
29
|
}): <TProc extends AnyProcedure>(proc: TProc) => TRPCActionHandler<Simplify<inferActionDef<inferClientTypes<TInstance>, TProc>>>;
|
|
30
30
|
declare function experimental_revalidateEndpoint(req: Request): Promise<Response>;
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
31
|
//# sourceMappingURL=server.d.ts.map
|
|
34
32
|
|
|
33
|
+
//#endregion
|
|
35
34
|
export { ActionHandlerDef, TRPCActionHandler, experimental_createServerActionHandler, experimental_createTRPCNextAppDirServer, experimental_revalidateEndpoint };
|
|
36
35
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","names":[],"sources":["../../src/app-dir/server.ts"],"sourcesContent":[],"mappings":";;;;;;iBAwCgB,wDACE,iBACV,+BAA+B,WAAQ,+BAAA,sCAAA;AAF/C;;;AAEuC,KAkC3B,iBAlC2B,CAAA,aAkCI,gBAlCJ,CAAA,GAAA,CAAA,KAAA,EAmC9B,QAnC8B,GAmCnB,IAnCmB,CAAA,OAAA,CAAA,EAAA,GAoClC,OApCkC,CAoC1B,YApC0B,CAoCb,IApCa,CAAA,QAAA,CAAA,EAoCG,IApCH,CAAA,YAAA,CAAA,CAAA,CAAA;AAA/B,iBAsCQ,sCAtCR,CAAA,kBAAA;EAA8B,OAAS,EAwClC,UAxCkC,CAwCvB,YAxCuB,CAAA;CAAA,CAAA,CAAA,CAAA,EA2C1C,SA3C0C,EAAA,IAAA,EA4CvC,qBA5CuC,CA6C3C,SA7C2C,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,EAAA,GAAA,GA8CrC,YA9CqC,CA8CxB,SA9CwB,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,GAAA;EAAA;AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","names":[],"sources":["../../src/app-dir/server.ts"],"sourcesContent":[],"mappings":";;;;;;iBAwCgB,wDACE,iBACV,+BAA+B,WAAQ,+BAAA,sCAAA;AAF/C;;;AAEuC,KAkC3B,iBAlC2B,CAAA,aAkCI,gBAlCJ,CAAA,GAAA,CAAA,KAAA,EAmC9B,QAnC8B,GAmCnB,IAnCmB,CAAA,OAAA,CAAA,EAAA,GAoClC,OApCkC,CAoC1B,YApC0B,CAoCb,IApCa,CAAA,QAAA,CAAA,EAoCG,IApCH,CAAA,YAAA,CAAA,CAAA,CAAA;AAA/B,iBAsCQ,sCAtCR,CAAA,kBAAA;EAA8B,OAAS,EAwClC,UAxCkC,CAwCvB,YAxCuB,CAAA;CAAA,CAAA,CAAA,CAAA,EA2C1C,SA3C0C,EAAA,IAAA,EA4CvC,qBA5CuC,CA6C3C,SA7C2C,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,EAAA,GAAA,GA8CrC,YA9CqC,CA8CxB,SA9CwB,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,GAAA;EAAA;AAAA;AAkC/C;;EAA6B,iBAAc,CAAA,EAAA,OAAA;EAAgB;;;EAE7B,OAAY,CAAA,EAAA,CAAA,IAAA,EAqB9B,mBArB8B,CAqBV,SArBU,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,EAAA,GAAA,IAAA;EAAI;;AAAlC;AAEZ;EAAsD,iBAAA,CAAA,EAAA,OAAA;CAAA,CAAA,EAAA,CAAA,cAuCH,YArC3B,CAAA,CAAA,IAAA,EAsCd,KAtCc,EAAA,GAuCnB,iBAvCmB,CAwCpB,QAxCoB,CAwCX,cAxCW,CAwCI,gBAxCJ,CAwCqB,SAxCrB,CAAA,EAwCiC,KAxCjC,CAAA,CAAA,CAAA;AAAX,iBAmHS,+BAAA,CAnHT,GAAA,EAmH8C,OAnH9C,CAAA,EAmHqD,OAnHrD,CAmHqD,QAnHrD,CAAA"}
|
package/dist/app-dir/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_shared = require('./shared.js');
|
|
3
3
|
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
4
4
|
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
5
5
|
const __trpc_client = require_rolldown_runtime.__toESM(require("@trpc/client"));
|
|
@@ -18,7 +18,7 @@ function experimental_createTRPCNextAppDirServer(opts) {
|
|
|
18
18
|
const action = pathCopy.pop();
|
|
19
19
|
const procedurePath = pathCopy.join(".");
|
|
20
20
|
const procedureType = (0, __trpc_client.clientCallTypeToProcedureType)(action);
|
|
21
|
-
const cacheTag =
|
|
21
|
+
const cacheTag = require_shared.generateCacheTag(procedurePath, callOpts.args[0]);
|
|
22
22
|
if (action === "revalidate") {
|
|
23
23
|
(0, next_cache.revalidateTag)(cacheTag);
|
|
24
24
|
return;
|
|
@@ -35,7 +35,7 @@ function experimental_createServerActionHandler(t, opts) {
|
|
|
35
35
|
let ctx = void 0;
|
|
36
36
|
try {
|
|
37
37
|
ctx = await createContext?.() ?? {};
|
|
38
|
-
if (normalizeFormData &&
|
|
38
|
+
if (normalizeFormData && require_shared.isFormData(rawInput)) try {
|
|
39
39
|
rawInput = (0, __trpc_server_unstable_core_do_not_import.formDataToObject)(rawInput);
|
|
40
40
|
} catch {
|
|
41
41
|
throw new __trpc_server_unstable_core_do_not_import.TRPCError({
|
|
@@ -43,7 +43,7 @@ function experimental_createServerActionHandler(t, opts) {
|
|
|
43
43
|
message: "Failed to convert FormData to an object"
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
else if (rawInput && !
|
|
46
|
+
else if (rawInput && !require_shared.isFormData(rawInput)) rawInput = transformer.input.deserialize(rawInput);
|
|
47
47
|
const data = proc._def.experimental_caller ? await proc(rawInput) : await proc({
|
|
48
48
|
input: void 0,
|
|
49
49
|
ctx,
|
|
@@ -3,9 +3,6 @@ import { CreateTRPCClientOptions, Resolver, TRPCClient, TRPCUntypedClient } from
|
|
|
3
3
|
import { inferProcedureOutput } from "@trpc/server";
|
|
4
4
|
|
|
5
5
|
//#region src/app-dir/shared.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* @internal
|
|
@@ -32,6 +29,7 @@ type inferActionDef<TRoot extends AnyClientTypes, TProc extends AnyProcedure> =
|
|
|
32
29
|
input: inferProcedureInput<TProc>;
|
|
33
30
|
output: inferProcedureOutput<TProc>;
|
|
34
31
|
errorShape: TRoot['errorShape'];
|
|
35
|
-
};
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
36
34
|
export { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef };
|
|
37
35
|
//# sourceMappingURL=shared.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","names":[],"sources":["../../src/app-dir/shared.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.mts","names":[],"sources":["../../src/app-dir/shared.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UA8FiB,+CAA+C;gBAChD,wBAAwB;;;;;;;;;UAuBvB,gBAAA;;;;;;;;KAUL,6BACI,8BACA;SAEP,oBAAoB;UACnB,qBAAqB;cACjB"}
|
package/dist/app-dir/shared.d.ts
CHANGED
|
@@ -3,9 +3,6 @@ import { AnyClientTypes, AnyProcedure, AnyRootTypes, AnyRouter, ProtectedInterse
|
|
|
3
3
|
import { inferProcedureOutput } from "@trpc/server";
|
|
4
4
|
|
|
5
5
|
//#region src/app-dir/shared.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* @internal
|
|
@@ -32,6 +29,7 @@ type inferActionDef<TRoot extends AnyClientTypes, TProc extends AnyProcedure> =
|
|
|
32
29
|
input: inferProcedureInput<TProc>;
|
|
33
30
|
output: inferProcedureOutput<TProc>;
|
|
34
31
|
errorShape: TRoot['errorShape'];
|
|
35
|
-
};
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
36
34
|
export { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef };
|
|
37
35
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","names":[],"sources":["../../src/app-dir/shared.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","names":[],"sources":["../../src/app-dir/shared.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UA8FiB,+CAA+C;gBAChD,wBAAwB;;;;;;;;;UAuBvB,gBAAA;;;;;;;;KAUL,6BACI,8BACA;SAEP,oBAAoB;UACnB,qBAAqB;cACjB"}
|
package/dist/app-dir/types.d.mts
CHANGED
|
@@ -27,7 +27,6 @@ type NextAppDirDecorateRouterRecord<TRoot extends AnyRootTypes, TRecord extends
|
|
|
27
27
|
errorShape: TRoot['errorShape'];
|
|
28
28
|
transformer: TRoot['transformer'];
|
|
29
29
|
}> : $Value extends RouterRecord ? NextAppDirDecorateRouterRecord<TRoot, $Value> : never : never };
|
|
30
|
-
|
|
31
30
|
//#endregion
|
|
32
31
|
export { NextAppDirDecorateRouterRecord };
|
|
33
32
|
//# sourceMappingURL=types.d.mts.map
|
package/dist/app-dir/types.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ type NextAppDirDecorateRouterRecord<TRoot extends AnyRootTypes, TRecord extends
|
|
|
27
27
|
errorShape: TRoot['errorShape'];
|
|
28
28
|
transformer: TRoot['transformer'];
|
|
29
29
|
}> : $Value extends RouterRecord ? NextAppDirDecorateRouterRecord<TRoot, $Value> : never : never };
|
|
30
|
-
|
|
31
30
|
//#endregion
|
|
32
31
|
export { NextAppDirDecorateRouterRecord };
|
|
33
32
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC
|
|
1
|
+
import { WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC } from "./withTRPC.mjs";
|
|
2
2
|
import { CreateReactUtils, DecorateRouterRecord, TRPCUseQueries, TRPCUseSuspenseQueries } from "@trpc/react-query/shared";
|
|
3
3
|
import { AnyRouter, ProtectedIntersection } from "@trpc/server/unstable-core-do-not-import";
|
|
4
4
|
import { NextPageContext } from "next/types";
|
|
5
5
|
|
|
6
6
|
//#region src/createTRPCNext.d.ts
|
|
7
|
-
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
7
|
+
|
|
10
8
|
/**
|
|
11
9
|
* @internal
|
|
12
10
|
*/
|
|
@@ -30,9 +28,8 @@ interface CreateTRPCNextBase<TRouter extends AnyRouter, TSSRContext extends Next
|
|
|
30
28
|
*/
|
|
31
29
|
type CreateTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext> = ProtectedIntersection<CreateTRPCNextBase<TRouter, TSSRContext>, DecorateRouterRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>>;
|
|
32
30
|
declare function createTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): CreateTRPCNext<TRouter, TSSRContext>;
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
31
|
//# sourceMappingURL=createTRPCNext.d.ts.map
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
export { CreateTRPCNext, CreateTRPCNextBase, createTRPCNext };
|
|
38
35
|
//# sourceMappingURL=createTRPCNext.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCNext.d.mts","names":[],"sources":["../src/createTRPCNext.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTRPCNext.d.mts","names":[],"sources":["../src/createTRPCNext.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AA0BA;;AACkB,UADD,kBACC,CAAA,gBAAA,SAAA,EAAA,oBACI,eADJ,CAAA,CAAA;EAAS;;;;;EAYW,UAAE,EAAA,EAJxB,gBAIwB,CAJP,OAIO,EAJE,WAIF,CAAA;EAAW;;;EACQ,QAA7B,EAAA,EADhB,gBACgB,CADC,OACD,EADU,WACV,CAAA;EAAQ,QAA1B,EAAA,UAAA,CAAA,OAAkB,QAAlB,CAA2B,OAA3B,EAAoC,WAApC,CAAA,CAAA;EAAU,UACO,EAAf,cAAe,CAAA,OAAA,CAAA;EAAO,kBAAtB,EACQ,sBADR,CAC+B,OAD/B,CAAA;;;AAC8B;AAM5C;AAA0B,KAAd,cAAc,CAAA,gBACR,SADQ,EAAA,oBAEJ,eAFI,CAAA,GAGtB,qBAHsB,CAIxB,kBAJwB,CAIL,OAJK,EAII,WAJJ,CAAA,EAKxB,oBALwB,CAMtB,OANsB,CAAA,MAAA,CAAA,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,EAOtB,OAPsB,CAAA,MAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA;AACR,iBAUF,cAVE,CAAA,gBAWA,SAXA,EAAA,oBAYI,eAZJ,GAYsB,eAZtB,CAAA,CAAA,IAAA,EAcV,oBAdU,CAcW,OAdX,CAAA,GAcsB,kBAdtB,CAcyC,OAdzC,CAAA,CAAA,EAef,cAfe,CAeA,OAfA,EAeS,WAfT,CAAA"}
|
package/dist/createTRPCNext.d.ts
CHANGED
|
@@ -4,9 +4,7 @@ import { CreateReactUtils, DecorateRouterRecord, TRPCUseQueries, TRPCUseSuspense
|
|
|
4
4
|
import { NextPageContext } from "next/types";
|
|
5
5
|
|
|
6
6
|
//#region src/createTRPCNext.d.ts
|
|
7
|
-
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
7
|
+
|
|
10
8
|
/**
|
|
11
9
|
* @internal
|
|
12
10
|
*/
|
|
@@ -30,9 +28,8 @@ interface CreateTRPCNextBase<TRouter extends AnyRouter, TSSRContext extends Next
|
|
|
30
28
|
*/
|
|
31
29
|
type CreateTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext> = ProtectedIntersection<CreateTRPCNextBase<TRouter, TSSRContext>, DecorateRouterRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>>;
|
|
32
30
|
declare function createTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): CreateTRPCNext<TRouter, TSSRContext>;
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
31
|
//# sourceMappingURL=createTRPCNext.d.ts.map
|
|
36
32
|
|
|
33
|
+
//#endregion
|
|
37
34
|
export { CreateTRPCNext, CreateTRPCNextBase, createTRPCNext };
|
|
38
35
|
//# sourceMappingURL=createTRPCNext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCNext.d.ts","names":[],"sources":["../src/createTRPCNext.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTRPCNext.d.ts","names":[],"sources":["../src/createTRPCNext.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AA0BA;;AACkB,UADD,kBACC,CAAA,gBAAA,SAAA,EAAA,oBACI,eADJ,CAAA,CAAA;EAAS;;;;;EAYW,UAAE,EAAA,EAJxB,gBAIwB,CAJP,OAIO,EAJE,WAIF,CAAA;EAAW;;;EACQ,QAA7B,EAAA,EADhB,gBACgB,CADC,OACD,EADU,WACV,CAAA;EAAQ,QAA1B,EAAA,UAAA,CAAA,OAAkB,QAAlB,CAA2B,OAA3B,EAAoC,WAApC,CAAA,CAAA;EAAU,UACO,EAAf,cAAe,CAAA,OAAA,CAAA;EAAO,kBAAtB,EACQ,sBADR,CAC+B,OAD/B,CAAA;;;AAC8B;AAM5C;AAA0B,KAAd,cAAc,CAAA,gBACR,SADQ,EAAA,oBAEJ,eAFI,CAAA,GAGtB,qBAHsB,CAIxB,kBAJwB,CAIL,OAJK,EAII,WAJJ,CAAA,EAKxB,oBALwB,CAMtB,OANsB,CAAA,MAAA,CAAA,CAAA,SAAA,CAAA,CAAA,QAAA,CAAA,EAOtB,OAPsB,CAAA,MAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA;AACR,iBAUF,cAVE,CAAA,gBAWA,SAXA,EAAA,oBAYI,eAZJ,GAYsB,eAZtB,CAAA,CAAA,IAAA,EAcV,oBAdU,CAcW,OAdX,CAAA,GAcsB,kBAdtB,CAcyC,OAdzC,CAAA,CAAA,EAef,cAfe,CAeA,OAfA,EAeS,WAfT,CAAA"}
|
package/dist/createTRPCNext.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
|
|
2
|
-
const
|
|
2
|
+
const require_withTRPC = require('./withTRPC.js');
|
|
3
3
|
const __trpc_react_query_shared = require_rolldown_runtime.__toESM(require("@trpc/react-query/shared"));
|
|
4
4
|
const react = require_rolldown_runtime.__toESM(require("react"));
|
|
5
5
|
const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toESM(require("@trpc/server/unstable-core-do-not-import"));
|
|
@@ -7,7 +7,7 @@ const __trpc_server_unstable_core_do_not_import = require_rolldown_runtime.__toE
|
|
|
7
7
|
//#region src/createTRPCNext.tsx
|
|
8
8
|
function createTRPCNext(opts) {
|
|
9
9
|
const hooks = (0, __trpc_react_query_shared.createRootHooks)(opts);
|
|
10
|
-
const _withTRPC =
|
|
10
|
+
const _withTRPC = require_withTRPC.withTRPC(opts);
|
|
11
11
|
const proxy = (0, __trpc_react_query_shared.createReactDecoration)(hooks);
|
|
12
12
|
return (0, __trpc_server_unstable_core_do_not_import.createFlatProxy)((key) => {
|
|
13
13
|
if (key === "useContext" || key === "useUtils") return () => {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC
|
|
2
|
-
import { CreateTRPCNext, CreateTRPCNextBase, createTRPCNext
|
|
1
|
+
import { TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC } from "./withTRPC.mjs";
|
|
2
|
+
import { CreateTRPCNext, CreateTRPCNextBase, createTRPCNext } from "./createTRPCNext.mjs";
|
|
3
3
|
export { CreateTRPCNext, CreateTRPCNextBase, TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, createTRPCNext, withTRPC };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const require_withTRPC = require('./withTRPC.js');
|
|
2
|
+
const require_createTRPCNext = require('./createTRPCNext.js');
|
|
3
3
|
|
|
4
|
-
exports.createTRPCNext =
|
|
5
|
-
exports.withTRPC =
|
|
4
|
+
exports.createTRPCNext = require_createTRPCNext.createTRPCNext;
|
|
5
|
+
exports.withTRPC = require_withTRPC.withTRPC;
|
package/dist/ssrPrepass.d.mts
CHANGED
|
@@ -2,9 +2,8 @@ import { TRPCPrepassHelper } from "./withTRPC.mjs";
|
|
|
2
2
|
|
|
3
3
|
//#region src/ssrPrepass.d.ts
|
|
4
4
|
declare const ssrPrepass: TRPCPrepassHelper;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
5
|
//# sourceMappingURL=ssrPrepass.d.ts.map
|
|
8
6
|
|
|
7
|
+
//#endregion
|
|
9
8
|
export { ssrPrepass };
|
|
10
9
|
//# sourceMappingURL=ssrPrepass.d.mts.map
|
package/dist/ssrPrepass.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { TRPCPrepassHelper } from "./withTRPC.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/ssrPrepass.d.ts
|
|
4
4
|
declare const ssrPrepass: TRPCPrepassHelper;
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
5
|
//# sourceMappingURL=ssrPrepass.d.ts.map
|
|
8
6
|
|
|
7
|
+
//#endregion
|
|
9
8
|
export { ssrPrepass };
|
|
10
9
|
//# sourceMappingURL=ssrPrepass.d.ts.map
|
package/dist/withTRPC.d.mts
CHANGED
|
@@ -49,7 +49,6 @@ type TRPCPrepassProps<TRouter extends AnyRouter, TSSRContext extends NextPageCon
|
|
|
49
49
|
ssrContext: TSSRContext;
|
|
50
50
|
};
|
|
51
51
|
declare function withTRPC<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): (AppOrPage: NextComponentType<any, any, any>) => NextComponentType;
|
|
52
|
-
|
|
53
52
|
//#endregion
|
|
54
|
-
export { TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC
|
|
53
|
+
export { TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC };
|
|
55
54
|
//# sourceMappingURL=withTRPC.d.mts.map
|
package/dist/withTRPC.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ type TRPCPrepassProps<TRouter extends AnyRouter, TSSRContext extends NextPageCon
|
|
|
49
49
|
ssrContext: TSSRContext;
|
|
50
50
|
};
|
|
51
51
|
declare function withTRPC<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): (AppOrPage: NextComponentType<any, any, any>) => NextComponentType;
|
|
52
|
-
|
|
53
52
|
//#endregion
|
|
54
53
|
export { TRPCPrepassHelper, TRPCPrepassProps, WithTRPCConfig, WithTRPCNoSSROptions, WithTRPCSSROptions, withTRPC };
|
|
55
54
|
//# sourceMappingURL=withTRPC.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/next",
|
|
3
|
-
"version": "11.1.3-alpha-tmp-tsdown.
|
|
3
|
+
"version": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
4
4
|
"description": "The tRPC Next.js library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsdown",
|
|
27
27
|
"dev": "tsdown --watch",
|
|
28
|
-
"codegen-entrypoints": "tsx entrypoints.script.ts",
|
|
29
28
|
"ts-watch": "tsc --project tsconfig.watch.json --watch",
|
|
30
29
|
"lint": "eslint --cache src"
|
|
31
30
|
},
|
|
@@ -104,9 +103,9 @@
|
|
|
104
103
|
],
|
|
105
104
|
"peerDependencies": {
|
|
106
105
|
"@tanstack/react-query": "^5.59.15",
|
|
107
|
-
"@trpc/client": "11.1.3-alpha-tmp-tsdown.
|
|
108
|
-
"@trpc/react-query": "11.1.3-alpha-tmp-tsdown.
|
|
109
|
-
"@trpc/server": "11.1.3-alpha-tmp-tsdown.
|
|
106
|
+
"@trpc/client": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
107
|
+
"@trpc/react-query": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
108
|
+
"@trpc/server": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
110
109
|
"next": "*",
|
|
111
110
|
"react": ">=16.8.0",
|
|
112
111
|
"react-dom": ">=16.8.0",
|
|
@@ -122,9 +121,9 @@
|
|
|
122
121
|
},
|
|
123
122
|
"devDependencies": {
|
|
124
123
|
"@tanstack/react-query": "^5.80.3",
|
|
125
|
-
"@trpc/client": "11.1.3-alpha-tmp-tsdown.
|
|
126
|
-
"@trpc/react-query": "11.1.3-alpha-tmp-tsdown.
|
|
127
|
-
"@trpc/server": "11.1.3-alpha-tmp-tsdown.
|
|
124
|
+
"@trpc/client": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
125
|
+
"@trpc/react-query": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
126
|
+
"@trpc/server": "11.1.3-alpha-tmp-tsdown.24+76320d537",
|
|
128
127
|
"@types/express": "^5.0.0",
|
|
129
128
|
"@types/node": "^22.13.5",
|
|
130
129
|
"@types/react": "^19.1.0",
|
|
@@ -135,8 +134,7 @@
|
|
|
135
134
|
"next": "^15.3.1",
|
|
136
135
|
"react": "^19.1.0",
|
|
137
136
|
"react-dom": "^19.1.0",
|
|
138
|
-
"tsdown": "0.12.
|
|
139
|
-
"tsx": "^4.19.3",
|
|
137
|
+
"tsdown": "0.12.7",
|
|
140
138
|
"typescript": "^5.8.2",
|
|
141
139
|
"zod": "^3.25.51"
|
|
142
140
|
},
|
|
@@ -146,5 +144,5 @@
|
|
|
146
144
|
"funding": [
|
|
147
145
|
"https://trpc.io/sponsor"
|
|
148
146
|
],
|
|
149
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "76320d5372bffa652105942ec39095c20c72669a"
|
|
150
148
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/app-dir/client';
|
package/app-dir/client/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../../dist/app-dir/client');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../dist/app-dir/links/nextCache';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../../../dist/app-dir/links/nextCache');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../../dist/app-dir/links/nextHttp';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../../../dist/app-dir/links/nextHttp');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../dist/app-dir/server';
|
package/app-dir/server/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../../dist/app-dir/server');
|
package/ssrPrepass/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../dist/ssrPrepass';
|
package/ssrPrepass/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('../dist/ssrPrepass');
|