@trpc/next 11.0.0-alpha-tmp-subscription-connection-state.489 → 11.0.0-alpha-tmp-12-06-react.665

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.
@@ -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 unstableCoreDoNotImport.createRecursiveProxy(({ path , args })=>{
12
+ return unstableCoreDoNotImport.createRecursiveProxy(({ path, args })=>{
13
13
  // const pathCopy = [key, ...path];
14
14
  const pathCopy = [
15
15
  ...path
@@ -31,11 +31,11 @@ function experimental_createTRPCNextAppDirClient(opts) {
31
31
  if (procedureType !== 'query') {
32
32
  return promise;
33
33
  }
34
- const queryCacheKey1 = JSON.stringify([
34
+ const queryCacheKey = JSON.stringify([
35
35
  path,
36
36
  args[0]
37
37
  ]);
38
- cache.set(queryCacheKey1, {
38
+ cache.set(queryCacheKey, {
39
39
  promise
40
40
  });
41
41
  return promise;
@@ -7,7 +7,7 @@ function experimental_createTRPCNextAppDirClient(opts) {
7
7
  const client = createTRPCUntypedClient(opts.config());
8
8
  // const useProxy = createUseProxy<TRouter>(client);
9
9
  const cache = new Map();
10
- return createRecursiveProxy(({ path , args })=>{
10
+ return createRecursiveProxy(({ path, args })=>{
11
11
  // const pathCopy = [key, ...path];
12
12
  const pathCopy = [
13
13
  ...path
@@ -29,11 +29,11 @@ function experimental_createTRPCNextAppDirClient(opts) {
29
29
  if (procedureType !== 'query') {
30
30
  return promise;
31
31
  }
32
- const queryCacheKey1 = JSON.stringify([
32
+ const queryCacheKey = JSON.stringify([
33
33
  path,
34
34
  args[0]
35
35
  ]);
36
- cache.set(queryCacheKey1, {
36
+ cache.set(queryCacheKey, {
37
37
  promise
38
38
  });
39
39
  return promise;
@@ -1 +1 @@
1
- {"version":3,"file":"create-action-hook.d.ts","sourceRoot":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,CAAC,GAC9B,uBAAuB,CAAC,IAAI,CAAC,GAC7B,0BAA0B,CAAC,IAAI,CAAC,GAChC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AAOrC,wBAAgB,6BAA6B,CAC3C,WAAW,SAAS,qBAAqB,EAEzC,GAAG,IAAI,EAAE,qBAAqB,SAAS,WAAW,GAC9C;IACE,SAAS,CAAC,+GAA+G,CAAC;CAC3H,GACD,gBAAgB,CAAC,WAAW,CAAC,CAAC,aAAa,CAAC,SAAS,IAAI,GACvD;IACE,IAAI,EAAE,kBAAkB,CAAC;QACvB,WAAW,EAAE,IAAI,CAAC;KACnB,CAAC;CACH,GACD;IACE,IAAI,CAAC,EAAE,kBAAkB,CAAC;QACxB,WAAW,EAAE,KAAK,CAAC;KACpB,CAAC;CACH,GACN,QAAQ,CAAC,WAAW,CAAC,CA+BvB;AAED,UAAU,oBAAoB,CAAC,IAAI,SAAS,gBAAgB;IAC1D,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC/E;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,SAAS,qBAAqB,EAEzC,IAAI,EAAE,qBAAqB,SAAS,WAAW,GAC3C,SAAS,CAAC,sEAAsE,CAAC,GACjF,uBAAuB,CAAC,WAAW,CAAC,IAQd,IAAI,SAAS,gBAAgB,WAC5C,iBAAiB,CAAC,IAAI,CAAC,kBAChB,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,+BAqFvD"}
@@ -11,7 +11,7 @@ var shared = require('./shared.js');
11
11
  function experimental_serverActionLink(...args) {
12
12
  const [opts] = args;
13
13
  const transformer = unstableInternals.getTransformer(opts?.transformer);
14
- return ()=>({ op })=>observable.observable((observer)=>{
14
+ return ()=>({ op })=>observable.observable((observer)=>{
15
15
  const context = op.context;
16
16
  context._action(shared.isFormData(op.input) ? op.input : transformer.input.serialize(op.input)).then((data)=>{
17
17
  const transformed = unstableCoreDoNotImport.transformResult(data, transformer.output);
@@ -9,7 +9,7 @@ import { isFormData } from './shared.mjs';
9
9
  function experimental_serverActionLink(...args) {
10
10
  const [opts] = args;
11
11
  const transformer = getTransformer(opts?.transformer);
12
- return ()=>({ op })=>observable((observer)=>{
12
+ return ()=>({ op })=>observable((observer)=>{
13
13
  const context = op.context;
14
14
  context._action(isFormData(op.input) ? op.input : transformer.input.serialize(op.input)).then((data)=>{
15
15
  const transformed = transformResult(data, transformer.output);
@@ -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,EAEL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,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,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAGlD,wBAAgB,0BAA0B,CAAC,OAAO,SAAS,SAAS,EAClE,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAClC,QAAQ,CAAC,OAAO,CAAC,CA0DnB"}
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,EAEL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,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,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAGlD,wBAAgB,0BAA0B,CAAC,OAAO,SAAS,SAAS,EAClE,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAClC,QAAQ,CAAC,OAAO,CAAC,CA2DnB"}
@@ -11,8 +11,8 @@ var shared = require('../shared.js');
11
11
  // ts-prune-ignore-next
12
12
  function experimental_nextCacheLink(opts) {
13
13
  const transformer = unstableInternals.getTransformer(opts.transformer);
14
- return ()=>({ op })=>observable.observable((observer)=>{
15
- const { path , input , type , context } = op;
14
+ return ()=>({ op })=>observable.observable((observer)=>{
15
+ const { path, input, type, context } = op;
16
16
  const cacheTag = shared.generateCacheTag(path, input);
17
17
  // Let per-request revalidate override global revalidate
18
18
  const requestRevalidate = typeof context['revalidate'] === 'number' || context['revalidate'] === false ? context['revalidate'] : undefined;
@@ -27,7 +27,8 @@ function experimental_nextCacheLink(opts) {
27
27
  path,
28
28
  getRawInput: async ()=>input,
29
29
  ctx: ctx,
30
- type
30
+ type,
31
+ signal: undefined
31
32
  });
32
33
  // We need to serialize cause the cache only accepts JSON
33
34
  return transformer.input.serialize(procedureResult);
@@ -9,8 +9,8 @@ import { generateCacheTag } from '../shared.mjs';
9
9
  // ts-prune-ignore-next
10
10
  function experimental_nextCacheLink(opts) {
11
11
  const transformer = getTransformer(opts.transformer);
12
- return ()=>({ op })=>observable((observer)=>{
13
- const { path , input , type , context } = op;
12
+ return ()=>({ op })=>observable((observer)=>{
13
+ const { path, input, type, context } = op;
14
14
  const cacheTag = generateCacheTag(path, input);
15
15
  // Let per-request revalidate override global revalidate
16
16
  const requestRevalidate = typeof context['revalidate'] === 'number' || context['revalidate'] === false ? context['revalidate'] : undefined;
@@ -25,7 +25,8 @@ function experimental_nextCacheLink(opts) {
25
25
  path,
26
26
  getRawInput: async ()=>input,
27
27
  ctx: ctx,
28
- type
28
+ type,
29
+ signal: undefined
29
30
  });
30
31
  // We need to serialize cause the cache only accepts JSON
31
32
  return transformer.input.serialize(procedureResult);
@@ -7,7 +7,7 @@ var shared = require('../shared.js');
7
7
  function experimental_nextHttpLink(opts) {
8
8
  return (runtime)=>{
9
9
  return (ctx)=>{
10
- const { path , input , context } = ctx.op;
10
+ const { path, input, context } = ctx.op;
11
11
  const cacheTag = shared.generateCacheTag(path, input);
12
12
  // Let per-request revalidate override global revalidate
13
13
  const requestRevalidate = typeof context['revalidate'] === 'number' || context['revalidate'] === false ? context['revalidate'] : undefined;
@@ -5,7 +5,7 @@ import { generateCacheTag } from '../shared.mjs';
5
5
  function experimental_nextHttpLink(opts) {
6
6
  return (runtime)=>{
7
7
  return (ctx)=>{
8
- const { path , input , context } = ctx.op;
8
+ const { path, input, context } = ctx.op;
9
9
  const cacheTag = generateCacheTag(path, input);
10
10
  // Let per-request revalidate override global revalidate
11
11
  const requestRevalidate = typeof context['revalidate'] === 'number' || context['revalidate'] === false ? context['revalidate'] : undefined;
@@ -2,6 +2,7 @@ import type { CreateContextCallback } from '@trpc/server';
2
2
  import type { AnyProcedure, AnyRootTypes, AnyRouter, ErrorHandlerOptions, inferClientTypes, MaybePromise, RootConfig, Simplify, TRPCResponse } from '@trpc/server/unstable-core-do-not-import';
3
3
  import type { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef } from './shared';
4
4
  import type { NextAppDirDecorateRouterRecord } from './types';
5
+ export type { ActionHandlerDef };
5
6
  export declare function experimental_createTRPCNextAppDirServer<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): NextAppDirDecorateRouterRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>;
6
7
  /**
7
8
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app-dir/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAEhB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,YAAY,EACb,MAAM,0CAA0C,CAAC;AAalD,OAAO,KAAK,EACV,gBAAgB,EAChB,8BAA8B,EAC9B,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAG9D,wBAAgB,uCAAuC,CACrD,OAAO,SAAS,SAAS,EACzB,IAAI,EAAE,8BAA8B,CAAC,OAAO,CAAC,mGA6B9C;AAWD;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,gBAAgB,IAAI,CAC7D,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,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,qBAAqB,CACzB,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,E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Q,GAAG,IAAI,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,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,qBAAqB,CACzB,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACrC,MAAM,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAC1D,GAAG;IACF;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,CACR,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAC7D,IAAI,CAAC;IAEV;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,IAYkC,KAAK,SAAS,YAAY,QACrD,KAAK,KACV,iBAAiB,CAClB,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC,CAC7D,CAuEF;AAGD,wBAAsB,+BAA+B,CAAC,GAAG,EAAE,OAAO,qBAiBjE"}
@@ -36,14 +36,15 @@ function experimental_createTRPCNextAppDirServer(opts) {
36
36
  /**
37
37
  * Rethrow errors that should be handled by Next.js
38
38
  */ const throwNextErrors = (error)=>{
39
- const { cause } = error;
39
+ const { cause } = error;
40
40
  if (redirect.isRedirectError(cause) || notFound.isNotFoundError(cause)) {
41
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
41
42
  throw error.cause;
42
43
  }
43
44
  };
44
45
  function experimental_createServerActionHandler(t, opts) {
45
46
  const config = t._config;
46
- const { normalizeFormData =true , createContext , rethrowNextErrors =true , } = opts;
47
+ const { normalizeFormData = true, createContext, rethrowNextErrors = true } = opts;
47
48
  const transformer = config.transformer;
48
49
  // TODO allow this to take a `TRouter` in addition to a `AnyProcedure`
49
50
  return function createServerAction(proc) {
@@ -69,7 +70,9 @@ function experimental_createServerActionHandler(t, opts) {
69
70
  ctx,
70
71
  path: '',
71
72
  getRawInput: async ()=>rawInput,
72
- type: proc._def.type
73
+ type: proc._def.type,
74
+ // is it possible to get the AbortSignal from the request?
75
+ signal: undefined
73
76
  });
74
77
  const transformedJSON = unstableCoreDoNotImport.transformTRPCResponse(config, {
75
78
  result: {
@@ -86,7 +89,9 @@ function experimental_createServerActionHandler(t, opts) {
86
89
  path: '',
87
90
  type: proc._def.type
88
91
  });
89
- rethrowNextErrors && throwNextErrors(error);
92
+ if (rethrowNextErrors) {
93
+ throwNextErrors(error);
94
+ }
90
95
  const shape = unstableCoreDoNotImport.getErrorShape({
91
96
  config,
92
97
  ctx,
@@ -104,7 +109,7 @@ function experimental_createServerActionHandler(t, opts) {
104
109
  }
105
110
  // ts-prune-ignore-next
106
111
  async function experimental_revalidateEndpoint(req) {
107
- const { cacheTag } = await req.json();
112
+ const { cacheTag } = await req.json();
108
113
  if (typeof cacheTag !== 'string') {
109
114
  return new Response(JSON.stringify({
110
115
  revalidated: false,
@@ -34,14 +34,15 @@ function experimental_createTRPCNextAppDirServer(opts) {
34
34
  /**
35
35
  * Rethrow errors that should be handled by Next.js
36
36
  */ const throwNextErrors = (error)=>{
37
- const { cause } = error;
37
+ const { cause } = error;
38
38
  if (isRedirectError(cause) || isNotFoundError(cause)) {
39
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
39
40
  throw error.cause;
40
41
  }
41
42
  };
42
43
  function experimental_createServerActionHandler(t, opts) {
43
44
  const config = t._config;
44
- const { normalizeFormData =true , createContext , rethrowNextErrors =true , } = opts;
45
+ const { normalizeFormData = true, createContext, rethrowNextErrors = true } = opts;
45
46
  const transformer = config.transformer;
46
47
  // TODO allow this to take a `TRouter` in addition to a `AnyProcedure`
47
48
  return function createServerAction(proc) {
@@ -67,7 +68,9 @@ function experimental_createServerActionHandler(t, opts) {
67
68
  ctx,
68
69
  path: '',
69
70
  getRawInput: async ()=>rawInput,
70
- type: proc._def.type
71
+ type: proc._def.type,
72
+ // is it possible to get the AbortSignal from the request?
73
+ signal: undefined
71
74
  });
72
75
  const transformedJSON = transformTRPCResponse(config, {
73
76
  result: {
@@ -84,7 +87,9 @@ function experimental_createServerActionHandler(t, opts) {
84
87
  path: '',
85
88
  type: proc._def.type
86
89
  });
87
- rethrowNextErrors && throwNextErrors(error);
90
+ if (rethrowNextErrors) {
91
+ throwNextErrors(error);
92
+ }
88
93
  const shape = getErrorShape({
89
94
  config,
90
95
  ctx,
@@ -102,7 +107,7 @@ function experimental_createServerActionHandler(t, opts) {
102
107
  }
103
108
  // ts-prune-ignore-next
104
109
  async function experimental_revalidateEndpoint(req) {
105
- const { cacheTag } = await req.json();
110
+ const { cacheTag } = await req.json();
106
111
  if (typeof cacheTag !== 'string') {
107
112
  return new Response(JSON.stringify({
108
113
  revalidated: false,
@@ -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,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,YAAY,EACb,MAAM,0CAA0C,CAAC;AAGlD;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAC5B,KAAK,SAAS,YAAY,EAC1B,OAAO,SAAS,YAAY,IAC1B;KACD,IAAI,IAAI,MAAM,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,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC3B,GACD,KAAK,CAAC;AAEd,MAAM,MAAM,8BAA8B,CACxC,KAAK,SAAS,YAAY,EAC1B,OAAO,SAAS,YAAY,IAC1B;KACD,IAAI,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,MAAM,MAAM,GACvD,MAAM,SAAS,YAAY,GACzB,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAAC,GAC7C,MAAM,SAAS,YAAY,GACzB,uBAAuB,CACrB,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EACtB;QACE,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,EAAE,+BAA+B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACvD,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;QAChC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;KACnC,CACF,GACD,KAAK,GACT,KAAK;CACV,CAAC"}
@@ -1,24 +1,24 @@
1
1
  {
2
- "bundleSize": 22761,
3
- "bundleOrigSize": 37647,
4
- "bundleReduction": 39.54,
2
+ "bundleSize": 22997,
3
+ "bundleOrigSize": 37951,
4
+ "bundleReduction": 39.4,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/ssrPrepass.ts",
8
- "size": 5062,
9
- "origSize": 5853,
8
+ "size": 5056,
9
+ "origSize": 5851,
10
10
  "renderedExports": [
11
11
  "ssrPrepass"
12
12
  ],
13
13
  "removedExports": [],
14
14
  "dependents": [],
15
- "percent": 22.24,
16
- "reduction": 13.51
15
+ "percent": 21.99,
16
+ "reduction": 13.59
17
17
  },
18
18
  {
19
19
  "id": "/src/app-dir/server.ts",
20
- "size": 4340,
21
- "origSize": 5986,
20
+ "size": 4572,
21
+ "origSize": 6225,
22
22
  "renderedExports": [
23
23
  "experimental_createTRPCNextAppDirServer",
24
24
  "experimental_createServerActionHandler",
@@ -26,79 +26,79 @@
26
26
  ],
27
27
  "removedExports": [],
28
28
  "dependents": [],
29
- "percent": 19.07,
30
- "reduction": 27.5
29
+ "percent": 19.88,
30
+ "reduction": 26.55
31
31
  },
32
32
  {
33
- "id": "/src/withTRPC.tsx",
34
- "size": 3448,
35
- "origSize": 6138,
33
+ "id": "/src/app-dir/create-action-hook.tsx",
34
+ "size": 3435,
35
+ "origSize": 6799,
36
36
  "renderedExports": [
37
- "withTRPC"
37
+ "experimental_serverActionLink",
38
+ "experimental_createActionHook"
38
39
  ],
39
40
  "removedExports": [],
40
41
  "dependents": [
41
- "/src/index.ts",
42
- "/src/createTRPCNext.tsx"
42
+ "/src/app-dir/client.ts"
43
43
  ],
44
- "percent": 15.15,
45
- "reduction": 43.83
44
+ "percent": 14.94,
45
+ "reduction": 49.48
46
46
  },
47
47
  {
48
- "id": "/src/app-dir/create-action-hook.tsx",
49
- "size": 3436,
50
- "origSize": 6779,
48
+ "id": "/src/withTRPC.tsx",
49
+ "size": 3424,
50
+ "origSize": 6138,
51
51
  "renderedExports": [
52
- "experimental_serverActionLink",
53
- "experimental_createActionHook"
52
+ "withTRPC"
54
53
  ],
55
54
  "removedExports": [],
56
55
  "dependents": [
57
- "/src/app-dir/client.ts"
56
+ "/src/index.ts",
57
+ "/src/createTRPCNext.tsx"
58
58
  ],
59
- "percent": 15.1,
60
- "reduction": 49.31
59
+ "percent": 14.89,
60
+ "reduction": 44.22
61
61
  },
62
62
  {
63
63
  "id": "/src/app-dir/links/nextCache.ts",
64
- "size": 2571,
65
- "origSize": 3044,
64
+ "size": 2613,
65
+ "origSize": 3079,
66
66
  "renderedExports": [
67
67
  "experimental_nextCacheLink"
68
68
  ],
69
69
  "removedExports": [],
70
70
  "dependents": [],
71
- "percent": 11.3,
72
- "reduction": 15.54
71
+ "percent": 11.36,
72
+ "reduction": 15.13
73
73
  },
74
74
  {
75
75
  "id": "/src/app-dir/client.ts",
76
- "size": 1279,
76
+ "size": 1275,
77
77
  "origSize": 1892,
78
78
  "renderedExports": [
79
79
  "experimental_createTRPCNextAppDirClient"
80
80
  ],
81
81
  "removedExports": [],
82
82
  "dependents": [],
83
- "percent": 5.62,
84
- "reduction": 32.4
83
+ "percent": 5.54,
84
+ "reduction": 32.61
85
85
  },
86
86
  {
87
87
  "id": "/src/app-dir/links/nextHttp.ts",
88
- "size": 1192,
88
+ "size": 1189,
89
89
  "origSize": 1973,
90
90
  "renderedExports": [
91
91
  "experimental_nextHttpLink"
92
92
  ],
93
93
  "removedExports": [],
94
94
  "dependents": [],
95
- "percent": 5.24,
96
- "reduction": 39.58
95
+ "percent": 5.17,
96
+ "reduction": 39.74
97
97
  },
98
98
  {
99
99
  "id": "/src/createTRPCNext.tsx",
100
100
  "size": 1098,
101
- "origSize": 2776,
101
+ "origSize": 2774,
102
102
  "renderedExports": [
103
103
  "createTRPCNext"
104
104
  ],
@@ -106,13 +106,13 @@
106
106
  "dependents": [
107
107
  "/src/index.ts"
108
108
  ],
109
- "percent": 4.82,
110
- "reduction": 60.45
109
+ "percent": 4.77,
110
+ "reduction": 60.42
111
111
  },
112
112
  {
113
113
  "id": "/src/app-dir/shared.ts",
114
114
  "size": 335,
115
- "origSize": 3144,
115
+ "origSize": 3158,
116
116
  "renderedExports": [
117
117
  "generateCacheTag",
118
118
  "isFormData"
@@ -126,8 +126,8 @@
126
126
  "/src/app-dir/links/nextHttp.ts",
127
127
  "/src/app-dir/create-action-hook.tsx"
128
128
  ],
129
- "percent": 1.47,
130
- "reduction": 89.34
129
+ "percent": 1.46,
130
+ "reduction": 89.39
131
131
  },
132
132
  {
133
133
  "id": "/src/index.ts",
@@ -10,11 +10,11 @@ export interface CreateTRPCNextBase<TRouter extends AnyRouter, TSSRContext exten
10
10
  /**
11
11
  * @deprecated renamed to `useUtils` and will be removed in a future tRPC version
12
12
  *
13
- * @link https://trpc.io/docs/v11/client/react/useUtils
13
+ * @see https://trpc.io/docs/v11/client/react/useUtils
14
14
  */
15
15
  useContext(): CreateReactUtils<TRouter, TSSRContext>;
16
16
  /**
17
- * @link https://trpc.io/docs/v11/client/react/useUtils
17
+ * @see https://trpc.io/docs/v11/client/react/useUtils
18
18
  */
19
19
  useUtils(): CreateReactUtils<TRouter, TSSRContext>;
20
20
  withTRPC: ReturnType<typeof withTRPC<TRouter, TSSRContext>>;
@@ -25,7 +25,7 @@ function transformQueryOrMutationCacheErrors(result) {
25
25
  return result;
26
26
  }
27
27
  const ssrPrepass = (opts)=>{
28
- const { parent , WithTRPC , AppOrPage } = opts;
28
+ const { parent, WithTRPC, AppOrPage } = opts;
29
29
  const transformer = unstableInternals.getTransformer(parent.transformer);
30
30
  WithTRPC.getInitialProps = async (appOrPageCtx)=>{
31
31
  const shouldSsr = async ()=>{
@@ -37,7 +37,7 @@ const ssrPrepass = (opts)=>{
37
37
  return await parent.ssr({
38
38
  ctx: appOrPageCtx.ctx
39
39
  });
40
- } catch (e) {
40
+ } catch {
41
41
  return false;
42
42
  }
43
43
  }
@@ -23,7 +23,7 @@ function transformQueryOrMutationCacheErrors(result) {
23
23
  return result;
24
24
  }
25
25
  const ssrPrepass = (opts)=>{
26
- const { parent , WithTRPC , AppOrPage } = opts;
26
+ const { parent, WithTRPC, AppOrPage } = opts;
27
27
  const transformer = getTransformer(parent.transformer);
28
28
  WithTRPC.getInitialProps = async (appOrPageCtx)=>{
29
29
  const shouldSsr = async ()=>{
@@ -35,7 +35,7 @@ const ssrPrepass = (opts)=>{
35
35
  return await parent.ssr({
36
36
  ctx: appOrPageCtx.ctx
37
37
  });
38
- } catch (e) {
38
+ } catch {
39
39
  return false;
40
40
  }
41
41
  }
@@ -25,7 +25,7 @@ export type TRPCPrepassHelper = (opts: {
25
25
  export type WithTRPCSSROptions<TRouter extends AnyRouter> = WithTRPCOptions<TRouter> & {
26
26
  /**
27
27
  * If you enable this, you also need to add a `ssrPrepass`-prop
28
- * @link https://trpc.io/docs/client/nextjs/ssr
28
+ * @see https://trpc.io/docs/client/nextjs/ssr
29
29
  */
30
30
  ssr: true | ((opts: {
31
31
  ctx: NextPageContext;
@@ -36,7 +36,7 @@ export type WithTRPCSSROptions<TRouter extends AnyRouter> = WithTRPCOptions<TRou
36
36
  }) => ResponseMeta;
37
37
  /**
38
38
  * use `import { ssrPrepass } from '@trpc/next/ssrPrepass'`
39
- * @link https://trpc.io/docs/client/nextjs/ssr
39
+ * @see https://trpc.io/docs/client/nextjs/ssr
40
40
  */
41
41
  ssrPrepass: TRPCPrepassHelper;
42
42
  };
package/dist/withTRPC.js CHANGED
@@ -6,7 +6,7 @@ var shared = require('@trpc/react-query/shared');
6
6
  var React = require('react');
7
7
 
8
8
  function withTRPC(opts) {
9
- const { config: getClientConfig } = opts;
9
+ const { config: getClientConfig } = opts;
10
10
  const transformer = unstableInternals.getTransformer(opts.transformer);
11
11
  return (AppOrPage)=>{
12
12
  const trpc = shared.createRootHooks(opts);
@@ -26,7 +26,7 @@ function withTRPC(opts) {
26
26
  ssrContext: null
27
27
  };
28
28
  });
29
- const { queryClient , trpcClient , ssrState , ssrContext } = prepassProps;
29
+ const { queryClient, trpcClient, ssrState, ssrContext } = prepassProps;
30
30
  // allow normal components to be wrapped, not just app/pages
31
31
  const trpcState = props.pageProps?.trpcState;
32
32
  const hydratedState = React.useMemo(()=>{
@@ -49,7 +49,7 @@ function withTRPC(opts) {
49
49
  client: queryClient
50
50
  }, /*#__PURE__*/ React.createElement(reactQuery.HydrationBoundary, {
51
51
  state: hydratedState
52
- }, /*#__PURE__*/ React.createElement(AppOrPage, Object.assign({}, props)))));
52
+ }, /*#__PURE__*/ React.createElement(AppOrPage, props))));
53
53
  };
54
54
  if (opts.ssr) {
55
55
  opts.ssrPrepass({
package/dist/withTRPC.mjs CHANGED
@@ -4,7 +4,7 @@ import { createRootHooks, getQueryClient } from '@trpc/react-query/shared';
4
4
  import React, { useState } from 'react';
5
5
 
6
6
  function withTRPC(opts) {
7
- const { config: getClientConfig } = opts;
7
+ const { config: getClientConfig } = opts;
8
8
  const transformer = getTransformer(opts.transformer);
9
9
  return (AppOrPage)=>{
10
10
  const trpc = createRootHooks(opts);
@@ -24,7 +24,7 @@ function withTRPC(opts) {
24
24
  ssrContext: null
25
25
  };
26
26
  });
27
- const { queryClient , trpcClient , ssrState , ssrContext } = prepassProps;
27
+ const { queryClient, trpcClient, ssrState, ssrContext } = prepassProps;
28
28
  // allow normal components to be wrapped, not just app/pages
29
29
  const trpcState = props.pageProps?.trpcState;
30
30
  const hydratedState = React.useMemo(()=>{
@@ -47,7 +47,7 @@ function withTRPC(opts) {
47
47
  client: queryClient
48
48
  }, /*#__PURE__*/ React.createElement(HydrationBoundary, {
49
49
  state: hydratedState
50
- }, /*#__PURE__*/ React.createElement(AppOrPage, Object.assign({}, props)))));
50
+ }, /*#__PURE__*/ React.createElement(AppOrPage, props))));
51
51
  };
52
52
  if (opts.ssr) {
53
53
  opts.ssrPrepass({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/next",
3
- "version": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
3
+ "version": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
4
4
  "description": "The tRPC Next.js library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "dev": "pnpm build --watch",
28
28
  "codegen-entrypoints": "tsx entrypoints.script.ts",
29
29
  "ts-watch": "tsc --project tsconfig.watch.json --watch",
30
- "lint": "eslint --cache --ext \".js,.ts,.tsx\" --ignore-path ../../.gitignore src"
30
+ "lint": "eslint --cache src"
31
31
  },
32
32
  "exports": {
33
33
  "./package.json": "./package.json",
@@ -69,16 +69,18 @@
69
69
  "package.json",
70
70
  "app-dir",
71
71
  "ssrPrepass",
72
- "!**/*.test.*"
72
+ "!**/*.test.*",
73
+ "!**/__tests__"
73
74
  ],
74
75
  "peerDependencies": {
75
- "@tanstack/react-query": "^5.49.2",
76
- "@trpc/client": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
77
- "@trpc/react-query": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
78
- "@trpc/server": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
76
+ "@tanstack/react-query": "^5.59.15",
77
+ "@trpc/client": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
78
+ "@trpc/react-query": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
79
+ "@trpc/server": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
79
80
  "next": "*",
80
81
  "react": ">=16.8.0",
81
- "react-dom": ">=16.8.0"
82
+ "react-dom": ">=16.8.0",
83
+ "typescript": ">=5.6.2"
82
84
  },
83
85
  "peerDependenciesMeta": {
84
86
  "@tanstack/react-query": {
@@ -89,21 +91,22 @@
89
91
  }
90
92
  },
91
93
  "devDependencies": {
92
- "@tanstack/react-query": "^5.51.11",
93
- "@trpc/client": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
94
- "@trpc/react-query": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
95
- "@trpc/server": "11.0.0-alpha-tmp-subscription-connection-state.489+04c141d1b",
94
+ "@tanstack/react-query": "^5.59.15",
95
+ "@trpc/client": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
96
+ "@trpc/react-query": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
97
+ "@trpc/server": "11.0.0-alpha-tmp-12-06-react.665+f3677f632",
96
98
  "@types/express": "^4.17.17",
97
- "@types/node": "^20.10.0",
98
- "@types/react": "^18.3.1",
99
- "@types/react-dom": "^18.3.0",
100
- "eslint": "^8.57.0",
99
+ "@types/node": "^22.9.0",
100
+ "@types/react": "^19.0.0",
101
+ "@types/react-dom": "^19.0.0",
102
+ "eslint": "^9.13.0",
101
103
  "express": "^4.17.1",
102
- "next": "^14.2.5",
103
- "react": "^18.3.1",
104
- "react-dom": "^18.3.1",
105
- "rollup": "^4.9.5",
104
+ "next": "^15.0.4",
105
+ "react": "^19.0.0",
106
+ "react-dom": "^19.0.0",
107
+ "rollup": "^4.24.4",
106
108
  "tsx": "^4.0.0",
109
+ "typescript": "^5.7.0",
107
110
  "zod": "^3.0.0"
108
111
  },
109
112
  "publishConfig": {
@@ -112,5 +115,5 @@
112
115
  "funding": [
113
116
  "https://trpc.io/sponsor"
114
117
  ],
115
- "gitHead": "04c141d1b4bb50631826aa956a874ba1d363f492"
118
+ "gitHead": "f3677f6326d62400c29d1c358db9f3a68a0dd27d"
116
119
  }
@@ -81,16 +81,16 @@ export function experimental_serverActionLink<
81
81
  TypeError<'Generic parameter missing in `experimental_createActionHook<HERE>()` or experimental_serverActionLink<HERE>()'>,
82
82
  ]
83
83
  : inferClientTypes<TInferrable>['transformer'] extends true
84
- ? [
85
- opts: TransformerOptions<{
86
- transformer: true;
87
- }>,
88
- ]
89
- : [
90
- opts?: TransformerOptions<{
91
- transformer: false;
92
- }>,
93
- ]
84
+ ? [
85
+ opts: TransformerOptions<{
86
+ transformer: true;
87
+ }>,
88
+ ]
89
+ : [
90
+ opts?: TransformerOptions<{
91
+ transformer: false;
92
+ }>,
93
+ ]
94
94
  ): TRPCLink<TInferrable> {
95
95
  const [opts] = args as [CoercedTransformerParameters];
96
96
  const transformer = getTransformer(opts?.transformer);
@@ -55,6 +55,7 @@ export function experimental_nextCacheLink<TRouter extends AnyRouter>(
55
55
  getRawInput: async () => input,
56
56
  ctx: ctx,
57
57
  type,
58
+ signal: undefined,
58
59
  });
59
60
 
60
61
  // We need to serialize cause the cache only accepts JSON
@@ -36,6 +36,8 @@ import type {
36
36
  import { generateCacheTag, isFormData } from './shared';
37
37
  import type { NextAppDirDecorateRouterRecord } from './types';
38
38
 
39
+ export type { ActionHandlerDef };
40
+
39
41
  // ts-prune-ignore-next
40
42
  export function experimental_createTRPCNextAppDirServer<
41
43
  TRouter extends AnyRouter,
@@ -76,7 +78,8 @@ export function experimental_createTRPCNextAppDirServer<
76
78
  const throwNextErrors = (error: TRPCError) => {
77
79
  const { cause } = error;
78
80
  if (isRedirectError(cause) || isNotFoundError(cause)) {
79
- throw error.cause;
81
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
+ throw error.cause!;
80
83
  }
81
84
  };
82
85
  /**
@@ -158,6 +161,8 @@ export function experimental_createServerActionHandler<
158
161
  path: '',
159
162
  getRawInput: async () => rawInput,
160
163
  type: proc._def.type,
164
+ // is it possible to get the AbortSignal from the request?
165
+ signal: undefined,
161
166
  });
162
167
 
163
168
  const transformedJSON = transformTRPCResponse(config, {
@@ -177,7 +182,9 @@ export function experimental_createServerActionHandler<
177
182
  type: proc._def.type,
178
183
  });
179
184
 
180
- rethrowNextErrors && throwNextErrors(error);
185
+ if (rethrowNextErrors) {
186
+ throwNextErrors(error);
187
+ }
181
188
 
182
189
  const shape = getErrorShape({
183
190
  config,
@@ -28,13 +28,13 @@ export type UseProcedureRecord<
28
28
  ? $Value extends RouterRecord
29
29
  ? UseProcedureRecord<TRoot, $Value>
30
30
  : $Value extends AnyQueryProcedure
31
- ? Resolver<{
32
- input: inferProcedureInput<$Value>;
33
- output: inferTransformedProcedureOutput<TRoot, $Value>;
34
- errorShape: TRoot['errorShape'];
35
- transformer: TRoot['transformer'];
36
- }>
37
- : never
31
+ ? Resolver<{
32
+ input: inferProcedureInput<$Value>;
33
+ output: inferTransformedProcedureOutput<TRoot, $Value>;
34
+ errorShape: TRoot['errorShape'];
35
+ transformer: TRoot['transformer'];
36
+ }>
37
+ : never
38
38
  : never;
39
39
  };
40
40
 
@@ -28,14 +28,14 @@ export type DecorateProcedureServer<
28
28
  >;
29
29
  }
30
30
  : TType extends 'mutation'
31
- ? {
32
- mutate: Resolver<TDef>;
33
- }
34
- : TType extends 'subscription'
35
- ? {
36
- subscribe: Resolver<TDef>;
37
- }
38
- : never;
31
+ ? {
32
+ mutate: Resolver<TDef>;
33
+ }
34
+ : TType extends 'subscription'
35
+ ? {
36
+ subscribe: Resolver<TDef>;
37
+ }
38
+ : never;
39
39
 
40
40
  export type NextAppDirDecorateRouterRecord<
41
41
  TRoot extends AnyRootTypes,
@@ -45,15 +45,15 @@ export type NextAppDirDecorateRouterRecord<
45
45
  ? $Value extends RouterRecord
46
46
  ? NextAppDirDecorateRouterRecord<TRoot, $Value>
47
47
  : $Value extends AnyProcedure
48
- ? DecorateProcedureServer<
49
- $Value['_def']['type'],
50
- {
51
- input: inferProcedureInput<$Value>;
52
- output: inferTransformedProcedureOutput<TRoot, $Value>;
53
- errorShape: TRoot['errorShape'];
54
- transformer: TRoot['transformer'];
55
- }
56
- >
57
- : never
48
+ ? DecorateProcedureServer<
49
+ $Value['_def']['type'],
50
+ {
51
+ input: inferProcedureInput<$Value>;
52
+ output: inferTransformedProcedureOutput<TRoot, $Value>;
53
+ errorShape: TRoot['errorShape'];
54
+ transformer: TRoot['transformer'];
55
+ }
56
+ >
57
+ : never
58
58
  : never;
59
59
  };
@@ -31,11 +31,11 @@ export interface CreateTRPCNextBase<
31
31
  /**
32
32
  * @deprecated renamed to `useUtils` and will be removed in a future tRPC version
33
33
  *
34
- * @link https://trpc.io/docs/v11/client/react/useUtils
34
+ * @see https://trpc.io/docs/v11/client/react/useUtils
35
35
  */
36
36
  useContext(): CreateReactUtils<TRouter, TSSRContext>;
37
37
  /**
38
- * @link https://trpc.io/docs/v11/client/react/useUtils
38
+ * @see https://trpc.io/docs/v11/client/react/useUtils
39
39
  */
40
40
  useUtils(): CreateReactUtils<TRouter, TSSRContext>;
41
41
  withTRPC: ReturnType<typeof withTRPC<TRouter, TSSRContext>>;
package/src/ssrPrepass.ts CHANGED
@@ -59,7 +59,7 @@ export const ssrPrepass: TRPCPrepassHelper = (opts) => {
59
59
  if (typeof parent.ssr === 'function') {
60
60
  try {
61
61
  return await parent.ssr({ ctx: appOrPageCtx.ctx });
62
- } catch (e) {
62
+ } catch {
63
63
  return false;
64
64
  }
65
65
  }
@@ -81,7 +81,7 @@ export const ssrPrepass: TRPCPrepassHelper = (opts) => {
81
81
  appOrPageCtx as any,
82
82
  );
83
83
  const originalPageProps = isApp
84
- ? originalProps.pageProps ?? {}
84
+ ? (originalProps.pageProps ?? {})
85
85
  : originalProps;
86
86
 
87
87
  pageProps = {
package/src/withTRPC.tsx CHANGED
@@ -51,7 +51,7 @@ export type WithTRPCSSROptions<TRouter extends AnyRouter> =
51
51
  WithTRPCOptions<TRouter> & {
52
52
  /**
53
53
  * If you enable this, you also need to add a `ssrPrepass`-prop
54
- * @link https://trpc.io/docs/client/nextjs/ssr
54
+ * @see https://trpc.io/docs/client/nextjs/ssr
55
55
  */
56
56
  ssr:
57
57
  | true
@@ -62,7 +62,7 @@ export type WithTRPCSSROptions<TRouter extends AnyRouter> =
62
62
  }) => ResponseMeta;
63
63
  /**
64
64
  * use `import { ssrPrepass } from '@trpc/next/ssrPrepass'`
65
- * @link https://trpc.io/docs/client/nextjs/ssr
65
+ * @see https://trpc.io/docs/client/nextjs/ssr
66
66
  */
67
67
  ssrPrepass: TRPCPrepassHelper;
68
68
  };
@@ -170,7 +170,7 @@ export function withTRPC<
170
170
  appOrPageCtx as any,
171
171
  );
172
172
  const originalPageProps = isApp
173
- ? originalProps.pageProps ?? {}
173
+ ? (originalProps.pageProps ?? {})
174
174
  : originalProps;
175
175
 
176
176
  pageProps = {