@orpc/server 2.0.0-beta.41 → 2.0.0-beta.43
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/adapters/aws-lambda/index.mjs +1 -1
- package/dist/adapters/crossws/index.mjs +1 -1
- package/dist/adapters/fastify/index.mjs +1 -1
- package/dist/adapters/fetch/index.mjs +1 -1
- package/dist/adapters/message-port/index.mjs +1 -1
- package/dist/adapters/node/index.mjs +1 -1
- package/dist/adapters/standard/index.mjs +1 -1
- package/dist/adapters/websocket/index.mjs +1 -1
- package/dist/plugins/index.d.mts +2 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/shared/{server.BFEVk-EI.mjs → server.B1ecixZJ.mjs} +2 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@standard-server/aws-lambda';
|
|
3
3
|
import { r as resolveFriendlyStandardHandlerHandleOptions } from '../../shared/server.W91HSRkE.mjs';
|
|
4
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
4
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@standard-server/core';
|
|
7
7
|
import '../../shared/server.FEqy7Hrj.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer, encodePeerMessage, decodePeerMessage, isClientPeerSendMessage } from '@standard-server/peer';
|
|
3
3
|
import { createStandardPeerRequestHandler } from '../standard-peer/index.mjs';
|
|
4
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
4
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
5
5
|
import '../../shared/server.W91HSRkE.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@standard-server/core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@standard-server/fastify';
|
|
3
3
|
import { r as resolveFriendlyStandardHandlerHandleOptions } from '../../shared/server.W91HSRkE.mjs';
|
|
4
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
4
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@standard-server/core';
|
|
7
7
|
import '../../shared/server.FEqy7Hrj.mjs';
|
|
@@ -2,7 +2,7 @@ export { R as BodyLimitPlugin } from '../../shared/server.1ExWFMze.mjs';
|
|
|
2
2
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { toStandardLazyRequest, toFetchResponse } from '@standard-server/fetch';
|
|
4
4
|
import { r as resolveFriendlyStandardHandlerHandleOptions } from '../../shared/server.W91HSRkE.mjs';
|
|
5
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
5
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@standard-server/core';
|
|
8
8
|
import '../../shared/server.FEqy7Hrj.mjs';
|
|
@@ -2,7 +2,7 @@ import { onMessagePortMessage, onMessagePortClose, postMessagePortMessage } from
|
|
|
2
2
|
import { value, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { ServerPeer, encodePeerMessage, decodePeerMessage, isClientPeerSendMessage, isPeerMessage } from '@standard-server/peer';
|
|
4
4
|
import { createStandardPeerRequestHandler } from '../standard-peer/index.mjs';
|
|
5
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
5
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
6
6
|
import '../../shared/server.W91HSRkE.mjs';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@standard-server/core';
|
|
@@ -2,7 +2,7 @@ export { R as BodyLimitPlugin } from '../../shared/server.1ExWFMze.mjs';
|
|
|
2
2
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { toStandardLazyRequest, sendStandardResponse } from '@standard-server/node';
|
|
4
4
|
import { r as resolveFriendlyStandardHandlerHandleOptions } from '../../shared/server.W91HSRkE.mjs';
|
|
5
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
5
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@standard-server/core';
|
|
8
8
|
import '@standard-server/fetch';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, R as RPCHandlerCodec, a as RPCMatcher, b as RPC_DEFAULT_ALLOW_METHODS, S as StandardHandler, T as TracingHandlerPlugin } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, R as RPCHandlerCodec, a as RPCMatcher, b as RPC_DEFAULT_ALLOW_METHODS, S as StandardHandler, T as TracingHandlerPlugin } from '../../shared/server.B1ecixZJ.mjs';
|
|
2
2
|
export { r as resolveFriendlyStandardHandlerHandleOptions } from '../../shared/server.W91HSRkE.mjs';
|
|
3
3
|
import '@orpc/client';
|
|
4
4
|
import '@orpc/shared';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toStringOrBytes, resolveMaybeOptionalOptions, sequential, loadBytes } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer, encodePeerMessage, decodePeerMessage, isClientPeerSendMessage } from '@standard-server/peer';
|
|
3
3
|
import { createStandardPeerRequestHandler } from '../standard-peer/index.mjs';
|
|
4
|
-
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.
|
|
4
|
+
import { R as RPCHandlerCodec, S as StandardHandler } from '../../shared/server.B1ecixZJ.mjs';
|
|
5
5
|
import '../../shared/server.W91HSRkE.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@standard-server/core';
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -112,6 +112,8 @@ interface CORSHandlerPluginOptions<T extends Context> {
|
|
|
112
112
|
/**
|
|
113
113
|
* Configures the `Access-Control-Allow-Headers` header for preflight requests.
|
|
114
114
|
* Falls back to the request's `Access-Control-Request-Headers` if not set.
|
|
115
|
+
* When set, it replaces that fallback, so include every non-safelisted header
|
|
116
|
+
* clients send, such as `Content-Type`.
|
|
115
117
|
*/
|
|
116
118
|
allowHeaders?: readonly string[];
|
|
117
119
|
/**
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -112,6 +112,8 @@ interface CORSHandlerPluginOptions<T extends Context> {
|
|
|
112
112
|
/**
|
|
113
113
|
* Configures the `Access-Control-Allow-Headers` header for preflight requests.
|
|
114
114
|
* Falls back to the request's `Access-Control-Request-Headers` if not set.
|
|
115
|
+
* When set, it replaces that fallback, so include every non-safelisted header
|
|
116
|
+
* clients send, such as `Content-Type`.
|
|
115
117
|
*/
|
|
116
118
|
allowHeaders?: readonly string[];
|
|
117
119
|
/**
|
|
@@ -183,6 +183,7 @@ class TracingHandlerPlugin {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
const RPC_DEFAULT_ALLOW_METHODS = ["POST", "PUT", "PATCH", "DELETE"];
|
|
186
|
+
const NORMALIZABLE_PATHNAME_REGEX = /[^\w\-.!~*'()/]/;
|
|
186
187
|
class RPCMatcher {
|
|
187
188
|
filter;
|
|
188
189
|
allowMethodsSet;
|
|
@@ -244,7 +245,7 @@ class RPCMatcher {
|
|
|
244
245
|
await loading;
|
|
245
246
|
}
|
|
246
247
|
let entry = this.tree.get(pathname);
|
|
247
|
-
if (entry === void 0 &&
|
|
248
|
+
if (entry === void 0 && NORMALIZABLE_PATHNAME_REGEX.test(pathname)) {
|
|
248
249
|
const normalizedPathname = normalizeHttpPath(pathname);
|
|
249
250
|
const normalizedLoading = this.resolvePendingLazyRouters(normalizedPathname);
|
|
250
251
|
if (normalizedLoading !== void 0) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.43",
|
|
5
5
|
"description": "Build typesafe APIs with oRPC: RPC and OpenAPI support, middleware, and adapters for Node.js, Bun, Deno, Fetch, Fastify, WebSocket, AWS Lambda, and more",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": [
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@orpc/client": "2.0.0-beta.
|
|
121
|
-
"@orpc/contract": "2.0.0-beta.
|
|
122
|
-
"@orpc/shared": "2.0.0-beta.
|
|
123
|
-
"@standard-server/aws-lambda": "~0.10.
|
|
124
|
-
"@standard-server/core": "~0.10.
|
|
125
|
-
"@standard-server/fastify": "~0.10.
|
|
126
|
-
"@standard-server/fetch": "~0.10.
|
|
127
|
-
"@standard-server/node": "~0.10.
|
|
128
|
-
"@standard-server/peer": "~0.10.
|
|
120
|
+
"@orpc/client": "2.0.0-beta.43",
|
|
121
|
+
"@orpc/contract": "2.0.0-beta.43",
|
|
122
|
+
"@orpc/shared": "2.0.0-beta.43",
|
|
123
|
+
"@standard-server/aws-lambda": "~0.10.2",
|
|
124
|
+
"@standard-server/core": "~0.10.2",
|
|
125
|
+
"@standard-server/fastify": "~0.10.2",
|
|
126
|
+
"@standard-server/fetch": "~0.10.2",
|
|
127
|
+
"@standard-server/node": "~0.10.2",
|
|
128
|
+
"@standard-server/peer": "~0.10.2",
|
|
129
129
|
"cookie": "^2.0.1"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|