@trpc/server 11.19.0 → 11.21.1-canary.20.10e2ef98f
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/adapters/aws-lambda/index.d.ts +1 -0
- package/adapters/aws-lambda/index.js +1 -0
- package/adapters/express/index.d.ts +1 -0
- package/adapters/express/index.js +1 -0
- package/adapters/fastify/index.d.ts +1 -0
- package/adapters/fastify/index.js +1 -0
- package/adapters/fetch/index.d.ts +1 -0
- package/adapters/fetch/index.js +1 -0
- package/adapters/next/index.d.ts +1 -0
- package/adapters/next/index.js +1 -0
- package/adapters/next-app-dir/index.d.ts +1 -0
- package/adapters/next-app-dir/index.js +1 -0
- package/adapters/node-http/content-type/form-data/index.d.ts +1 -0
- package/adapters/node-http/content-type/form-data/index.js +1 -0
- package/adapters/node-http/content-type/json/index.d.ts +1 -0
- package/adapters/node-http/content-type/json/index.js +1 -0
- package/adapters/node-http/index.d.ts +1 -0
- package/adapters/node-http/index.js +1 -0
- package/adapters/standalone/index.d.ts +1 -0
- package/adapters/standalone/index.js +1 -0
- package/adapters/ws/index.d.ts +1 -0
- package/adapters/ws/index.js +1 -0
- package/dist/adapters/aws-lambda/index.cjs +2 -2
- package/dist/adapters/aws-lambda/index.d.cts +1 -1
- package/dist/adapters/aws-lambda/index.d.mts +1 -1
- package/dist/adapters/aws-lambda/index.mjs +2 -2
- package/dist/adapters/express.cjs +3 -3
- package/dist/adapters/express.d.cts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.mjs +3 -3
- package/dist/adapters/fastify/index.cjs +4 -4
- package/dist/adapters/fastify/index.d.cts +2 -2
- package/dist/adapters/fastify/index.d.mts +2 -2
- package/dist/adapters/fastify/index.mjs +4 -4
- package/dist/adapters/fetch/index.cjs +2 -2
- package/dist/adapters/fetch/index.d.cts +1 -1
- package/dist/adapters/fetch/index.d.mts +1 -1
- package/dist/adapters/fetch/index.mjs +2 -2
- package/dist/adapters/next-app-dir.cjs +7 -7
- package/dist/adapters/next-app-dir.d.cts +1 -1
- package/dist/adapters/next-app-dir.d.mts +1 -1
- package/dist/adapters/next-app-dir.mjs +2 -2
- package/dist/adapters/next.cjs +5 -5
- package/dist/adapters/next.d.cts +2 -2
- package/dist/adapters/next.d.mts +2 -2
- package/dist/adapters/next.mjs +4 -4
- package/dist/adapters/node-http/index.cjs +1 -1
- package/dist/adapters/node-http/index.d.cts +1 -1
- package/dist/adapters/node-http/index.d.mts +1 -1
- package/dist/adapters/node-http/index.mjs +1 -1
- package/dist/adapters/standalone.cjs +3 -3
- package/dist/adapters/standalone.d.cts +2 -2
- package/dist/adapters/standalone.d.mts +2 -2
- package/dist/adapters/standalone.mjs +3 -3
- package/dist/adapters/ws.cjs +1 -1
- package/dist/adapters/ws.d.cts +2 -2
- package/dist/adapters/ws.d.mts +2 -2
- package/dist/adapters/ws.mjs +1 -1
- package/dist/{tracked-BQJb0ANk.cjs → asyncGeneratorDelegate-D2tFgl_z.cjs} +167 -17
- package/dist/{tracked-D4jU_Hb3.mjs → asyncGeneratorDelegate-mPyp1u6d.mjs} +141 -9
- package/dist/asyncGeneratorDelegate-mPyp1u6d.mjs.map +1 -0
- package/dist/{codes-C6ZIq69A.cjs → codes-BwD4QurF.cjs} +9 -0
- package/dist/{codes-D5Ya6_Bi.mjs → codes-D6C_OiJy.mjs} +5 -2
- package/dist/codes-D6C_OiJy.mjs.map +1 -0
- package/dist/{getErrorShape-B0JBUs-i.mjs → getErrorShape-BziUKLM_.mjs} +52 -14
- package/dist/getErrorShape-BziUKLM_.mjs.map +1 -0
- package/dist/{getErrorShape-DeIapApr.cjs → getErrorShape-CVxLwJgN.cjs} +80 -12
- package/dist/http.cjs +2 -2
- package/dist/http.d.cts +1 -1
- package/dist/http.d.mts +1 -1
- package/dist/http.mjs +2 -2
- package/dist/{index-_jAhoJQ7.d.mts → index-BDZDS1SD.d.mts} +2 -2
- package/dist/{index-BHatz_Pu.d.cts.map → index-BDZDS1SD.d.mts.map} +1 -1
- package/dist/{index-BHatz_Pu.d.cts → index-BzKrDvzg.d.cts} +2 -2
- package/dist/{index-_jAhoJQ7.d.mts.map → index-BzKrDvzg.d.cts.map} +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{initTRPC-B7UdX-c3.cjs → initTRPC-DLNeKv0z.cjs} +114 -26
- package/dist/{initTRPC-B259os3T.mjs → initTRPC-DpOypWK_.mjs} +95 -19
- package/dist/initTRPC-DpOypWK_.mjs.map +1 -0
- package/dist/{node-http-BUlb5EdB.mjs → node-http-B_z10Yky.mjs} +5 -5
- package/dist/{node-http-BUlb5EdB.mjs.map → node-http-B_z10Yky.mjs.map} +1 -1
- package/dist/{node-http-CikCqjt6.cjs → node-http-Bti3aBT6.cjs} +9 -9
- package/dist/{parseTRPCMessage-MJWDg1vX.mjs → parseTRPCMessage-CSh-CVPr.mjs} +2 -2
- package/dist/{parseTRPCMessage-MJWDg1vX.mjs.map → parseTRPCMessage-CSh-CVPr.mjs.map} +1 -1
- package/dist/{parseTRPCMessage-BxAIUx49.cjs → parseTRPCMessage-RJS87G_t.cjs} +1 -1
- package/dist/{resolveResponse-JtMyT9TQ.mjs → resolveResponse-CrB_9MSD.mjs} +43 -179
- package/dist/resolveResponse-CrB_9MSD.mjs.map +1 -0
- package/dist/{resolveResponse-DLpzHrPG.cjs → resolveResponse-D5JAuwvU.cjs} +90 -226
- package/dist/rpc.cjs +2 -2
- package/dist/rpc.d.cts +1 -1
- package/dist/rpc.d.mts +1 -1
- package/dist/rpc.mjs +2 -2
- package/dist/shared.cjs +1 -1
- package/dist/shared.d.cts +1 -1
- package/dist/shared.d.mts +1 -1
- package/dist/shared.mjs +1 -1
- package/dist/{unstable-core-do-not-import-BK_OKrtM.d.mts → unstable-core-do-not-import-JE3NCpqt.d.mts} +707 -636
- package/dist/unstable-core-do-not-import-JE3NCpqt.d.mts.map +1 -0
- package/dist/{unstable-core-do-not-import-B9ZnrQAU.d.cts → unstable-core-do-not-import-Jynlfuqc.d.cts} +707 -636
- package/dist/unstable-core-do-not-import-Jynlfuqc.d.cts.map +1 -0
- package/dist/unstable-core-do-not-import.cjs +30 -23
- package/dist/unstable-core-do-not-import.d.cts +2 -2
- package/dist/unstable-core-do-not-import.d.mts +2 -2
- package/dist/unstable-core-do-not-import.mjs +7 -7
- package/dist/{ws-BMSSVFiW.cjs → ws-BgBeYgGS.cjs} +22 -22
- package/dist/{ws-C7ZOJJeA.mjs → ws-CNjkWAs9.mjs} +7 -7
- package/dist/{ws-C7ZOJJeA.mjs.map → ws-CNjkWAs9.mjs.map} +1 -1
- package/http/index.d.ts +1 -0
- package/http/index.js +1 -0
- package/observable/index.d.ts +1 -0
- package/observable/index.js +1 -0
- package/package.json +14 -14
- package/rpc/index.d.ts +1 -0
- package/rpc/index.js +1 -0
- package/shared/index.d.ts +1 -0
- package/shared/index.js +1 -0
- package/src/@trpc/server/index.ts +1 -0
- package/src/unstable-core-do-not-import/clientish/inference.ts +12 -0
- package/src/unstable-core-do-not-import/error/formatter.ts +90 -3
- package/src/unstable-core-do-not-import/error/getErrorShape.ts +8 -17
- package/src/unstable-core-do-not-import/initTRPC.ts +10 -7
- package/src/unstable-core-do-not-import/middleware.ts +93 -2
- package/src/unstable-core-do-not-import/procedure.ts +2 -0
- package/src/unstable-core-do-not-import/procedureBuilder.ts +79 -13
- package/src/unstable-core-do-not-import/rootConfig.ts +8 -0
- package/src/unstable-core-do-not-import/stream/jsonl.ts +41 -33
- package/src/unstable-core-do-not-import/utils.ts +4 -0
- package/unstable-core-do-not-import/index.d.ts +1 -0
- package/unstable-core-do-not-import/index.js +1 -0
- package/dist/codes-D5Ya6_Bi.mjs.map +0 -1
- package/dist/getErrorShape-B0JBUs-i.mjs.map +0 -1
- package/dist/initTRPC-B259os3T.mjs.map +0 -1
- package/dist/resolveResponse-JtMyT9TQ.mjs.map +0 -1
- package/dist/tracked-D4jU_Hb3.mjs.map +0 -1
- package/dist/unstable-core-do-not-import-B9ZnrQAU.d.cts.map +0 -1
- package/dist/unstable-core-do-not-import-BK_OKrtM.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/aws-lambda';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/aws-lambda');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/express';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/express');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/fastify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/fastify');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/fetch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/fetch');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/next';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/next');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/next-app-dir';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/next-app-dir');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../../dist/adapters/node-http/content-type/form-data';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../../../dist/adapters/node-http/content-type/form-data');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../../../dist/adapters/node-http/content-type/json';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../../../dist/adapters/node-http/content-type/json');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/node-http';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/node-http');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/standalone';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/standalone');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/adapters/ws';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/adapters/ws');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_getErrorShape = require("../../getErrorShape-
|
|
3
|
-
const require_resolveResponse = require("../../resolveResponse-
|
|
2
|
+
const require_getErrorShape = require("../../getErrorShape-CVxLwJgN.cjs");
|
|
3
|
+
const require_resolveResponse = require("../../resolveResponse-D5JAuwvU.cjs");
|
|
4
4
|
let node_stream = require("node:stream");
|
|
5
5
|
let node_stream_promises = require("node:stream/promises");
|
|
6
6
|
//#region src/vendor/cookie-es/set-cookie/split.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as inferRouterContext, Dn as HTTPBaseHandlerOptions, Fn as AnyRouter, Nn as TRPCRequestInfo, or as CreateContextCallback } from "../../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
2
|
import { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, APIGatewayProxyStructuredResultV2, Context, StreamifyHandler } from "aws-lambda";
|
|
3
3
|
//#region src/adapters/aws-lambda/getPlanner.d.ts
|
|
4
4
|
type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as inferRouterContext, Dn as HTTPBaseHandlerOptions, Fn as AnyRouter, Nn as TRPCRequestInfo, or as CreateContextCallback } from "../../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
2
|
import { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, APIGatewayProxyStructuredResultV2, Context, StreamifyHandler } from "aws-lambda";
|
|
3
3
|
//#region src/adapters/aws-lambda/getPlanner.d.ts
|
|
4
4
|
type LambdaEvent = APIGatewayProxyEvent | APIGatewayProxyEventV2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as _objectSpread2 } from "../../getErrorShape-
|
|
2
|
-
import { t as resolveResponse } from "../../resolveResponse-
|
|
1
|
+
import { n as _objectSpread2 } from "../../getErrorShape-BziUKLM_.mjs";
|
|
2
|
+
import { t as resolveResponse } from "../../resolveResponse-CrB_9MSD.mjs";
|
|
3
3
|
import { Readable } from "node:stream";
|
|
4
4
|
import { pipeline } from "node:stream/promises";
|
|
5
5
|
//#region src/vendor/cookie-es/set-cookie/split.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_codes = require("../codes-
|
|
3
|
-
const require_getErrorShape = require("../getErrorShape-
|
|
4
|
-
const require_node_http = require("../node-http-
|
|
2
|
+
const require_codes = require("../codes-BwD4QurF.cjs");
|
|
3
|
+
const require_getErrorShape = require("../getErrorShape-CVxLwJgN.cjs");
|
|
4
|
+
const require_node_http = require("../node-http-Bti3aBT6.cjs");
|
|
5
5
|
//#region src/adapters/express.ts
|
|
6
6
|
function createExpressMiddleware(opts) {
|
|
7
7
|
return (req, res) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-BzKrDvzg.cjs";
|
|
3
3
|
import * as express from "express";
|
|
4
4
|
//#region src/adapters/express.d.ts
|
|
5
5
|
export type CreateExpressContextOptions = NodeHTTPCreateContextFnOptions<express.Request, express.Response>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-BDZDS1SD.mjs";
|
|
3
3
|
import * as express from "express";
|
|
4
4
|
//#region src/adapters/express.d.ts
|
|
5
5
|
export type CreateExpressContextOptions = NodeHTTPCreateContextFnOptions<express.Request, express.Response>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as _objectSpread2 } from "../getErrorShape-
|
|
3
|
-
import { n as nodeHTTPRequestHandler, t as internal_exceptionHandler } from "../node-http-
|
|
1
|
+
import { m as run } from "../codes-D6C_OiJy.mjs";
|
|
2
|
+
import { n as _objectSpread2 } from "../getErrorShape-BziUKLM_.mjs";
|
|
3
|
+
import { n as nodeHTTPRequestHandler, t as internal_exceptionHandler } from "../node-http-B_z10Yky.mjs";
|
|
4
4
|
//#region src/adapters/express.ts
|
|
5
5
|
function createExpressMiddleware(opts) {
|
|
6
6
|
return (req, res) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_getErrorShape = require("../../getErrorShape-
|
|
3
|
-
const require_resolveResponse = require("../../resolveResponse-
|
|
4
|
-
const require_node_http = require("../../node-http-
|
|
5
|
-
const require_ws = require("../../ws-
|
|
2
|
+
const require_getErrorShape = require("../../getErrorShape-CVxLwJgN.cjs");
|
|
3
|
+
const require_resolveResponse = require("../../resolveResponse-D5JAuwvU.cjs");
|
|
4
|
+
const require_node_http = require("../../node-http-Bti3aBT6.cjs");
|
|
5
|
+
const require_ws = require("../../ws-BgBeYgGS.cjs");
|
|
6
6
|
//#region src/adapters/fastify/fastifyRequestHandler.ts
|
|
7
7
|
async function fastifyRequestHandler(opts) {
|
|
8
8
|
const createContext = async (innerOpts) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as NodeHTTPCreateContextFnOptions, s as NodeHTTPCreateContextOption } from "../../index-
|
|
1
|
+
import { Dn as HTTPBaseHandlerOptions, Fn as AnyRouter } from "../../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
|
+
import { o as NodeHTTPCreateContextFnOptions, s as NodeHTTPCreateContextOption } from "../../index-BzKrDvzg.cjs";
|
|
3
3
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
4
4
|
//#region src/adapters/fastify/fastifyRequestHandler.d.ts
|
|
5
5
|
export type FastifyHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = HTTPBaseHandlerOptions<TRouter, TRequest> & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as NodeHTTPCreateContextFnOptions, s as NodeHTTPCreateContextOption } from "../../index-
|
|
1
|
+
import { Dn as HTTPBaseHandlerOptions, Fn as AnyRouter } from "../../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
|
+
import { o as NodeHTTPCreateContextFnOptions, s as NodeHTTPCreateContextOption } from "../../index-BDZDS1SD.mjs";
|
|
3
3
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
4
4
|
//#region src/adapters/fastify/fastifyRequestHandler.d.ts
|
|
5
5
|
export type FastifyHandlerOptions<TRouter extends AnyRouter, TRequest extends FastifyRequest, TResponse extends FastifyReply> = HTTPBaseHandlerOptions<TRouter, TRequest> & NodeHTTPCreateContextOption<TRouter, TRequest, TResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as _objectSpread2 } from "../../getErrorShape-
|
|
2
|
-
import { t as resolveResponse } from "../../resolveResponse-
|
|
3
|
-
import { i as incomingMessageToRequest } from "../../node-http-
|
|
4
|
-
import { n as getWSConnectionHandler, r as handleKeepAlive } from "../../ws-
|
|
1
|
+
import { n as _objectSpread2 } from "../../getErrorShape-BziUKLM_.mjs";
|
|
2
|
+
import { t as resolveResponse } from "../../resolveResponse-CrB_9MSD.mjs";
|
|
3
|
+
import { i as incomingMessageToRequest } from "../../node-http-B_z10Yky.mjs";
|
|
4
|
+
import { n as getWSConnectionHandler, r as handleKeepAlive } from "../../ws-CNjkWAs9.mjs";
|
|
5
5
|
//#region src/adapters/fastify/fastifyRequestHandler.ts
|
|
6
6
|
async function fastifyRequestHandler(opts) {
|
|
7
7
|
const createContext = async (innerOpts) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_getErrorShape = require("../../getErrorShape-
|
|
3
|
-
const require_resolveResponse = require("../../resolveResponse-
|
|
2
|
+
const require_getErrorShape = require("../../getErrorShape-CVxLwJgN.cjs");
|
|
3
|
+
const require_resolveResponse = require("../../resolveResponse-D5JAuwvU.cjs");
|
|
4
4
|
//#region src/adapters/fetch/fetchRequestHandler.ts
|
|
5
5
|
const trimSlashes = (path) => {
|
|
6
6
|
path = path.startsWith("/") ? path.slice(1) : path;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as inferRouterContext, Dn as HTTPBaseHandlerOptions, Fn as AnyRouter, Nn as TRPCRequestInfo, or as CreateContextCallback } from "../../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
2
|
//#region src/adapters/fetch/types.d.ts
|
|
3
3
|
export type FetchCreateContextFnOptions = {
|
|
4
4
|
req: Request;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as inferRouterContext, Dn as HTTPBaseHandlerOptions, Fn as AnyRouter, Nn as TRPCRequestInfo, or as CreateContextCallback } from "../../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
2
|
//#region src/adapters/fetch/types.d.ts
|
|
3
3
|
export type FetchCreateContextFnOptions = {
|
|
4
4
|
req: Request;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as _objectSpread2 } from "../../getErrorShape-
|
|
2
|
-
import { t as resolveResponse } from "../../resolveResponse-
|
|
1
|
+
import { n as _objectSpread2 } from "../../getErrorShape-BziUKLM_.mjs";
|
|
2
|
+
import { t as resolveResponse } from "../../resolveResponse-CrB_9MSD.mjs";
|
|
3
3
|
//#region src/adapters/fetch/fetchRequestHandler.ts
|
|
4
4
|
const trimSlashes = (path) => {
|
|
5
5
|
path = path.startsWith("/") ? path.slice(1) : path;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-VH7oDXx4.cjs");
|
|
3
|
-
const require_getErrorShape = require("../getErrorShape-
|
|
4
|
-
const
|
|
3
|
+
const require_getErrorShape = require("../getErrorShape-CVxLwJgN.cjs");
|
|
4
|
+
const require_asyncGeneratorDelegate = require("../asyncGeneratorDelegate-D2tFgl_z.cjs");
|
|
5
5
|
const require_unstable_core_do_not_import = require("../unstable-core-do-not-import.cjs");
|
|
6
6
|
let next_navigation = require("next/navigation");
|
|
7
7
|
next_navigation = require_rolldown_runtime.__toESM(next_navigation, 1);
|
|
@@ -9,7 +9,7 @@ next_navigation = require_rolldown_runtime.__toESM(next_navigation, 1);
|
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
var TRPCRedirectError = class extends
|
|
12
|
+
var TRPCRedirectError = class extends require_asyncGeneratorDelegate.TRPCError {
|
|
13
13
|
constructor(url, redirectType) {
|
|
14
14
|
super({
|
|
15
15
|
code: "UNPROCESSABLE_CONTENT",
|
|
@@ -78,7 +78,7 @@ function nextAppDirCaller(config) {
|
|
|
78
78
|
var _config$pathExtractor, _config$pathExtractor2;
|
|
79
79
|
const path = (_config$pathExtractor = (_config$pathExtractor2 = config.pathExtractor) === null || _config$pathExtractor2 === void 0 ? void 0 : _config$pathExtractor2.call(config, { meta: opts._def.meta })) !== null && _config$pathExtractor !== void 0 ? _config$pathExtractor : "";
|
|
80
80
|
const ctx = await createContext().catch((cause) => {
|
|
81
|
-
throw new
|
|
81
|
+
throw new require_asyncGeneratorDelegate.TRPCError({
|
|
82
82
|
code: "INTERNAL_SERVER_ERROR",
|
|
83
83
|
message: "Failed to create context",
|
|
84
84
|
cause
|
|
@@ -86,7 +86,7 @@ function nextAppDirCaller(config) {
|
|
|
86
86
|
});
|
|
87
87
|
const handleError = (cause) => {
|
|
88
88
|
var _config$onError;
|
|
89
|
-
const error =
|
|
89
|
+
const error = require_asyncGeneratorDelegate.getTRPCErrorFromUnknown(cause);
|
|
90
90
|
(_config$onError = config.onError) === null || _config$onError === void 0 || _config$onError.call(config, {
|
|
91
91
|
ctx,
|
|
92
92
|
error,
|
|
@@ -135,7 +135,7 @@ function nextAppDirCaller(config) {
|
|
|
135
135
|
return data;
|
|
136
136
|
}).catch(handleError);
|
|
137
137
|
}
|
|
138
|
-
default: throw new
|
|
138
|
+
default: throw new require_asyncGeneratorDelegate.TRPCError({
|
|
139
139
|
code: "NOT_IMPLEMENTED",
|
|
140
140
|
message: `Not implemented for type ${opts._def.type}`
|
|
141
141
|
});
|
|
@@ -149,7 +149,7 @@ function nextAppDirCaller(config) {
|
|
|
149
149
|
* @public
|
|
150
150
|
*/
|
|
151
151
|
const notFound = () => {
|
|
152
|
-
throw new
|
|
152
|
+
throw new require_asyncGeneratorDelegate.TRPCError({ code: "NOT_FOUND" });
|
|
153
153
|
};
|
|
154
154
|
//#endregion
|
|
155
155
|
exports.experimental_nextAppDirCaller = nextAppDirCaller;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as ErrorHandlerOptions, Xr as TRPCError, bi as Simplify, hi as MaybePromise, or as CreateContextCallback, pt as CallerOverride } from "../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
2
|
import { RedirectType, notFound as notFound$1 } from "next/navigation";
|
|
3
3
|
//#region src/adapters/next-app-dir/nextAppDirCaller.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as ErrorHandlerOptions, Xr as TRPCError, bi as Simplify, hi as MaybePromise, or as CreateContextCallback, pt as CallerOverride } from "../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
2
|
import { RedirectType, notFound as notFound$1 } from "next/navigation";
|
|
3
3
|
//#region src/adapters/next-app-dir/nextAppDirCaller.d.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as _defineProperty } from "../getErrorShape-
|
|
2
|
-
import {
|
|
1
|
+
import { r as _defineProperty } from "../getErrorShape-BziUKLM_.mjs";
|
|
2
|
+
import { b as getTRPCErrorFromUnknown, v as TRPCError } from "../asyncGeneratorDelegate-mPyp1u6d.mjs";
|
|
3
3
|
import { formDataToObject } from "../unstable-core-do-not-import.mjs";
|
|
4
4
|
import * as nextNavigation from "next/navigation";
|
|
5
5
|
//#region src/adapters/next-app-dir/redirect.ts
|
package/dist/adapters/next.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_codes = require("../codes-
|
|
3
|
-
const require_getErrorShape = require("../getErrorShape-
|
|
4
|
-
const
|
|
5
|
-
const require_node_http = require("../node-http-
|
|
2
|
+
const require_codes = require("../codes-BwD4QurF.cjs");
|
|
3
|
+
const require_getErrorShape = require("../getErrorShape-CVxLwJgN.cjs");
|
|
4
|
+
const require_asyncGeneratorDelegate = require("../asyncGeneratorDelegate-D2tFgl_z.cjs");
|
|
5
|
+
const require_node_http = require("../node-http-Bti3aBT6.cjs");
|
|
6
6
|
//#region src/adapters/next.ts
|
|
7
7
|
function createNextApiHandler(opts) {
|
|
8
8
|
return async (req, res) => {
|
|
@@ -11,7 +11,7 @@ function createNextApiHandler(opts) {
|
|
|
11
11
|
path = require_codes.run(() => {
|
|
12
12
|
if (typeof req.query["trpc"] === "string") return req.query["trpc"];
|
|
13
13
|
if (Array.isArray(req.query["trpc"])) return req.query["trpc"].join("/");
|
|
14
|
-
throw new
|
|
14
|
+
throw new require_asyncGeneratorDelegate.TRPCError({
|
|
15
15
|
message: "Query \"trpc\" not found - is the file named `[trpc]`.ts or `[...trpc].ts`?",
|
|
16
16
|
code: "INTERNAL_SERVER_ERROR"
|
|
17
17
|
});
|
package/dist/adapters/next.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-BzKrDvzg.cjs";
|
|
3
3
|
import { NextApiHandler, NextApiHandler as NextApiHandler$1, NextApiRequest, NextApiRequest as NextApiRequest$1, NextApiResponse, NextApiResponse as NextApiResponse$1 } from "next";
|
|
4
4
|
//#region src/adapters/next.d.ts
|
|
5
5
|
export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<NextApiRequest$1, NextApiResponse$1>;
|
package/dist/adapters/next.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, o as NodeHTTPCreateContextFnOptions } from "../index-BDZDS1SD.mjs";
|
|
3
3
|
import { NextApiHandler, NextApiHandler as NextApiHandler$1, NextApiRequest, NextApiRequest as NextApiRequest$1, NextApiResponse, NextApiResponse as NextApiResponse$1 } from "next";
|
|
4
4
|
//#region src/adapters/next.d.ts
|
|
5
5
|
export type CreateNextContextOptions = NodeHTTPCreateContextFnOptions<NextApiRequest$1, NextApiResponse$1>;
|
package/dist/adapters/next.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as _objectSpread2 } from "../getErrorShape-
|
|
3
|
-
import {
|
|
4
|
-
import { n as nodeHTTPRequestHandler, t as internal_exceptionHandler } from "../node-http-
|
|
1
|
+
import { m as run } from "../codes-D6C_OiJy.mjs";
|
|
2
|
+
import { n as _objectSpread2 } from "../getErrorShape-BziUKLM_.mjs";
|
|
3
|
+
import { v as TRPCError } from "../asyncGeneratorDelegate-mPyp1u6d.mjs";
|
|
4
|
+
import { n as nodeHTTPRequestHandler, t as internal_exceptionHandler } from "../node-http-B_z10Yky.mjs";
|
|
5
5
|
//#region src/adapters/next.ts
|
|
6
6
|
function createNextApiHandler(opts) {
|
|
7
7
|
return async (req, res) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_node_http = require("../../node-http-
|
|
2
|
+
const require_node_http = require("../../node-http-Bti3aBT6.cjs");
|
|
3
3
|
exports.createURL = require_node_http.createURL;
|
|
4
4
|
exports.incomingMessageToRequest = require_node_http.incomingMessageToRequest;
|
|
5
5
|
exports.internal_exceptionHandler = require_node_http.internal_exceptionHandler;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as NodeHTTPCreateContextFn, c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, i as nodeHTTPRequestHandler, l as NodeHTTPRequest, n as incomingMessageToRequest, o as NodeHTTPCreateContextFnOptions, r as internal_exceptionHandler, s as NodeHTTPCreateContextOption, t as createURL, u as NodeHTTPRequestHandlerOptions } from "../../index-
|
|
1
|
+
import { a as NodeHTTPCreateContextFn, c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, i as nodeHTTPRequestHandler, l as NodeHTTPRequest, n as incomingMessageToRequest, o as NodeHTTPCreateContextFnOptions, r as internal_exceptionHandler, s as NodeHTTPCreateContextOption, t as createURL, u as NodeHTTPRequestHandlerOptions } from "../../index-BzKrDvzg.cjs";
|
|
2
2
|
export { NodeHTTPCreateContextFn, NodeHTTPCreateContextFnOptions, NodeHTTPCreateContextOption, NodeHTTPHandlerOptions, NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse, createURL, incomingMessageToRequest, internal_exceptionHandler, nodeHTTPRequestHandler };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as NodeHTTPCreateContextFn, c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, i as nodeHTTPRequestHandler, l as NodeHTTPRequest, n as incomingMessageToRequest, o as NodeHTTPCreateContextFnOptions, r as internal_exceptionHandler, s as NodeHTTPCreateContextOption, t as createURL, u as NodeHTTPRequestHandlerOptions } from "../../index-
|
|
1
|
+
import { a as NodeHTTPCreateContextFn, c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, i as nodeHTTPRequestHandler, l as NodeHTTPRequest, n as incomingMessageToRequest, o as NodeHTTPCreateContextFnOptions, r as internal_exceptionHandler, s as NodeHTTPCreateContextOption, t as createURL, u as NodeHTTPRequestHandlerOptions } from "../../index-BDZDS1SD.mjs";
|
|
2
2
|
export { NodeHTTPCreateContextFn, NodeHTTPCreateContextFnOptions, NodeHTTPCreateContextOption, NodeHTTPHandlerOptions, NodeHTTPRequest, NodeHTTPRequestHandlerOptions, NodeHTTPResponse, createURL, incomingMessageToRequest, internal_exceptionHandler, nodeHTTPRequestHandler };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as incomingMessageToRequest, n as nodeHTTPRequestHandler, r as createURL, t as internal_exceptionHandler } from "../../node-http-
|
|
1
|
+
import { i as incomingMessageToRequest, n as nodeHTTPRequestHandler, r as createURL, t as internal_exceptionHandler } from "../../node-http-B_z10Yky.mjs";
|
|
2
2
|
export { createURL, incomingMessageToRequest, internal_exceptionHandler, nodeHTTPRequestHandler };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-VH7oDXx4.cjs");
|
|
3
|
-
const require_codes = require("../codes-
|
|
4
|
-
const require_getErrorShape = require("../getErrorShape-
|
|
5
|
-
const require_node_http = require("../node-http-
|
|
3
|
+
const require_codes = require("../codes-BwD4QurF.cjs");
|
|
4
|
+
const require_getErrorShape = require("../getErrorShape-CVxLwJgN.cjs");
|
|
5
|
+
const require_node_http = require("../node-http-Bti3aBT6.cjs");
|
|
6
6
|
let http = require("http");
|
|
7
7
|
http = require_rolldown_runtime.__toESM(http, 1);
|
|
8
8
|
//#region src/adapters/standalone.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, l as NodeHTTPRequest, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, l as NodeHTTPRequest, o as NodeHTTPCreateContextFnOptions } from "../index-BzKrDvzg.cjs";
|
|
3
3
|
import http from "http";
|
|
4
4
|
import * as http2 from "http2";
|
|
5
5
|
//#region src/adapters/standalone.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, l as NodeHTTPRequest, o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { Fn as AnyRouter } from "../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
|
+
import { c as NodeHTTPHandlerOptions, d as NodeHTTPResponse, l as NodeHTTPRequest, o as NodeHTTPCreateContextFnOptions } from "../index-BDZDS1SD.mjs";
|
|
3
3
|
import http from "http";
|
|
4
4
|
import * as http2 from "http2";
|
|
5
5
|
//#region src/adapters/standalone.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as _objectSpread2 } from "../getErrorShape-
|
|
3
|
-
import { n as nodeHTTPRequestHandler, r as createURL, t as internal_exceptionHandler } from "../node-http-
|
|
1
|
+
import { m as run } from "../codes-D6C_OiJy.mjs";
|
|
2
|
+
import { n as _objectSpread2 } from "../getErrorShape-BziUKLM_.mjs";
|
|
3
|
+
import { n as nodeHTTPRequestHandler, r as createURL, t as internal_exceptionHandler } from "../node-http-B_z10Yky.mjs";
|
|
4
4
|
import http from "http";
|
|
5
5
|
//#region src/adapters/standalone.ts
|
|
6
6
|
/**
|
package/dist/adapters/ws.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ws = require("../ws-
|
|
2
|
+
const require_ws = require("../ws-BgBeYgGS.cjs");
|
|
3
3
|
exports.applyWSSHandler = require_ws.applyWSSHandler;
|
|
4
4
|
exports.getWSConnectionHandler = require_ws.getWSConnectionHandler;
|
|
5
5
|
exports.handleKeepAlive = require_ws.handleKeepAlive;
|
package/dist/adapters/ws.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { $n as inferRouterContext, En as BaseHandlerOptions, Fn as AnyRouter, hi as MaybePromise, or as CreateContextCallback } from "../unstable-core-do-not-import-Jynlfuqc.cjs";
|
|
2
|
+
import { o as NodeHTTPCreateContextFnOptions } from "../index-BzKrDvzg.cjs";
|
|
3
3
|
import { IncomingMessage } from "http";
|
|
4
4
|
import ws from "ws";
|
|
5
5
|
//#region src/adapters/wsEncoder.d.ts
|
package/dist/adapters/ws.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as NodeHTTPCreateContextFnOptions } from "../index-
|
|
1
|
+
import { $n as inferRouterContext, En as BaseHandlerOptions, Fn as AnyRouter, hi as MaybePromise, or as CreateContextCallback } from "../unstable-core-do-not-import-JE3NCpqt.mjs";
|
|
2
|
+
import { o as NodeHTTPCreateContextFnOptions } from "../index-BDZDS1SD.mjs";
|
|
3
3
|
import { IncomingMessage } from "http";
|
|
4
4
|
import ws from "ws";
|
|
5
5
|
//#region src/adapters/wsEncoder.d.ts
|
package/dist/adapters/ws.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as jsonEncoder, n as getWSConnectionHandler, r as handleKeepAlive, t as applyWSSHandler } from "../ws-
|
|
1
|
+
import { i as jsonEncoder, n as getWSConnectionHandler, r as handleKeepAlive, t as applyWSSHandler } from "../ws-CNjkWAs9.mjs";
|
|
2
2
|
export { applyWSSHandler, getWSConnectionHandler, handleKeepAlive, jsonEncoder };
|