@trpc/next 11.0.0-alpha-tmp-workflow-merge.250 → 11.0.0-alpha-tmp-01-26-rootconfigtypes.261

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.
Files changed (41) hide show
  1. package/dist/app-dir/client.d.ts +1 -1
  2. package/dist/app-dir/client.d.ts.map +1 -1
  3. package/dist/app-dir/client.js +2 -2
  4. package/dist/app-dir/client.mjs +1 -1
  5. package/dist/app-dir/create-action-hook.d.ts +1 -1
  6. package/dist/app-dir/create-action-hook.d.ts.map +1 -1
  7. package/dist/app-dir/create-action-hook.js +3 -3
  8. package/dist/app-dir/create-action-hook.mjs +2 -2
  9. package/dist/app-dir/links/nextCache.d.ts +1 -1
  10. package/dist/app-dir/links/nextCache.d.ts.map +1 -1
  11. package/dist/app-dir/links/nextCache.js +3 -3
  12. package/dist/app-dir/links/nextCache.mjs +2 -2
  13. package/dist/app-dir/links/nextHttp.d.ts +1 -1
  14. package/dist/app-dir/links/nextHttp.d.ts.map +1 -1
  15. package/dist/app-dir/server.d.ts +4 -5
  16. package/dist/app-dir/server.d.ts.map +1 -1
  17. package/dist/app-dir/server.js +7 -7
  18. package/dist/app-dir/server.mjs +1 -1
  19. package/dist/app-dir/shared.d.ts +5 -5
  20. package/dist/app-dir/shared.d.ts.map +1 -1
  21. package/dist/app-dir/shared.js +1 -1
  22. package/dist/app-dir/shared.mjs +1 -1
  23. package/dist/app-dir/types.d.ts +8 -8
  24. package/dist/app-dir/types.d.ts.map +1 -1
  25. package/dist/bundle-analysis.json +31 -31
  26. package/dist/createTRPCNext.d.ts +2 -2
  27. package/dist/createTRPCNext.d.ts.map +1 -1
  28. package/dist/createTRPCNext.js +2 -2
  29. package/dist/createTRPCNext.mjs +1 -1
  30. package/dist/withTRPC.d.ts +1 -2
  31. package/dist/withTRPC.d.ts.map +1 -1
  32. package/package.json +8 -9
  33. package/src/app-dir/client.ts +2 -2
  34. package/src/app-dir/create-action-hook.tsx +3 -3
  35. package/src/app-dir/links/nextCache.ts +6 -3
  36. package/src/app-dir/links/nextHttp.ts +1 -1
  37. package/src/app-dir/server.ts +14 -10
  38. package/src/app-dir/shared.ts +11 -8
  39. package/src/app-dir/types.ts +11 -11
  40. package/src/createTRPCNext.tsx +6 -3
  41. package/src/withTRPC.tsx +6 -2
@@ -1,5 +1,5 @@
1
1
  import type { CreateTRPCClient } from '@trpc/client';
2
- import type { AnyRouter } from '@trpc/core';
2
+ import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { CreateTRPCNextAppRouterOptions } from './shared';
4
4
  export { experimental_createActionHook, experimental_serverActionLink, type UseTRPCActionResult, } from './create-action-hook';
5
5
  export declare function experimental_createTRPCNextAppDirClient<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): CreateTRPCClient<TRouter>;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/app-dir/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAEL,6BAA6B,EAE7B,6BAA6B,EAE7B,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAS9B,wBAAgB,uCAAuC,CACrD,OAAO,SAAS,SAAS,EACzB,IAAI,EAAE,8BAA8B,CAAC,OAAO,CAAC,6BAwC9C"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/app-dir/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAEL,6BAA6B,EAE7B,6BAA6B,EAE7B,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAS9B,wBAAgB,uCAAuC,CACrD,OAAO,SAAS,SAAS,EACzB,IAAI,EAAE,8BAA8B,CAAC,OAAO,CAAC,6BAwC9C"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var client = require('@trpc/client');
4
- var core = require('@trpc/core');
4
+ var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
5
5
  var createActionHook = require('./create-action-hook.js');
6
6
 
7
7
  // ts-prune-ignore-next
@@ -9,7 +9,7 @@ function experimental_createTRPCNextAppDirClient(opts) {
9
9
  const client$1 = client.createTRPCUntypedClient(opts.config());
10
10
  // const useProxy = createUseProxy<TRouter>(client);
11
11
  const cache = new Map();
12
- return core.createRecursiveProxy(({ path , args })=>{
12
+ return unstableCoreDoNotImport.createRecursiveProxy(({ path , args })=>{
13
13
  // const pathCopy = [key, ...path];
14
14
  const pathCopy = [
15
15
  ...path
@@ -1,5 +1,5 @@
1
1
  import { createTRPCUntypedClient, clientCallTypeToProcedureType } from '@trpc/client';
2
- import { createRecursiveProxy } from '@trpc/core';
2
+ import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
3
3
  export { experimental_createActionHook, experimental_serverActionLink } from './create-action-hook.mjs';
4
4
 
5
5
  // ts-prune-ignore-next
@@ -1,6 +1,6 @@
1
1
  import type { CreateTRPCClientOptions, TRPCLink } from '@trpc/client';
2
2
  import { TRPCClientError } from '@trpc/client';
3
- import type { AnyRouter, MaybePromise, ProcedureOptions, Simplify } from '@trpc/core';
3
+ import type { AnyRouter, MaybePromise, ProcedureOptions, Simplify } from '@trpc/server/unstable-core-do-not-import';
4
4
  import type { TRPCActionHandler } from './server';
5
5
  import type { ActionHandlerDef } from './shared';
6
6
  type MutationArgs<TDef extends ActionHandlerDef> = TDef['input'] extends void ? [input?: undefined | void, opts?: ProcedureOptions] : [input: FormData | TDef['input'], opts?: ProcedureOptions];
@@ -1 +1 @@
1
- {"version":3,"file":"create-action-hook.d.ts","sourceRoot":"","sources":["../../src/app-dir/create-action-hook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,QAAQ,EAET,MAAM,cAAc,CAAC;AACtB,OAAO,EAA2B,eAAe,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACT,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,KAAK,YAAY,CAAC,IAAI,SAAS,gBAAgB,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,GACzE,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,GACnD,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAE/D,UAAU,uBAAuB,CAAC,IAAI,SAAS,gBAAgB;IAC7D,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC9C,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvE;AAED,UAAU,0BAA0B,CAAC,IAAI,SAAS,gBAAgB,CAChE,SAAQ,uBAAuB,CAAC,IAAI,CAAC;IACrC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,UAAU,wBAAwB,CAAC,IAAI,SAAS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C,oKA6FvC"}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var client = require('@trpc/client');
4
- var core = require('@trpc/core');
5
- var observable = require('@trpc/core/observable');
4
+ var observable = require('@trpc/server/observable');
5
+ var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
6
6
  var React = require('react');
7
7
  var shared = require('./shared.js');
8
8
 
@@ -11,7 +11,7 @@ function experimental_serverActionLink() {
11
11
  return (runtime)=>({ op })=>observable.observable((observer)=>{
12
12
  const context = op.context;
13
13
  context._action(shared.isFormData(op.input) ? op.input : runtime.transformer.serialize(op.input)).then((data)=>{
14
- const transformed = core.transformResult(data, runtime.transformer);
14
+ const transformed = unstableCoreDoNotImport.transformResult(data, runtime.transformer);
15
15
  if (!transformed.ok) {
16
16
  observer.error(client.TRPCClientError.from(transformed.error, {}));
17
17
  return;
@@ -1,6 +1,6 @@
1
1
  import { TRPCClientError, createTRPCUntypedClient } from '@trpc/client';
2
- import { transformResult } from '@trpc/core';
3
- import { observable } from '@trpc/core/observable';
2
+ import { observable } from '@trpc/server/observable';
3
+ import { transformResult } from '@trpc/server/unstable-core-do-not-import';
4
4
  import { useRef, useState, useEffect, useCallback, useMemo } from 'react';
5
5
  import { isFormData } from './shared.mjs';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import type { TRPCLink } from '@trpc/client';
2
- import type { AnyRouter, inferRouterContext } from '@trpc/core';
2
+ import type { AnyRouter, inferRouterContext } from '@trpc/server/unstable-core-do-not-import';
3
3
  type NextCacheLinkOptions<TRouter extends AnyRouter> = {
4
4
  router: TRouter;
5
5
  createContext: () => Promise<inferRouterContext<TRouter>>;
@@ -1 +1 @@
1
- {"version":3,"file":"nextCache.d.ts","sourceRoot":"","sources":["../../../src/app-dir/links/nextCache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMhE,KAAK,oBAAoB,CAAC,OAAO,SAAS,SAAS,IAAI;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7B,CAAC;AAGF,wBAAgB,0BAA0B,CAAC,OAAO,SAAS,SAAS,EAClE,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAClC,QAAQ,CAAC,OAAO,CAAC,CAyDnB"}
1
+ {"version":3,"file":"nextCache.d.ts","sourceRoot":"","sources":["../../../src/app-dir/links/nextCache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,0CAA0C,CAAC;AAKlD,KAAK,oBAAoB,CAAC,OAAO,SAAS,SAAS,IAAI;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC7B,CAAC;AAGF,wBAAgB,0BAA0B,CAAC,OAAO,SAAS,SAAS,EAClE,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAClC,QAAQ,CAAC,OAAO,CAAC,CAyDnB"}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var client = require('@trpc/client');
4
- var core = require('@trpc/core');
5
- var observable = require('@trpc/core/observable');
4
+ var observable = require('@trpc/server/observable');
5
+ var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
6
6
  var cache = require('next/cache');
7
7
  var shared = require('../shared.js');
8
8
 
@@ -20,7 +20,7 @@ function experimental_nextCacheLink(opts) {
20
20
  // // _cachebuster is not used by us but to make sure
21
21
  // // that calls with different tags are properly separated
22
22
  // // @link https://github.com/trpc/trpc/issues/4622
23
- const procedureResult = await core.callProcedure({
23
+ const procedureResult = await unstableCoreDoNotImport.callProcedure({
24
24
  procedures: opts.router._def.procedures,
25
25
  path,
26
26
  getRawInput: async ()=>input,
@@ -1,6 +1,6 @@
1
1
  import { TRPCClientError } from '@trpc/client';
2
- import { callProcedure } from '@trpc/core';
3
- import { observable } from '@trpc/core/observable';
2
+ import { observable } from '@trpc/server/observable';
3
+ import { callProcedure } from '@trpc/server/unstable-core-do-not-import';
4
4
  import { unstable_cache } from 'next/cache';
5
5
  import { generateCacheTag } from '../shared.mjs';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import type { HTTPBatchLinkOptions, HTTPLinkOptions, TRPCLink } from '@trpc/client';
2
- import type { AnyRouter } from '@trpc/core';
2
+ import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
3
3
  interface NextLinkBaseOptions {
4
4
  revalidate?: number | false;
5
5
  batch?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"nextHttp.d.ts","sourceRoot":"","sources":["../../../src/app-dir/links/nextHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,UAAU,mBAAmB;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,qBACR,SAAQ,mBAAmB,EACzB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,oBACR,SAAQ,mBAAmB,EACzB,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACrC,KAAK,EAAE,IAAI,CAAC;CACb;AAGD,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,SAAS,EACjE,IAAI,EAAE,qBAAqB,GAAG,oBAAoB,GACjD,QAAQ,CAAC,OAAO,CAAC,CAyCnB"}
1
+ {"version":3,"file":"nextHttp.d.ts","sourceRoot":"","sources":["../../../src/app-dir/links/nextHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAG1E,UAAU,mBAAmB;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,qBACR,SAAQ,mBAAmB,EACzB,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,oBACR,SAAQ,mBAAmB,EACzB,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACrC,KAAK,EAAE,IAAI,CAAC;CACb;AAGD,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,SAAS,EACjE,IAAI,EAAE,qBAAqB,GAAG,oBAAoB,GACjD,QAAQ,CAAC,OAAO,CAAC,CAyCnB"}
@@ -1,14 +1,13 @@
1
- import type { AnyProcedure, AnyRootConfig, AnyRouter, MaybePromise, Simplify } from '@trpc/core';
2
- import type { TRPCResponse } from '@trpc/core/rpc';
1
+ import type { AnyProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, MaybePromise, RootConfig, Simplify, TRPCResponse } from '@trpc/server/unstable-core-do-not-import';
3
2
  import type { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef } from './shared';
4
3
  import type { NextAppDirDecoratedProcedureRecord } from './types';
5
- export declare function experimental_createTRPCNextAppDirServer<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): NextAppDirDecoratedProcedureRecord<TRouter["_def"]["_config"], TRouter["_def"]["record"]>;
4
+ export declare function experimental_createTRPCNextAppDirServer<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): NextAppDirDecoratedProcedureRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>;
6
5
  /**
7
6
  * @internal
8
7
  */
9
8
  export type TRPCActionHandler<TDef extends ActionHandlerDef> = (input: FormData | TDef['input']) => Promise<TRPCResponse<TDef['output'], TDef['errorShape']>>;
10
9
  export declare function experimental_createServerActionHandler<TInstance extends {
11
- _config: AnyRootConfig;
10
+ _config: RootConfig<AnyRootTypes>;
12
11
  }>(t: TInstance, opts: {
13
12
  createContext: () => MaybePromise<TInstance['_config']['$types']['ctx']>;
14
13
  /**
@@ -17,7 +16,7 @@ export declare function experimental_createServerActionHandler<TInstance extends
17
16
  */
18
17
  normalizeFormData?: boolean;
19
18
  }): <TProc extends AnyProcedure>(proc: TProc) => TRPCActionHandler<{
20
- input: import("@trpc/core").ProcedureArgs<import("@trpc/core").inferProcedureParams<TProc>>[0];
19
+ input: inferProcedureInput<TProc>;
21
20
  output: TProc["_def"]["_output_out"];
22
21
  errorShape: TInstance["_config"]["$types"]["errorShape"];
23
22
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app-dir/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EAGT,YAAY,EACZ,QAAQ,EACT,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD,OAAO,KAAK,EACV,gBAAgB,EAChB,8BAA8B,EAC9B,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,SAAS,CAAC;AAGlE,wBAAgB,uCAAuC,CACrD,OAAO,SAAS,SAAS,EACzB,IAAI,EAAE,8BAA8B,CAAC,OAAO,CA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AAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAE/D,wBAAgB,sCAAsC,CACpD,SAAS,SAAS;IAChB,OAAO,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;CACnC,EAED,CAAC,EAAE,SAAS,EACZ,IAAI,EAAE;IACJ,aAAa,EAAE,MAAM,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;;;;GAoEF;AAGD,wBAAsB,+BAA+B,CAAC,GAAG,EAAE,OAAO,qBAiBjE"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var client = require('@trpc/client');
4
- var core = require('@trpc/core');
4
+ var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
5
5
  var cache = require('next/cache');
6
6
  var React = require('react');
7
7
  var formDataToObject = require('./formDataToObject.js');
@@ -14,7 +14,7 @@ function experimental_createTRPCNextAppDirServer(opts) {
14
14
  const config = opts.config();
15
15
  return client.createTRPCUntypedClient(config);
16
16
  });
17
- return core.createRecursiveProxy((callOpts)=>{
17
+ return unstableCoreDoNotImport.createRecursiveProxy((callOpts)=>{
18
18
  // lazily initialize client
19
19
  const client$1 = getClient();
20
20
  const pathCopy = [
@@ -47,7 +47,7 @@ function experimental_createServerActionHandler(t, opts) {
47
47
  try {
48
48
  rawInput = formDataToObject.formDataToObject(rawInput);
49
49
  } catch {
50
- throw new core.TRPCError({
50
+ throw new unstableCoreDoNotImport.TRPCError({
51
51
  code: 'INTERNAL_SERVER_ERROR',
52
52
  message: 'Failed to convert FormData to an object'
53
53
  });
@@ -62,15 +62,15 @@ function experimental_createServerActionHandler(t, opts) {
62
62
  getRawInput: async ()=>rawInput,
63
63
  type: proc._def.type
64
64
  });
65
- const transformedJSON = core.transformTRPCResponse(config, {
65
+ const transformedJSON = unstableCoreDoNotImport.transformTRPCResponse(config, {
66
66
  result: {
67
67
  data
68
68
  }
69
69
  });
70
70
  return transformedJSON;
71
71
  } catch (cause) {
72
- const error = core.getTRPCErrorFromUnknown(cause);
73
- const shape = core.getErrorShape({
72
+ const error = unstableCoreDoNotImport.getTRPCErrorFromUnknown(cause);
73
+ const shape = unstableCoreDoNotImport.getErrorShape({
74
74
  config,
75
75
  ctx,
76
76
  error,
@@ -79,7 +79,7 @@ function experimental_createServerActionHandler(t, opts) {
79
79
  type: proc._def.type
80
80
  });
81
81
  // TODO: send the right HTTP header?!
82
- return core.transformTRPCResponse(t._config, {
82
+ return unstableCoreDoNotImport.transformTRPCResponse(t._config, {
83
83
  error: shape
84
84
  });
85
85
  }
@@ -1,5 +1,5 @@
1
1
  import { createTRPCUntypedClient, clientCallTypeToProcedureType } from '@trpc/client';
2
- import { createRecursiveProxy, TRPCError, transformTRPCResponse, getTRPCErrorFromUnknown, getErrorShape } from '@trpc/core';
2
+ import { createRecursiveProxy, TRPCError, transformTRPCResponse, getTRPCErrorFromUnknown, getErrorShape } from '@trpc/server/unstable-core-do-not-import';
3
3
  import { revalidateTag } from 'next/cache';
4
4
  import { cache } from 'react';
5
5
  import { formDataToObject } from './formDataToObject.mjs';
@@ -1,10 +1,10 @@
1
1
  import type { CreateTRPCClientOptions, Resolver, TRPCUntypedClient } from '@trpc/client';
2
- import type { AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, Filter, inferHandlerInput, ProtectedIntersection } from '@trpc/core';
2
+ import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, Filter, inferProcedureInput, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
3
3
  /**
4
4
  * @internal
5
5
  */
6
6
  export type UseProcedureRecord<TRouter extends AnyRouter> = {
7
- [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseProcedureRecord<TRouter['_def']['record'][TKey]> : Resolver<TRouter['_def']['_config'], TRouter['_def']['record'][TKey]>;
7
+ [TKey in keyof Filter<TRouter['_def']['record'], AnyQueryProcedure | AnyRouter>]: TRouter['_def']['record'][TKey] extends AnyRouter ? UseProcedureRecord<TRouter['_def']['record'][TKey]> : Resolver<TRouter['_def']['_config']['$types'], TRouter['_def']['record'][TKey]>;
8
8
  };
9
9
  export declare function createUseProxy<TRouter extends AnyRouter>(client: TRPCUntypedClient<TRouter>): UseProcedureRecord<TRouter>;
10
10
  type NextAppRouterUse<TRouter extends AnyRouter> = {
@@ -39,10 +39,10 @@ export interface ActionHandlerDef {
39
39
  /**
40
40
  * @internal
41
41
  */
42
- export type inferActionDef<TConfig extends AnyRootConfig, TProc extends AnyProcedure> = {
43
- input: inferHandlerInput<TProc>[0];
42
+ export type inferActionDef<TRoot extends AnyRootTypes, TProc extends AnyProcedure> = {
43
+ input: inferProcedureInput<TProc>;
44
44
  output: TProc['_def']['_output_out'];
45
- errorShape: TConfig['$types']['errorShape'];
45
+ errorShape: TRoot['errorShape'];
46
46
  };
47
47
  export {};
48
48
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/app-dir/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,QAAQ,EACR,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,MAAM,EACN,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,IAAI;KACzD,IAAI,IAAI,MAAM,MAAM,CACnB,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACzB,iBAAiB,GAAG,SAAS,CAC9B,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,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O,GAAG,KAAK,IAAI,QAAQ,CAM5D;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,GAAG,CAAC;CACjB;AAGD;;GAEG;AACH,MAAM,MAAM,cAAc,CACxB,KAAK,SAAS,YAAY,EAC1B,KAAK,SAAS,YAAY,IACxB;IACF,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;IACrC,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CACjC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('@trpc/core');
3
+ require('@trpc/server/unstable-core-do-not-import');
4
4
 
5
5
  /**
6
6
  * @internal
@@ -1,4 +1,4 @@
1
- import '@trpc/core';
1
+ import '@trpc/server/unstable-core-do-not-import';
2
2
 
3
3
  /**
4
4
  * @internal
@@ -1,19 +1,19 @@
1
1
  import type { Resolver } from '@trpc/client';
2
- import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, AnySubscriptionProcedure, ProcedureArgs, ProcedureRouterRecord } from '@trpc/core';
3
- export type DecorateProcedureServer<TConfig extends AnyRootConfig, TProcedure extends AnyProcedure> = TProcedure extends AnyQueryProcedure ? {
4
- query: Resolver<TConfig, TProcedure>;
5
- revalidate: (input?: ProcedureArgs<TProcedure['_def']>[0]) => Promise<{
2
+ import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, AnySubscriptionProcedure, inferProcedureInput, ProcedureRouterRecord } from '@trpc/server/unstable-core-do-not-import';
3
+ export type DecorateProcedureServer<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = TProcedure extends AnyQueryProcedure ? {
4
+ query: Resolver<TRoot, TProcedure>;
5
+ revalidate: (input?: inferProcedureInput<TProcedure>) => Promise<{
6
6
  revalidated: false;
7
7
  error: string;
8
8
  } | {
9
9
  revalidated: true;
10
10
  }>;
11
11
  } : TProcedure extends AnyMutationProcedure ? {
12
- mutate: Resolver<TConfig, TProcedure>;
12
+ mutate: Resolver<TRoot, TProcedure>;
13
13
  } : TProcedure extends AnySubscriptionProcedure ? {
14
- subscribe: Resolver<TConfig, TProcedure>;
14
+ subscribe: Resolver<TRoot, TProcedure>;
15
15
  } : never;
16
- export type NextAppDirDecoratedProcedureRecord<TConfig extends AnyRootConfig, TProcedures extends ProcedureRouterRecord> = {
17
- [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? NextAppDirDecoratedProcedureRecord<TConfig, TProcedures[TKey]['_def']['record']> : TProcedures[TKey] extends AnyProcedure ? DecorateProcedureServer<TConfig, TProcedures[TKey]> : never;
16
+ export type NextAppDirDecoratedProcedureRecord<TRoot extends AnyRootTypes, TProcedures extends ProcedureRouterRecord> = {
17
+ [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter ? NextAppDirDecoratedProcedureRecord<TRoot, TProcedures[TKey]['_def']['record']> : TProcedures[TKey] extends AnyProcedure ? DecorateProcedureServer<TRoot, TProcedures[TKey]> : never;
18
18
  };
19
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/app-dir/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B,UAAU,SAAS,iBAAiB,GACpC;IACE,KAAK,EAAE,QA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,YAAY,IAC7B,UAAU,SAAS,iBAAiB,GACpC;IACE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACnC,UAAU,EAAE,CACV,KAAK,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,KACpC,OAAO,CACV;QAAE,WAAW,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,WAAW,EAAE,IAAI,CAAA;KAAE,CAC9D,CAAC;CACH,GACD,UAAU,SAAS,oBAAoB,GACvC;IACE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;CACrC,GACD,UAAU,SAAS,wBAAwB,GAC3C;IACE,SAAS,EAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;CACxC,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,kCAAkC,CAC5C,KAAK,SAAS,YAAY,EAC1B,WAAW,SAAS,qBAAqB,IACvC;KACD,IAAI,IAAI,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5D,kCAAkC,CAChC,KAAK,EACL,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CACpC,GACD,WAAW,CAAC,IAAI,CAAC,SAAS,YAAY,GACtC,uBAAuB,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACjD,KAAK;CACV,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 22019,
3
- "bundleOrigSize": 32285,
4
- "bundleReduction": 31.8,
2
+ "bundleSize": 22209,
3
+ "bundleOrigSize": 32702,
4
+ "bundleReduction": 32.09,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/withTRPC.tsx",
@@ -15,13 +15,13 @@
15
15
  "/src/index.ts",
16
16
  "/src/createTRPCNext.tsx"
17
17
  ],
18
- "percent": 35.64,
18
+ "percent": 35.34,
19
19
  "reduction": 16.26
20
20
  },
21
21
  {
22
22
  "id": "/src/app-dir/server.ts",
23
- "size": 3708,
24
- "origSize": 4872,
23
+ "size": 3822,
24
+ "origSize": 4916,
25
25
  "renderedExports": [
26
26
  "experimental_createTRPCNextAppDirServer",
27
27
  "experimental_createServerActionHandler",
@@ -29,13 +29,13 @@
29
29
  ],
30
30
  "removedExports": [],
31
31
  "dependents": [],
32
- "percent": 16.84,
33
- "reduction": 23.89
32
+ "percent": 17.21,
33
+ "reduction": 22.25
34
34
  },
35
35
  {
36
36
  "id": "/src/app-dir/create-action-hook.tsx",
37
- "size": 3318,
38
- "origSize": 5723,
37
+ "size": 3337,
38
+ "origSize": 5785,
39
39
  "renderedExports": [
40
40
  "experimental_serverActionLink",
41
41
  "experimental_createActionHook"
@@ -44,49 +44,49 @@
44
44
  "dependents": [
45
45
  "/src/app-dir/client.ts"
46
46
  ],
47
- "percent": 15.07,
48
- "reduction": 42.02
47
+ "percent": 15.03,
48
+ "reduction": 42.32
49
49
  },
50
50
  {
51
51
  "id": "/src/app-dir/links/nextCache.ts",
52
- "size": 2486,
53
- "origSize": 2767,
52
+ "size": 2505,
53
+ "origSize": 2834,
54
54
  "renderedExports": [
55
55
  "experimental_nextCacheLink"
56
56
  ],
57
57
  "removedExports": [],
58
58
  "dependents": [],
59
- "percent": 11.29,
60
- "reduction": 10.16
59
+ "percent": 11.28,
60
+ "reduction": 11.61
61
61
  },
62
62
  {
63
63
  "id": "/src/app-dir/client.ts",
64
- "size": 1260,
65
- "origSize": 1834,
64
+ "size": 1279,
65
+ "origSize": 1894,
66
66
  "renderedExports": [
67
67
  "experimental_createTRPCNextAppDirClient"
68
68
  ],
69
69
  "removedExports": [],
70
70
  "dependents": [],
71
- "percent": 5.72,
72
- "reduction": 31.3
71
+ "percent": 5.76,
72
+ "reduction": 32.47
73
73
  },
74
74
  {
75
75
  "id": "/src/app-dir/links/nextHttp.ts",
76
76
  "size": 1192,
77
- "origSize": 1750,
77
+ "origSize": 1780,
78
78
  "renderedExports": [
79
79
  "experimental_nextHttpLink"
80
80
  ],
81
81
  "removedExports": [],
82
82
  "dependents": [],
83
- "percent": 5.41,
84
- "reduction": 31.89
83
+ "percent": 5.37,
84
+ "reduction": 33.03
85
85
  },
86
86
  {
87
87
  "id": "/src/createTRPCNext.tsx",
88
- "size": 1054,
89
- "origSize": 2631,
88
+ "size": 1073,
89
+ "origSize": 2706,
90
90
  "renderedExports": [
91
91
  "createTRPCNext"
92
92
  ],
@@ -94,8 +94,8 @@
94
94
  "dependents": [
95
95
  "/src/index.ts"
96
96
  ],
97
- "percent": 4.79,
98
- "reduction": 59.94
97
+ "percent": 4.83,
98
+ "reduction": 60.35
99
99
  },
100
100
  {
101
101
  "id": "/src/app-dir/formDataToObject.ts",
@@ -108,13 +108,13 @@
108
108
  "dependents": [
109
109
  "/src/app-dir/server.ts"
110
110
  ],
111
- "percent": 3.71,
111
+ "percent": 3.68,
112
112
  "reduction": 0.97
113
113
  },
114
114
  {
115
115
  "id": "/src/app-dir/shared.ts",
116
116
  "size": 335,
117
- "origSize": 2448,
117
+ "origSize": 2527,
118
118
  "renderedExports": [
119
119
  "generateCacheTag",
120
120
  "isFormData"
@@ -128,8 +128,8 @@
128
128
  "/src/app-dir/links/nextHttp.ts",
129
129
  "/src/app-dir/create-action-hook.tsx"
130
130
  ],
131
- "percent": 1.52,
132
- "reduction": 86.32
131
+ "percent": 1.51,
132
+ "reduction": 86.74
133
133
  },
134
134
  {
135
135
  "id": "/src/index.ts",
@@ -1,5 +1,5 @@
1
- import type { AnyRouter, ProtectedIntersection } from '@trpc/core';
2
1
  import type { CreateReactUtils, DecoratedProcedureRecord, TRPCUseQueries, TRPCUseSuspenseQueries } from '@trpc/react-query/shared';
2
+ import type { AnyRouter, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { NextPageContext } from 'next/types';
4
4
  import type { WithTRPCNoSSROptions, WithTRPCSSROptions } from './withTRPC';
5
5
  import { withTRPC } from './withTRPC';
@@ -24,6 +24,6 @@ export interface CreateTRPCNextBase<TRouter extends AnyRouter, TSSRContext exten
24
24
  /**
25
25
  * @internal
26
26
  */
27
- export type CreateTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext, TFlags> = ProtectedIntersection<CreateTRPCNextBase<TRouter, TSSRContext>, DecoratedProcedureRecord<TRouter['_def']['_config'], TRouter['_def']['record'], TFlags>>;
27
+ export type CreateTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext, TFlags> = ProtectedIntersection<CreateTRPCNextBase<TRouter, TSSRContext>, DecoratedProcedureRecord<TRouter['_def']['_config']['$types'], TRouter['_def']['record'], TFlags>>;
28
28
  export declare function createTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext, TFlags = null>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): CreateTRPCNext<TRouter, TSSRContext, TFlags>;
29
29
  //# sourceMappingURL=createTRPCNext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnE,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,kBAAkB,CACjC,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe;IAEnC;;;;OAIG;IACH,UAAU,IAAI,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,IA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M,WAAW,kBAAkB,CACjC,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe;IAEnC;;;;OAIG;IACH,UAAU,IAAI,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD;;OAEG;IACH,QAAQ,IAAI,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACnD,QAAQ,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;IAC5D,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACpC,kBAAkB,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CACxB,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe,EACnC,MAAM,IACJ,qBAAqB,CACvB,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,EACxC,wBAAwB,CACtB,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACzB,MAAM,CACP,CACF,CAAC;AAEF,wBAAgB,cAAc,CAC5B,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe,GAAG,eAAe,EACrD,MAAM,GAAG,IAAI,EAEb,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAChE,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CA+B9C"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var core = require('@trpc/core');
4
3
  var shared = require('@trpc/react-query/shared');
4
+ var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
5
5
  var React = require('react');
6
6
  var withTRPC = require('./withTRPC.js');
7
7
 
@@ -10,7 +10,7 @@ function createTRPCNext(opts) {
10
10
  const hooks = shared.createRootHooks(opts);
11
11
  // TODO: maybe set TSSRContext to `never` when using `WithTRPCNoSSROptions`
12
12
  const _withTRPC = withTRPC.withTRPC(opts);
13
- return core.createFlatProxy((key)=>{
13
+ return unstableCoreDoNotImport.createFlatProxy((key)=>{
14
14
  if (key === 'useContext' || key === 'useUtils') {
15
15
  return ()=>{
16
16
  const context = hooks.useUtils();
@@ -1,5 +1,5 @@
1
- import { createFlatProxy } from '@trpc/core';
2
1
  import { createRootHooks, createReactQueryUtils, createReactDecoration } from '@trpc/react-query/shared';
2
+ import { createFlatProxy } from '@trpc/server/unstable-core-do-not-import';
3
3
  import { useMemo } from 'react';
4
4
  import { withTRPC } from './withTRPC.mjs';
5
5
 
@@ -1,8 +1,7 @@
1
1
  import type { CreateTRPCClientOptions } from '@trpc/client';
2
- import type { AnyRouter } from '@trpc/core';
3
- import type { ResponseMeta } from '@trpc/core/http';
4
2
  import type { TRPCClientError } from '@trpc/react-query';
5
3
  import type { CreateTRPCReactOptions, CreateTRPCReactQueryClientConfig } from '@trpc/react-query/shared';
4
+ import type { AnyRouter, ResponseMeta } from '@trpc/server/unstable-core-do-not-import';
6
5
  import type { NextComponentType, NextPageContext } from 'next/dist/shared/lib/utils';
7
6
  export type WithTRPCConfig<TRouter extends AnyRouter> = CreateTRPCClientOptions<TRouter> & CreateTRPCReactQueryClientConfig & {
8
7
  abortOnUnmount?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"withTRPC.d.ts","sourceRoot":"","sources":["../src/withTRPC.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAqB,MAAM,cAAc,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EACV,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,0BAA0B,CAAC;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,wBAAgB,QAAQ,CACtB,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe,GAAG,eAAe,EACrD,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC,eAU9C,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,iBAAiB,CAqMxE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/next",
3
- "version": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869",
3
+ "version": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
4
4
  "description": "The tRPC Next.js library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -65,13 +65,11 @@
65
65
  "app-dir",
66
66
  "!**/*.test.*"
67
67
  ],
68
- "dependencies": {
69
- "@trpc/core": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869"
70
- },
71
68
  "peerDependencies": {
72
69
  "@tanstack/react-query": "^5.0.0",
73
- "@trpc/client": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869",
74
- "@trpc/react-query": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869",
70
+ "@trpc/client": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
71
+ "@trpc/react-query": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
72
+ "@trpc/server": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
75
73
  "next": "*",
76
74
  "react": ">=16.8.0",
77
75
  "react-dom": ">=16.8.0"
@@ -86,8 +84,9 @@
86
84
  },
87
85
  "devDependencies": {
88
86
  "@tanstack/react-query": "^5.0.0",
89
- "@trpc/client": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869",
90
- "@trpc/react-query": "11.0.0-alpha-tmp-workflow-merge.250+8ce2ac869",
87
+ "@trpc/client": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
88
+ "@trpc/react-query": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
89
+ "@trpc/server": "11.0.0-alpha-tmp-01-26-rootconfigtypes.261+de5f0b670",
91
90
  "@types/express": "^4.17.17",
92
91
  "@types/node": "^20.10.0",
93
92
  "@types/react": "^18.2.33",
@@ -107,5 +106,5 @@
107
106
  "funding": [
108
107
  "https://trpc.io/sponsor"
109
108
  ],
110
- "gitHead": "8ce2ac869ed1123ceb668da231302fa082196a0b"
109
+ "gitHead": "de5f0b6709157c4fd824bde1014d3ca8f7b08d7b"
111
110
  }
@@ -3,8 +3,8 @@ import {
3
3
  clientCallTypeToProcedureType,
4
4
  createTRPCUntypedClient,
5
5
  } from '@trpc/client';
6
- import type { AnyRouter } from '@trpc/core';
7
- import { createRecursiveProxy } from '@trpc/core';
6
+ import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
7
+ import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
8
8
  import type { CreateTRPCNextAppRouterOptions } from './shared';
9
9
 
10
10
  export {
@@ -4,14 +4,14 @@ import type {
4
4
  TRPCRequestOptions,
5
5
  } from '@trpc/client';
6
6
  import { createTRPCUntypedClient, TRPCClientError } from '@trpc/client';
7
- import { transformResult } from '@trpc/core';
7
+ import { observable } from '@trpc/server/observable';
8
8
  import type {
9
9
  AnyRouter,
10
10
  MaybePromise,
11
11
  ProcedureOptions,
12
12
  Simplify,
13
- } from '@trpc/core';
14
- import { observable } from '@trpc/core/observable';
13
+ } from '@trpc/server/unstable-core-do-not-import';
14
+ import { transformResult } from '@trpc/server/unstable-core-do-not-import';
15
15
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16
16
  import type { TRPCActionHandler } from './server';
17
17
  import type { ActionHandlerDef } from './shared';
@@ -2,9 +2,12 @@
2
2
 
3
3
  import type { TRPCLink } from '@trpc/client';
4
4
  import { TRPCClientError } from '@trpc/client';
5
- import type { AnyRouter, inferRouterContext } from '@trpc/core';
6
- import { callProcedure } from '@trpc/core';
7
- import { observable } from '@trpc/core/observable';
5
+ import { observable } from '@trpc/server/observable';
6
+ import type {
7
+ AnyRouter,
8
+ inferRouterContext,
9
+ } from '@trpc/server/unstable-core-do-not-import';
10
+ import { callProcedure } from '@trpc/server/unstable-core-do-not-import';
8
11
  import { unstable_cache } from 'next/cache';
9
12
  import { generateCacheTag } from '../shared';
10
13
 
@@ -4,7 +4,7 @@ import type {
4
4
  TRPCLink,
5
5
  } from '@trpc/client';
6
6
  import { httpBatchLink, httpLink } from '@trpc/client';
7
- import type { AnyRouter } from '@trpc/core';
7
+ import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
8
8
  import { generateCacheTag } from '../shared';
9
9
 
10
10
  interface NextLinkBaseOptions {
@@ -5,21 +5,21 @@ import {
5
5
  } from '@trpc/client';
6
6
  import type {
7
7
  AnyProcedure,
8
- AnyRootConfig,
8
+ AnyRootTypes,
9
9
  AnyRouter,
10
- CombinedDataTransformer,
11
10
  inferProcedureInput,
12
11
  MaybePromise,
12
+ RootConfig,
13
13
  Simplify,
14
- } from '@trpc/core';
14
+ TRPCResponse,
15
+ } from '@trpc/server/unstable-core-do-not-import';
15
16
  import {
16
17
  createRecursiveProxy,
17
18
  getErrorShape,
18
19
  getTRPCErrorFromUnknown,
19
20
  transformTRPCResponse,
20
21
  TRPCError,
21
- } from '@trpc/core';
22
- import type { TRPCResponse } from '@trpc/core/rpc';
22
+ } from '@trpc/server/unstable-core-do-not-import';
23
23
  import { revalidateTag } from 'next/cache';
24
24
  import { cache } from 'react';
25
25
  import { formDataToObject } from './formDataToObject';
@@ -58,7 +58,7 @@ export function experimental_createTRPCNextAppDirServer<
58
58
 
59
59
  return (client[procedureType] as any)(procedurePath, ...callOpts.args);
60
60
  }) as NextAppDirDecoratedProcedureRecord<
61
- TRouter['_def']['_config'],
61
+ TRouter['_def']['_config']['$types'],
62
62
  TRouter['_def']['record']
63
63
  >;
64
64
  }
@@ -72,7 +72,7 @@ export type TRPCActionHandler<TDef extends ActionHandlerDef> = (
72
72
 
73
73
  export function experimental_createServerActionHandler<
74
74
  TInstance extends {
75
- _config: AnyRootConfig;
75
+ _config: RootConfig<AnyRootTypes>;
76
76
  },
77
77
  >(
78
78
  t: TInstance,
@@ -88,12 +88,14 @@ export function experimental_createServerActionHandler<
88
88
  const config = t._config;
89
89
  const { normalizeFormData = true, createContext } = opts;
90
90
 
91
- const transformer = config.transformer as CombinedDataTransformer;
91
+ const transformer = config.transformer;
92
92
 
93
93
  // TODO allow this to take a `TRouter` in addition to a `AnyProcedure`
94
94
  return function createServerAction<TProc extends AnyProcedure>(
95
95
  proc: TProc,
96
- ): TRPCActionHandler<Simplify<inferActionDef<TInstance['_config'], TProc>>> {
96
+ ): TRPCActionHandler<
97
+ Simplify<inferActionDef<TInstance['_config']['$types'], TProc>>
98
+ > {
97
99
  return async function actionHandler(
98
100
  rawInput: FormData | inferProcedureInput<TProc>,
99
101
  ) {
@@ -145,7 +147,9 @@ export function experimental_createServerActionHandler<
145
147
  error: shape,
146
148
  });
147
149
  }
148
- } as TRPCActionHandler<inferActionDef<TInstance['_config'], TProc>>;
150
+ } as TRPCActionHandler<
151
+ inferActionDef<TInstance['_config']['$types'], TProc>
152
+ >;
149
153
  };
150
154
  }
151
155
 
@@ -6,13 +6,13 @@ import type {
6
6
  import type {
7
7
  AnyProcedure,
8
8
  AnyQueryProcedure,
9
- AnyRootConfig,
9
+ AnyRootTypes,
10
10
  AnyRouter,
11
11
  Filter,
12
- inferHandlerInput,
12
+ inferProcedureInput,
13
13
  ProtectedIntersection,
14
- } from '@trpc/core';
15
- import { createRecursiveProxy } from '@trpc/core';
14
+ } from '@trpc/server/unstable-core-do-not-import';
15
+ import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
16
16
 
17
17
  /**
18
18
  * @internal
@@ -23,7 +23,10 @@ export type UseProcedureRecord<TRouter extends AnyRouter> = {
23
23
  AnyQueryProcedure | AnyRouter
24
24
  >]: TRouter['_def']['record'][TKey] extends AnyRouter
25
25
  ? UseProcedureRecord<TRouter['_def']['record'][TKey]>
26
- : Resolver<TRouter['_def']['_config'], TRouter['_def']['record'][TKey]>;
26
+ : Resolver<
27
+ TRouter['_def']['_config']['$types'],
28
+ TRouter['_def']['record'][TKey]
29
+ >;
27
30
  };
28
31
 
29
32
  export function createUseProxy<TRouter extends AnyRouter>(
@@ -93,10 +96,10 @@ export interface ActionHandlerDef {
93
96
  * @internal
94
97
  */
95
98
  export type inferActionDef<
96
- TConfig extends AnyRootConfig,
99
+ TRoot extends AnyRootTypes,
97
100
  TProc extends AnyProcedure,
98
101
  > = {
99
- input: inferHandlerInput<TProc>[0];
102
+ input: inferProcedureInput<TProc>;
100
103
  output: TProc['_def']['_output_out'];
101
- errorShape: TConfig['$types']['errorShape'];
104
+ errorShape: TRoot['errorShape'];
102
105
  };
@@ -3,45 +3,45 @@ import type {
3
3
  AnyMutationProcedure,
4
4
  AnyProcedure,
5
5
  AnyQueryProcedure,
6
- AnyRootConfig,
6
+ AnyRootTypes,
7
7
  AnyRouter,
8
8
  AnySubscriptionProcedure,
9
- ProcedureArgs,
9
+ inferProcedureInput,
10
10
  ProcedureRouterRecord,
11
- } from '@trpc/core';
11
+ } from '@trpc/server/unstable-core-do-not-import';
12
12
 
13
13
  export type DecorateProcedureServer<
14
- TConfig extends AnyRootConfig,
14
+ TRoot extends AnyRootTypes,
15
15
  TProcedure extends AnyProcedure,
16
16
  > = TProcedure extends AnyQueryProcedure
17
17
  ? {
18
- query: Resolver<TConfig, TProcedure>;
18
+ query: Resolver<TRoot, TProcedure>;
19
19
  revalidate: (
20
- input?: ProcedureArgs<TProcedure['_def']>[0],
20
+ input?: inferProcedureInput<TProcedure>,
21
21
  ) => Promise<
22
22
  { revalidated: false; error: string } | { revalidated: true }
23
23
  >;
24
24
  }
25
25
  : TProcedure extends AnyMutationProcedure
26
26
  ? {
27
- mutate: Resolver<TConfig, TProcedure>;
27
+ mutate: Resolver<TRoot, TProcedure>;
28
28
  }
29
29
  : TProcedure extends AnySubscriptionProcedure
30
30
  ? {
31
- subscribe: Resolver<TConfig, TProcedure>;
31
+ subscribe: Resolver<TRoot, TProcedure>;
32
32
  }
33
33
  : never;
34
34
 
35
35
  export type NextAppDirDecoratedProcedureRecord<
36
- TConfig extends AnyRootConfig,
36
+ TRoot extends AnyRootTypes,
37
37
  TProcedures extends ProcedureRouterRecord,
38
38
  > = {
39
39
  [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter
40
40
  ? NextAppDirDecoratedProcedureRecord<
41
- TConfig,
41
+ TRoot,
42
42
  TProcedures[TKey]['_def']['record']
43
43
  >
44
44
  : TProcedures[TKey] extends AnyProcedure
45
- ? DecorateProcedureServer<TConfig, TProcedures[TKey]>
45
+ ? DecorateProcedureServer<TRoot, TProcedures[TKey]>
46
46
  : never;
47
47
  };
@@ -1,7 +1,5 @@
1
1
  /* istanbul ignore file -- @preserve */
2
2
  // We're testing this through E2E-testing
3
- import type { AnyRouter, ProtectedIntersection } from '@trpc/core';
4
- import { createFlatProxy } from '@trpc/core';
5
3
  import type {
6
4
  CreateReactUtils,
7
5
  DecoratedProcedureRecord,
@@ -13,6 +11,11 @@ import {
13
11
  createReactQueryUtils,
14
12
  createRootHooks,
15
13
  } from '@trpc/react-query/shared';
14
+ import type {
15
+ AnyRouter,
16
+ ProtectedIntersection,
17
+ } from '@trpc/server/unstable-core-do-not-import';
18
+ import { createFlatProxy } from '@trpc/server/unstable-core-do-not-import';
16
19
  import type { NextPageContext } from 'next/types';
17
20
  import { useMemo } from 'react';
18
21
  import type { WithTRPCNoSSROptions, WithTRPCSSROptions } from './withTRPC';
@@ -50,7 +53,7 @@ export type CreateTRPCNext<
50
53
  > = ProtectedIntersection<
51
54
  CreateTRPCNextBase<TRouter, TSSRContext>,
52
55
  DecoratedProcedureRecord<
53
- TRouter['_def']['_config'],
56
+ TRouter['_def']['_config']['$types'],
54
57
  TRouter['_def']['record'],
55
58
  TFlags
56
59
  >
package/src/withTRPC.tsx CHANGED
@@ -10,14 +10,18 @@ import {
10
10
  } from '@tanstack/react-query';
11
11
  import type { CreateTRPCClientOptions, TRPCUntypedClient } from '@trpc/client';
12
12
  import { createTRPCUntypedClient } from '@trpc/client';
13
- import type { AnyRouter, Dict, Maybe } from '@trpc/core';
14
- import type { ResponseMeta } from '@trpc/core/http';
15
13
  import type { TRPCClientError, TRPCClientErrorLike } from '@trpc/react-query';
16
14
  import type {
17
15
  CreateTRPCReactOptions,
18
16
  CreateTRPCReactQueryClientConfig,
19
17
  } from '@trpc/react-query/shared';
20
18
  import { createRootHooks, getQueryClient } from '@trpc/react-query/shared';
19
+ import type {
20
+ AnyRouter,
21
+ Dict,
22
+ Maybe,
23
+ ResponseMeta,
24
+ } from '@trpc/server/unstable-core-do-not-import';
21
25
  import type {
22
26
  AppContextType,
23
27
  AppPropsType,