@trpc/next 11.0.0-alpha-tmp-export-from-main.209 → 11.0.0-alpha-tmp-export-from-main-nuke-core.214
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.ts +1 -1
- package/dist/app-dir/client.d.ts.map +1 -1
- package/dist/app-dir/client.js +5 -5
- package/dist/app-dir/client.mjs +2 -2
- package/dist/app-dir/create-action-hook.d.ts +1 -1
- package/dist/app-dir/create-action-hook.d.ts.map +1 -1
- package/dist/app-dir/links/nextCache.d.ts +1 -1
- package/dist/app-dir/links/nextCache.d.ts.map +1 -1
- package/dist/app-dir/links/nextCache.js +4 -4
- package/dist/app-dir/links/nextCache.mjs +2 -2
- package/dist/app-dir/links/nextHttp.d.ts +1 -1
- package/dist/app-dir/links/nextHttp.d.ts.map +1 -1
- package/dist/app-dir/links/nextHttp.js +2 -2
- package/dist/app-dir/links/nextHttp.mjs +2 -2
- package/dist/app-dir/server.d.ts +2 -2
- package/dist/app-dir/server.d.ts.map +1 -1
- package/dist/app-dir/server.js +8 -8
- package/dist/app-dir/server.mjs +2 -2
- package/dist/app-dir/shared.d.ts +1 -1
- package/dist/app-dir/shared.d.ts.map +1 -1
- package/dist/app-dir/types.d.ts +1 -1
- package/dist/app-dir/types.d.ts.map +1 -1
- package/dist/bundle-analysis.json +32 -32
- package/dist/createTRPCNext.d.ts +1 -1
- package/dist/createTRPCNext.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{shared-2f1ecbeb.mjs → shared-2b326642.mjs} +1 -1
- package/dist/{shared-a452b80f.js → shared-2e3e7b22.js} +1 -1
- package/dist/{shared-62d181e7.js → shared-ca30d993.js} +1 -1
- package/dist/withTRPC.d.ts +1 -1
- package/dist/withTRPC.d.ts.map +1 -1
- package/package.json +8 -9
- package/src/app-dir/client.ts +2 -2
- package/src/app-dir/create-action-hook.tsx +5 -2
- package/src/app-dir/links/nextCache.ts +8 -2
- package/src/app-dir/links/nextHttp.ts +1 -1
- package/src/app-dir/server.ts +2 -2
- package/src/app-dir/shared.ts +2 -2
- package/src/app-dir/types.ts +1 -1
- package/src/createTRPCNext.tsx +5 -2
- package/src/withTRPC.tsx +6 -1
package/dist/app-dir/client.d.ts
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/app-dir/client.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
|
-
var
|
|
6
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var shared = require('../shared-
|
|
8
|
+
var shared = require('../shared-2e3e7b22.js');
|
|
9
9
|
|
|
10
10
|
// ts-prune-ignore-next
|
|
11
11
|
function experimental_serverActionLink() {
|
|
12
|
-
return (runtime)=>({ op })=>
|
|
12
|
+
return (runtime)=>({ op })=>unstableCoreDoNotImport.observable((observer)=>{
|
|
13
13
|
const context = op.context;
|
|
14
14
|
context._action(shared.isFormData(op.input) ? op.input : runtime.transformer.serialize(op.input)).then((data)=>{
|
|
15
|
-
const transformed =
|
|
15
|
+
const transformed = unstableCoreDoNotImport.transformResult(data, runtime.transformer);
|
|
16
16
|
if (!transformed.ok) {
|
|
17
17
|
observer.error(client.TRPCClientError.from(transformed.error, {}));
|
|
18
18
|
return;
|
|
@@ -107,7 +107,7 @@ function experimental_createTRPCNextAppDirClient(opts) {
|
|
|
107
107
|
const client$1 = client.createTRPCUntypedClient(opts.config());
|
|
108
108
|
// const useProxy = createUseProxy<TRouter>(client);
|
|
109
109
|
const cache = new Map();
|
|
110
|
-
return
|
|
110
|
+
return unstableCoreDoNotImport.createRecursiveProxy(({ path , args })=>{
|
|
111
111
|
// const pathCopy = [key, ...path];
|
|
112
112
|
const pathCopy = [
|
|
113
113
|
...path
|
package/dist/app-dir/client.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TRPCClientError, createTRPCUntypedClient, clientCallTypeToProcedureType } from '@trpc/client';
|
|
2
|
-
import { observable, transformResult, createRecursiveProxy } from '@trpc/core';
|
|
2
|
+
import { observable, transformResult, createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import { useRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
4
|
-
import { i as isFormData } from '../shared-
|
|
4
|
+
import { i as isFormData } from '../shared-2b326642.mjs';
|
|
5
5
|
|
|
6
6
|
// ts-prune-ignore-next
|
|
7
7
|
function experimental_serverActionLink() {
|
|
@@ -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;
|
|
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;AAKxE,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACT,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM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AAQ,uBAAuB,CAAC,IAAI,CAAC;IACrC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;CACnB;AAGD,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,gBAAgB,IACzD,wBAAwB,CAAC,IAAI,CAAC,GAC9B,uBAAuB,CAAC,IAAI,CAAC,GAC7B,0BAA0B,CAAC,IAAI,CAAC,GAChC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AAOrC,wBAAgB,6BAA6B,CAC3C,OAAO,SAAS,SAAS,GAAG,SAAS,KAClC,QAAQ,CAAC,OAAO,CAAC,CA6BrB;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;AAGD,wBAAgB,6BAA6B,CAAC,OAAO,SAAS,SAAS,EACrE,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,oKA6FvC"}
|
|
@@ -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,
|
|
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,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,0CAA0C,CAAC;AAQlD,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"}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
|
-
var
|
|
6
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
7
7
|
var cache = require('next/cache');
|
|
8
|
-
var shared = require('../../shared-
|
|
8
|
+
var shared = require('../../shared-2e3e7b22.js');
|
|
9
9
|
|
|
10
10
|
// import "server-only";
|
|
11
11
|
// ts-prune-ignore-next
|
|
12
12
|
function experimental_nextCacheLink(opts) {
|
|
13
|
-
return (runtime)=>({ op })=>
|
|
13
|
+
return (runtime)=>({ op })=>unstableCoreDoNotImport.observable((observer)=>{
|
|
14
14
|
const { path , input , type , context } = op;
|
|
15
15
|
const cacheTag = shared.generateCacheTag(path, input);
|
|
16
16
|
// Let per-request revalidate override global revalidate
|
|
@@ -21,7 +21,7 @@ function experimental_nextCacheLink(opts) {
|
|
|
21
21
|
// // _cachebuster is not used by us but to make sure
|
|
22
22
|
// // that calls with different tags are properly separated
|
|
23
23
|
// // @link https://github.com/trpc/trpc/issues/4622
|
|
24
|
-
const procedureResult = await
|
|
24
|
+
const procedureResult = await unstableCoreDoNotImport.callProcedure({
|
|
25
25
|
procedures: opts.router._def.procedures,
|
|
26
26
|
path,
|
|
27
27
|
getRawInput: async ()=>input,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TRPCClientError } from '@trpc/client';
|
|
2
|
-
import { observable, callProcedure } from '@trpc/core';
|
|
2
|
+
import { observable, callProcedure } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
import { unstable_cache } from 'next/cache';
|
|
4
|
-
import { g as generateCacheTag } from '../../shared-
|
|
4
|
+
import { g as generateCacheTag } from '../../shared-2b326642.mjs';
|
|
5
5
|
|
|
6
6
|
// import "server-only";
|
|
7
7
|
// ts-prune-ignore-next
|
|
@@ -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,
|
|
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"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
|
-
var shared = require('../../shared-
|
|
7
|
-
require('@trpc/core');
|
|
6
|
+
var shared = require('../../shared-2e3e7b22.js');
|
|
7
|
+
require('@trpc/server/unstable-core-do-not-import');
|
|
8
8
|
|
|
9
9
|
// ts-prune-ignore-next
|
|
10
10
|
function experimental_nextHttpLink(opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { httpBatchLink, httpLink } from '@trpc/client';
|
|
2
|
-
import { g as generateCacheTag } from '../../shared-
|
|
3
|
-
import '@trpc/core';
|
|
2
|
+
import { g as generateCacheTag } from '../../shared-2b326642.mjs';
|
|
3
|
+
import '@trpc/server/unstable-core-do-not-import';
|
|
4
4
|
|
|
5
5
|
// ts-prune-ignore-next
|
|
6
6
|
function experimental_nextHttpLink(opts) {
|
package/dist/app-dir/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyProcedure, AnyRootConfig, AnyRouter, MaybePromise, Simplify, TRPCResponse } from '@trpc/core';
|
|
1
|
+
import type { AnyProcedure, AnyRootConfig, AnyRouter, MaybePromise, Simplify, TRPCResponse } from '@trpc/server/unstable-core-do-not-import';
|
|
2
2
|
import type { ActionHandlerDef, CreateTRPCNextAppRouterOptions, inferActionDef } from './shared';
|
|
3
3
|
import type { NextAppDirDecoratedProcedureRecord } from './types';
|
|
4
4
|
export declare function experimental_createTRPCNextAppDirServer<TRouter extends AnyRouter>(opts: CreateTRPCNextAppRouterOptions<TRouter>): NextAppDirDecoratedProcedureRecord<TRouter["_def"]["_config"], TRouter["_def"]["record"]>;
|
|
@@ -16,7 +16,7 @@ export declare function experimental_createServerActionHandler<TInstance extends
|
|
|
16
16
|
*/
|
|
17
17
|
normalizeFormData?: boolean;
|
|
18
18
|
}): <TProc extends AnyProcedure>(proc: TProc) => TRPCActionHandler<{
|
|
19
|
-
input: import("@trpc/core").ProcedureArgs<import("@trpc/core").inferProcedureParams<TProc>>[0];
|
|
19
|
+
input: import("@trpc/server/unstable-core-do-not-import").ProcedureArgs<import("@trpc/server/unstable-core-do-not-import").inferProcedureParams<TProc>>[0];
|
|
20
20
|
output: TProc["_def"]["_output_out"];
|
|
21
21
|
errorShape: TInstance["_config"]["$types"]["errorShape"];
|
|
22
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,EACR,YAAY,EACb,MAAM,
|
|
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,EACR,YAAY,EACb,MAAM,0CAA0C,CAAC;AAWlD,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,CAAC,6FA2B9C;AAED;;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,aAAa,CAAC;CACxB,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;;;;GAgEF;AAGD,wBAAsB,+BAA+B,CAAC,GAAG,EAAE,OAAO,qBAiBjE"}
|
package/dist/app-dir/server.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
|
-
var
|
|
6
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
7
7
|
var cache = require('next/cache');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var shared = require('../shared-
|
|
9
|
+
var shared = require('../shared-2e3e7b22.js');
|
|
10
10
|
|
|
11
11
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */ function set(obj, path, value) {
|
|
12
12
|
if (typeof path === 'string') {
|
|
@@ -46,7 +46,7 @@ function experimental_createTRPCNextAppDirServer(opts) {
|
|
|
46
46
|
const config = opts.config();
|
|
47
47
|
return client.createTRPCUntypedClient(config);
|
|
48
48
|
});
|
|
49
|
-
return
|
|
49
|
+
return unstableCoreDoNotImport.createRecursiveProxy((callOpts)=>{
|
|
50
50
|
// lazily initialize client
|
|
51
51
|
const client$1 = getClient();
|
|
52
52
|
const pathCopy = [
|
|
@@ -79,7 +79,7 @@ function experimental_createServerActionHandler(t, opts) {
|
|
|
79
79
|
try {
|
|
80
80
|
rawInput = formDataToObject(rawInput);
|
|
81
81
|
} catch {
|
|
82
|
-
throw new
|
|
82
|
+
throw new unstableCoreDoNotImport.TRPCError({
|
|
83
83
|
code: 'INTERNAL_SERVER_ERROR',
|
|
84
84
|
message: 'Failed to convert FormData to an object'
|
|
85
85
|
});
|
|
@@ -94,15 +94,15 @@ function experimental_createServerActionHandler(t, opts) {
|
|
|
94
94
|
getRawInput: async ()=>rawInput,
|
|
95
95
|
type: proc._def.type
|
|
96
96
|
});
|
|
97
|
-
const transformedJSON =
|
|
97
|
+
const transformedJSON = unstableCoreDoNotImport.transformTRPCResponse(config, {
|
|
98
98
|
result: {
|
|
99
99
|
data
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
return transformedJSON;
|
|
103
103
|
} catch (cause) {
|
|
104
|
-
const error =
|
|
105
|
-
const shape =
|
|
104
|
+
const error = unstableCoreDoNotImport.getTRPCErrorFromUnknown(cause);
|
|
105
|
+
const shape = unstableCoreDoNotImport.getErrorShape({
|
|
106
106
|
config,
|
|
107
107
|
ctx,
|
|
108
108
|
error,
|
|
@@ -111,7 +111,7 @@ function experimental_createServerActionHandler(t, opts) {
|
|
|
111
111
|
type: proc._def.type
|
|
112
112
|
});
|
|
113
113
|
// TODO: send the right HTTP header?!
|
|
114
|
-
return
|
|
114
|
+
return unstableCoreDoNotImport.transformTRPCResponse(t._config, {
|
|
115
115
|
error: shape
|
|
116
116
|
});
|
|
117
117
|
}
|
package/dist/app-dir/server.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
import { g as generateCacheTag, i as isFormData } from '../shared-
|
|
5
|
+
import { g as generateCacheTag, i as isFormData } from '../shared-2b326642.mjs';
|
|
6
6
|
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */ function set(obj, path, value) {
|
|
8
8
|
if (typeof path === 'string') {
|
package/dist/app-dir/shared.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, AnyRootConfig, AnyRouter, Filter, inferHandlerInput, ProtectedIntersection } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
@@ -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,
|
|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Procedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, AnySubscriptionProcedure, ProcedureArgs, ProcedureRouterRecord } from '@trpc/core';
|
|
2
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, AnySubscriptionProcedure, ProcedureArgs, ProcedureRouterRecord } from '@trpc/server/unstable-core-do-not-import';
|
|
3
3
|
export type DecorateProcedureServer<TConfig extends AnyRootConfig, TProcedure extends AnyProcedure> = TProcedure extends AnyQueryProcedure ? {
|
|
4
4
|
query: Resolver<TConfig, TProcedure>;
|
|
5
5
|
revalidate: (input?: ProcedureArgs<TProcedure['_def']>[0]) => Promise<{
|
|
@@ -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,
|
|
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,0CAA0C,CAAC;AAElD,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,IAC7B,UAAU,SAAS,iBAAiB,GACpC;IACE,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACrC,UAAU,EAAE,CACV,KAAK,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KACzC,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,OAAO,EAAE,UAAU,CAAC,CAAC;CACvC,GACD,UAAU,SAAS,wBAAwB,GAC3C;IACE,SAAS,EAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;CAC1C,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,kCAAkC,CAC5C,OAAO,SAAS,aAAa,EAC7B,WAAW,SAAS,qBAAqB,IACvC;KACD,IAAI,IAAI,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5D,kCAAkC,CAChC,OAAO,EACP,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CACpC,GACD,WAAW,CAAC,IAAI,CAAC,SAAS,YAAY,GACtC,uBAAuB,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,GACnD,KAAK;CACV,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 31.
|
|
2
|
+
"bundleSize": 22370,
|
|
3
|
+
"bundleOrigSize": 32579,
|
|
4
|
+
"bundleReduction": 31.34,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/withTRPC.tsx",
|
|
8
8
|
"size": 8009,
|
|
9
|
-
"origSize":
|
|
9
|
+
"origSize": 9372,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"withTRPC"
|
|
12
12
|
],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"/src/createTRPCNext.tsx",
|
|
16
16
|
"/src/index.ts"
|
|
17
17
|
],
|
|
18
|
-
"percent":
|
|
19
|
-
"reduction": 14.
|
|
18
|
+
"percent": 35.8,
|
|
19
|
+
"reduction": 14.54
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"id": "/src/app-dir/server.ts",
|
|
23
|
-
"size":
|
|
24
|
-
"origSize":
|
|
23
|
+
"size": 3805,
|
|
24
|
+
"origSize": 4896,
|
|
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":
|
|
33
|
-
"reduction":
|
|
32
|
+
"percent": 17.01,
|
|
33
|
+
"reduction": 22.28
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"id": "/src/app-dir/create-action-hook.tsx",
|
|
37
|
-
"size":
|
|
38
|
-
"origSize":
|
|
37
|
+
"size": 3350,
|
|
38
|
+
"origSize": 5748,
|
|
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": 14.
|
|
47
|
+
"percent": 14.98,
|
|
48
48
|
"reduction": 41.72
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"id": "/src/app-dir/links/nextCache.ts",
|
|
52
|
-
"size":
|
|
53
|
-
"origSize":
|
|
52
|
+
"size": 2518,
|
|
53
|
+
"origSize": 2797,
|
|
54
54
|
"renderedExports": [
|
|
55
55
|
"experimental_nextCacheLink"
|
|
56
56
|
],
|
|
57
57
|
"removedExports": [],
|
|
58
58
|
"dependents": [],
|
|
59
|
-
"percent": 11.
|
|
60
|
-
"reduction": 9.
|
|
59
|
+
"percent": 11.26,
|
|
60
|
+
"reduction": 9.97
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"id": "/src/app-dir/client.ts",
|
|
64
|
-
"size":
|
|
65
|
-
"origSize":
|
|
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
|
-
"reduction":
|
|
71
|
+
"percent": 5.72,
|
|
72
|
+
"reduction": 32.47
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"id": "/src/app-dir/links/nextHttp.ts",
|
|
76
76
|
"size": 1192,
|
|
77
|
-
"origSize":
|
|
77
|
+
"origSize": 1780,
|
|
78
78
|
"renderedExports": [
|
|
79
79
|
"experimental_nextHttpLink"
|
|
80
80
|
],
|
|
81
81
|
"removedExports": [],
|
|
82
82
|
"dependents": [],
|
|
83
|
-
"percent": 5.
|
|
84
|
-
"reduction":
|
|
83
|
+
"percent": 5.33,
|
|
84
|
+
"reduction": 33.03
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"id": "/src/createTRPCNext.tsx",
|
|
88
|
-
"size":
|
|
89
|
-
"origSize":
|
|
88
|
+
"size": 1064,
|
|
89
|
+
"origSize": 2696,
|
|
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.
|
|
98
|
-
"reduction": 60.
|
|
97
|
+
"percent": 4.76,
|
|
98
|
+
"reduction": 60.53
|
|
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.
|
|
111
|
+
"percent": 3.66,
|
|
112
112
|
"reduction": 0.97
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"id": "/src/app-dir/shared.ts",
|
|
116
116
|
"size": 335,
|
|
117
|
-
"origSize":
|
|
117
|
+
"origSize": 2508,
|
|
118
118
|
"renderedExports": [
|
|
119
119
|
"generateCacheTag",
|
|
120
120
|
"isFormData"
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"/src/app-dir/links/nextCache.ts",
|
|
129
129
|
"/src/app-dir/links/nextHttp.ts"
|
|
130
130
|
],
|
|
131
|
-
"percent": 1.
|
|
132
|
-
"reduction": 86.
|
|
131
|
+
"percent": 1.5,
|
|
132
|
+
"reduction": 86.64
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"id": "/src/index.ts",
|
package/dist/createTRPCNext.d.ts
CHANGED
|
@@ -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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,sBAAs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AAM,CAAC,CA+B9C"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
6
6
|
var client = require('@trpc/client');
|
|
7
7
|
var shared = require('@trpc/react-query/shared');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var
|
|
9
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
|
@@ -205,7 +205,7 @@ function createTRPCNext(opts) {
|
|
|
205
205
|
const hooks = shared.createRootHooks(opts);
|
|
206
206
|
// TODO: maybe set TSSRContext to `never` when using `WithTRPCNoSSROptions`
|
|
207
207
|
const _withTRPC = withTRPC(opts);
|
|
208
|
-
return
|
|
208
|
+
return unstableCoreDoNotImport.createFlatProxy((key)=>{
|
|
209
209
|
if (key === 'useContext' || key === 'useUtils') {
|
|
210
210
|
return ()=>{
|
|
211
211
|
const context = hooks.useUtils();
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { dehydrate, QueryClientProvider, HydrationBoundary } from '@tanstack/rea
|
|
|
2
2
|
import { createTRPCUntypedClient } from '@trpc/client';
|
|
3
3
|
import { createRootHooks, getQueryClient, createReactQueryUtils, createReactDecoration } from '@trpc/react-query/shared';
|
|
4
4
|
import React, { createElement, useState, useMemo } from 'react';
|
|
5
|
-
import { createFlatProxy } from '@trpc/core';
|
|
5
|
+
import { createFlatProxy } from '@trpc/server/unstable-core-do-not-import';
|
|
6
6
|
|
|
7
7
|
function transformQueryOrMutationCacheErrors(result) {
|
|
8
8
|
const error = result.state.error;
|
package/dist/withTRPC.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CreateTRPCClientOptions } from '@trpc/client';
|
|
2
|
-
import type { AnyRouter, ResponseMeta } from '@trpc/core';
|
|
3
2
|
import type { TRPCClientError } from '@trpc/react-query';
|
|
4
3
|
import type { CreateTRPCReactOptions, CreateTRPCReactQueryClientConfig } from '@trpc/react-query/shared';
|
|
4
|
+
import type { AnyRouter, ResponseMeta } from '@trpc/server/unstable-core-do-not-import';
|
|
5
5
|
import type { NextComponentType, NextPageContext } from 'next/dist/shared/lib/utils';
|
|
6
6
|
export type WithTRPCConfig<TRouter extends AnyRouter> = CreateTRPCClientOptions<TRouter> & CreateTRPCReactQueryClientConfig & {
|
|
7
7
|
abortOnUnmount?: boolean;
|
package/dist/withTRPC.d.ts.map
CHANGED
|
@@ -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,
|
|
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,eAAe,EAAuB,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EACV,sBAAsB,EACtB,gCAAgC,EACjC,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EACV,SAAS,EAGT,YAAY,EACb,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAGV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AA0BpC,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,SAAS,IAClD,uBAAuB,CAAC,OAAO,CAAC,GAC9B,gCAAgC,GAAG;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,UAAU,eAAe,CAAC,OAAO,SAAS,SAAS,CACjD,SAAQ,sBAAsB,CAAC,OAAO,CAAC;IACvC,MAAM,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,CAAC,EAAE,eAAe,CAAA;KAAE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,kBAAkB,CAAC,OAAO,SAAS,SAAS,CAC3D,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,GAAG,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,eAAe,CAAA;KAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QACpB,GAAG,EAAE,eAAe,CAAC;QACrB,YAAY,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;KAC1C,KAAK,YAAY,CAAC;CACpB;AACD,MAAM,WAAW,oBAAoB,CAAC,OAAO,SAAS,SAAS,CAC7D,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,GAAG,CAAC,EAAE,KAAK,CAAC;CACb;AAED,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-export-from-main.
|
|
3
|
+
"version": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
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-export-from-main.209+a181327ef"
|
|
70
|
-
},
|
|
71
68
|
"peerDependencies": {
|
|
72
69
|
"@tanstack/react-query": "^5.0.0",
|
|
73
|
-
"@trpc/client": "11.0.0-alpha-tmp-export-from-main.
|
|
74
|
-
"@trpc/react-query": "11.0.0-alpha-tmp-export-from-main.
|
|
70
|
+
"@trpc/client": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
71
|
+
"@trpc/react-query": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
72
|
+
"@trpc/server": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
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-export-from-main.
|
|
90
|
-
"@trpc/react-query": "11.0.0-alpha-tmp-export-from-main.
|
|
87
|
+
"@trpc/client": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
88
|
+
"@trpc/react-query": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
89
|
+
"@trpc/server": "11.0.0-alpha-tmp-export-from-main-nuke-core.214+b7f74af67",
|
|
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": "
|
|
109
|
+
"gitHead": "b7f74af67649157bc70388ee47cfc4a0f2d04927"
|
|
111
110
|
}
|
package/src/app-dir/client.ts
CHANGED
|
@@ -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,13 +4,16 @@ import type {
|
|
|
4
4
|
TRPCRequestOptions,
|
|
5
5
|
} from '@trpc/client';
|
|
6
6
|
import { createTRPCUntypedClient, TRPCClientError } from '@trpc/client';
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
observable,
|
|
9
|
+
transformResult,
|
|
10
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
8
11
|
import type {
|
|
9
12
|
AnyRouter,
|
|
10
13
|
MaybePromise,
|
|
11
14
|
ProcedureOptions,
|
|
12
15
|
Simplify,
|
|
13
|
-
} from '@trpc/core';
|
|
16
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
14
17
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
15
18
|
import type { TRPCActionHandler } from './server';
|
|
16
19
|
import type { ActionHandlerDef } from './shared';
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import type { TRPCLink } from '@trpc/client';
|
|
4
4
|
import { TRPCClientError } from '@trpc/client';
|
|
5
|
-
import type {
|
|
6
|
-
|
|
5
|
+
import type {
|
|
6
|
+
AnyRouter,
|
|
7
|
+
inferRouterContext,
|
|
8
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
9
|
+
import {
|
|
10
|
+
callProcedure,
|
|
11
|
+
observable,
|
|
12
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
7
13
|
import { unstable_cache } from 'next/cache';
|
|
8
14
|
import { generateCacheTag } from '../shared';
|
|
9
15
|
|
|
@@ -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 {
|
package/src/app-dir/server.ts
CHANGED
|
@@ -12,14 +12,14 @@ import type {
|
|
|
12
12
|
MaybePromise,
|
|
13
13
|
Simplify,
|
|
14
14
|
TRPCResponse,
|
|
15
|
-
} from '@trpc/core';
|
|
15
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
16
16
|
import {
|
|
17
17
|
createRecursiveProxy,
|
|
18
18
|
getErrorShape,
|
|
19
19
|
getTRPCErrorFromUnknown,
|
|
20
20
|
transformTRPCResponse,
|
|
21
21
|
TRPCError,
|
|
22
|
-
} from '@trpc/core';
|
|
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';
|
package/src/app-dir/shared.ts
CHANGED
|
@@ -11,8 +11,8 @@ import type {
|
|
|
11
11
|
Filter,
|
|
12
12
|
inferHandlerInput,
|
|
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
|
package/src/app-dir/types.ts
CHANGED
package/src/createTRPCNext.tsx
CHANGED
|
@@ -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';
|
package/src/withTRPC.tsx
CHANGED
|
@@ -10,13 +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, ResponseMeta } from '@trpc/core';
|
|
14
13
|
import type { TRPCClientError, TRPCClientErrorLike } from '@trpc/react-query';
|
|
15
14
|
import type {
|
|
16
15
|
CreateTRPCReactOptions,
|
|
17
16
|
CreateTRPCReactQueryClientConfig,
|
|
18
17
|
} from '@trpc/react-query/shared';
|
|
19
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';
|
|
20
25
|
import type {
|
|
21
26
|
AppContextType,
|
|
22
27
|
AppPropsType,
|