@temporary-name/server 1.9.3-alpha.62d88f5cf3908d4411b5278f1824b69334da8072 → 1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb
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 +3 -3
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/node/index.mjs +3 -3
- package/dist/handler/index.mjs +3 -3
- package/dist/index.mjs +6 -6
- package/dist/openapi/index.mjs +2 -2
- package/dist/shared/{server.Blt424vz.mjs → server.B9A3AnYU.mjs} +1 -1
- package/dist/shared/{server.CCWAen7P.mjs → server.Bh0-Oy3H.mjs} +1 -1
- package/dist/shared/{server.BnAF9pfn.mjs → server.BnAospUv.mjs} +8 -13
- package/dist/shared/{server.MJ43MXYj.mjs → server.Bx9JTGMu.mjs} +2 -1
- package/package.json +8 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-aws-lambda';
|
|
3
|
-
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BnAospUv.mjs';
|
|
4
4
|
import '@temporary-name/server';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
|
-
import '../../shared/server.
|
|
6
|
+
import '../../shared/server.Bx9JTGMu.mjs';
|
|
7
7
|
import 'rou3';
|
|
8
|
-
import '../../shared/server.
|
|
8
|
+
import '../../shared/server.Bh0-Oy3H.mjs';
|
|
9
9
|
import '@temporary-name/zod';
|
|
10
10
|
|
|
11
11
|
class AwsLambdaHandler {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { toStandardLazyRequest, toFetchResponse } from '@temporary-name/standard-server-fetch';
|
|
3
|
-
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BnAospUv.mjs';
|
|
4
4
|
import '@temporary-name/server';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
|
-
import '../../shared/server.
|
|
6
|
+
import '../../shared/server.Bx9JTGMu.mjs';
|
|
7
7
|
import 'rou3';
|
|
8
|
-
import '../../shared/server.
|
|
8
|
+
import '../../shared/server.Bh0-Oy3H.mjs';
|
|
9
9
|
import '@temporary-name/zod';
|
|
10
10
|
|
|
11
11
|
class FetchHandler {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-node';
|
|
3
|
-
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.BnAospUv.mjs';
|
|
4
4
|
import '@temporary-name/server';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
|
-
import '../../shared/server.
|
|
6
|
+
import '../../shared/server.Bx9JTGMu.mjs';
|
|
7
7
|
import 'rou3';
|
|
8
|
-
import '../../shared/server.
|
|
8
|
+
import '../../shared/server.Bh0-Oy3H.mjs';
|
|
9
9
|
import '@temporary-name/zod';
|
|
10
10
|
|
|
11
11
|
class NodeHttpHandler {
|
package/dist/handler/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { S as StandardHandler, a as StandardOpenAPIMatcher, d as decode, b as decodeParams, e as encode, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../shared/server.
|
|
1
|
+
export { S as StandardHandler, a as StandardOpenAPIMatcher, d as decode, b as decodeParams, e as encode, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../shared/server.BnAospUv.mjs';
|
|
2
2
|
import '@temporary-name/shared';
|
|
3
|
-
import '../shared/server.
|
|
3
|
+
import '../shared/server.Bx9JTGMu.mjs';
|
|
4
4
|
import '@temporary-name/zod';
|
|
5
|
-
import '../shared/server.
|
|
5
|
+
import '../shared/server.Bh0-Oy3H.mjs';
|
|
6
6
|
import '@temporary-name/standard-server';
|
|
7
7
|
import '@temporary-name/server';
|
|
8
8
|
import 'rou3';
|
package/dist/index.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import { assertNever, splitFirst, onError, isObject, toArray, guard, resolveMayb
|
|
|
2
2
|
export { AsyncIteratorClass, EventPublisher, asyncIteratorToStream as eventIteratorToStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
3
3
|
import * as z from '@temporary-name/zod';
|
|
4
4
|
import { SchemaClass, object, core, gatingContext } from '@temporary-name/zod';
|
|
5
|
-
import { U as UnauthorizedError, P as Procedure, m as mergePrefix, a as mergeTags, b as enhanceRouter, C as Contract, p as parseEndpointDefinition, c as mergeRoute, d as prefixRoute, f as addMiddleware, I as InternalServerError, N as NotFoundError, F as ForbiddenError, B as BadRequestError, l as lazyInternal, h as getLazyMeta, u as unlazy, j as isProcedure } from './shared/server.
|
|
6
|
-
export { A as APIError, y as BadGatewayError, n as ConflictError, q as ContentTooLargeError, G as GatewayTimeoutError, L as LAZY_SYMBOL, M as MethodNotAllowedError, k as NotAcceptableError, x as NotImplementedError, o as PreconditionFailedError, R as RequestTimeoutError, S as ServiceUnavailableError, T as TooManyRequestsError, w as UnprocessableContentError, v as UnsupportedMediaTypeError, V as ValidationError, K as createAccessibleLazyRouter, e as encodeError, W as endpointRegex, g as getDynamicParams, J as getRouter, i as isAPIErrorStatus, X as isDevelopment, D as isLazy, E as isStartWithMiddlewares, z as lazy, H as mergeMiddlewares, r as resolveContractProcedures, s as standardizeHTTPPath, t as toAPIError, O as traverseContractProcedures, Q as unlazyRouter } from './shared/server.
|
|
5
|
+
import { U as UnauthorizedError, P as Procedure, m as mergePrefix, a as mergeTags, b as enhanceRouter, C as Contract, p as parseEndpointDefinition, c as mergeRoute, d as prefixRoute, f as addMiddleware, I as InternalServerError, N as NotFoundError, F as ForbiddenError, B as BadRequestError, l as lazyInternal, h as getLazyMeta, u as unlazy, j as isProcedure } from './shared/server.Bx9JTGMu.mjs';
|
|
6
|
+
export { A as APIError, y as BadGatewayError, n as ConflictError, q as ContentTooLargeError, G as GatewayTimeoutError, L as LAZY_SYMBOL, M as MethodNotAllowedError, k as NotAcceptableError, x as NotImplementedError, o as PreconditionFailedError, R as RequestTimeoutError, S as ServiceUnavailableError, T as TooManyRequestsError, w as UnprocessableContentError, v as UnsupportedMediaTypeError, V as ValidationError, K as createAccessibleLazyRouter, e as encodeError, W as endpointRegex, g as getDynamicParams, J as getRouter, i as isAPIErrorStatus, X as isDevelopment, D as isLazy, E as isStartWithMiddlewares, z as lazy, H as mergeMiddlewares, r as resolveContractProcedures, s as standardizeHTTPPath, t as toAPIError, O as traverseContractProcedures, Q as unlazyRouter } from './shared/server.Bx9JTGMu.mjs';
|
|
7
7
|
import { g as getCookie } from './shared/server.C1RJffw4.mjs';
|
|
8
|
-
import { c as createProcedureClient } from './shared/server.
|
|
9
|
-
export { m as mergeCurrentContext, a as middlewareOutputFn } from './shared/server.
|
|
10
|
-
import { J as JsonSchemaXNativeType } from './shared/server.
|
|
11
|
-
export { b as JSON_SCHEMA_INPUT_REGISTRY, c as JSON_SCHEMA_OUTPUT_REGISTRY, a as JSON_SCHEMA_REGISTRY, Z as ZodToJsonSchemaConverter, e as eventIterator, g as getEventIteratorSchemaDetails } from './shared/server.
|
|
8
|
+
import { c as createProcedureClient } from './shared/server.Bh0-Oy3H.mjs';
|
|
9
|
+
export { m as mergeCurrentContext, a as middlewareOutputFn } from './shared/server.Bh0-Oy3H.mjs';
|
|
10
|
+
import { J as JsonSchemaXNativeType } from './shared/server.B9A3AnYU.mjs';
|
|
11
|
+
export { b as JSON_SCHEMA_INPUT_REGISTRY, c as JSON_SCHEMA_OUTPUT_REGISTRY, a as JSON_SCHEMA_REGISTRY, Z as ZodToJsonSchemaConverter, e as eventIterator, g as getEventIteratorSchemaDetails } from './shared/server.B9A3AnYU.mjs';
|
|
12
12
|
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
13
13
|
import 'cookie';
|
|
14
14
|
import '@temporary-name/server/openapi';
|
package/dist/openapi/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isObject, stringifyJSON, findDeepMatches, clone, value, fallbackContractConfig, toHttpPath, assertNever } from '@temporary-name/shared';
|
|
2
2
|
import * as z from '@temporary-name/zod';
|
|
3
|
-
import { s as standardizeHTTPPath, r as resolveContractProcedures, g as getDynamicParams, i as isAPIErrorStatus } from '../shared/server.
|
|
4
|
-
import { Z as ZodToJsonSchemaConverter, g as getEventIteratorSchemaDetails } from '../shared/server.
|
|
3
|
+
import { s as standardizeHTTPPath, r as resolveContractProcedures, g as getDynamicParams, i as isAPIErrorStatus } from '../shared/server.Bx9JTGMu.mjs';
|
|
4
|
+
import { Z as ZodToJsonSchemaConverter, g as getEventIteratorSchemaDetails } from '../shared/server.B9A3AnYU.mjs';
|
|
5
5
|
import { TypeName } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
6
6
|
export { ContentEncoding as JSONSchemaContentEncoding, Format as JSONSchemaFormat, TypeName as JSONSchemaTypeName } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
7
7
|
import '@temporary-name/standard-server';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAsyncIteratorObject, toArray } from '@temporary-name/shared';
|
|
2
2
|
import { mapEventIterator } from '@temporary-name/standard-server';
|
|
3
3
|
import { custom, safeParseAsync } from '@temporary-name/zod';
|
|
4
|
-
import { V as ValidationError } from './server.
|
|
4
|
+
import { V as ValidationError } from './server.Bx9JTGMu.mjs';
|
|
5
5
|
import { JSONSchemaFormat, JSONSchemaContentEncoding } from '@temporary-name/server/openapi';
|
|
6
6
|
import { registry, globalRegistry } from 'zod/v4/core';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions, toArray, value, runWithSpan, isAsyncIteratorObject, overlayProxy, asyncIteratorWithSpan } from '@temporary-name/shared';
|
|
2
2
|
import { HibernationEventIterator, mapEventIterator } from '@temporary-name/standard-server';
|
|
3
3
|
import { safeDecodeAsync, safeEncodeAsync } from '@temporary-name/zod';
|
|
4
|
-
import { u as unlazy, B as BadRequestError, V as ValidationError, I as InternalServerError } from './server.
|
|
4
|
+
import { u as unlazy, B as BadRequestError, V as ValidationError, I as InternalServerError } from './server.Bx9JTGMu.mjs';
|
|
5
5
|
|
|
6
6
|
function mergeCurrentContext(context, other) {
|
|
7
7
|
return { ...context, ...other };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isObject, NullProtoObj, fallbackContractConfig, stringifyJSON, isAsyncIteratorObject, tryDecodeURIComponent, toHttpPath, runWithSpan, ORPC_NAME, asyncIteratorWithSpan, setSpanError } from '@temporary-name/shared';
|
|
2
|
-
import { e as encodeError, i as isAPIErrorStatus, s as standardizeHTTPPath, A as APIError, B as BadRequestError, t as toAPIError$1 } from './server.
|
|
3
|
-
import { c as createProcedureClient } from './server.
|
|
2
|
+
import { e as encodeError, i as isAPIErrorStatus, s as standardizeHTTPPath, A as APIError, B as BadRequestError, t as toAPIError$1 } from './server.Bx9JTGMu.mjs';
|
|
3
|
+
import { c as createProcedureClient } from './server.Bh0-Oy3H.mjs';
|
|
4
4
|
import { toAPIError, traverseContractProcedures, getLazyMeta, unlazy } from '@temporary-name/server';
|
|
5
5
|
import { mapEventIterator, ErrorEvent } from '@temporary-name/standard-server';
|
|
6
6
|
import { createRouter, addRoute, findRoute } from 'rou3';
|
|
@@ -240,11 +240,11 @@ class StandardOpenAPIMatcher {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
function
|
|
243
|
+
function throwOrLogError(message) {
|
|
244
244
|
if (process.env.NODE_ENV !== "production") {
|
|
245
|
-
throw
|
|
245
|
+
throw new Error(message);
|
|
246
246
|
} else {
|
|
247
|
-
console.error(
|
|
247
|
+
console.error(message);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
class StandardHandler {
|
|
@@ -309,15 +309,10 @@ class StandardHandler {
|
|
|
309
309
|
const isAPIError = e instanceof APIError;
|
|
310
310
|
if (isAPIError) {
|
|
311
311
|
if (!errorMap) {
|
|
312
|
-
|
|
313
|
-
new Error(`Got APIError but errorMap is undefined. APIError="{${e.message}"`, { cause: e })
|
|
314
|
-
);
|
|
312
|
+
throwOrLogError(`Got APIError but errorMap is undefined. APIError="{${e.message}"`);
|
|
315
313
|
} else if (!errorMap[e.constructor.name]) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
`APIError "${e.constructor.name}" (type "${e.constructor.type}") is not registered. Add it to your API with: baseApi.useErrors({ ${e.constructor.name} })`,
|
|
319
|
-
{ cause: e }
|
|
320
|
-
)
|
|
314
|
+
throwOrLogError(
|
|
315
|
+
`APIError "${e.constructor.name}" (type: "${e.constructor.type}") is not registered. Add it to your API with: baseApi.useErrors({ ${e.constructor.name} })`
|
|
321
316
|
);
|
|
322
317
|
}
|
|
323
318
|
}
|
|
@@ -110,6 +110,7 @@ function toAPIError(error) {
|
|
|
110
110
|
return error;
|
|
111
111
|
}
|
|
112
112
|
return new InternalServerError({
|
|
113
|
+
message: error instanceof Error ? error.message : void 0,
|
|
113
114
|
cause: error
|
|
114
115
|
});
|
|
115
116
|
}
|
|
@@ -117,7 +118,7 @@ function encodeError(error) {
|
|
|
117
118
|
return {
|
|
118
119
|
status: error.constructor.status,
|
|
119
120
|
headers: new Headers(),
|
|
120
|
-
body:
|
|
121
|
+
body: error.toJSON()
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporary-name/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.3-alpha.
|
|
4
|
+
"version": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.stainless.com/",
|
|
7
7
|
"repository": {
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"cookie": "^1.0.2",
|
|
57
57
|
"rou3": "^0.7.7",
|
|
58
58
|
"zod": "^4.1.12",
|
|
59
|
-
"@temporary-name/interop": "1.9.3-alpha.
|
|
60
|
-
"@temporary-name/
|
|
61
|
-
"@temporary-name/standard-server-aws-lambda": "1.9.3-alpha.
|
|
62
|
-
"@temporary-name/standard-server-fetch": "1.9.3-alpha.
|
|
63
|
-
"@temporary-name/
|
|
64
|
-
"@temporary-name/
|
|
65
|
-
"@temporary-name/
|
|
59
|
+
"@temporary-name/interop": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
60
|
+
"@temporary-name/shared": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
61
|
+
"@temporary-name/standard-server-aws-lambda": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
62
|
+
"@temporary-name/standard-server-fetch": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
63
|
+
"@temporary-name/standard-server-node": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
64
|
+
"@temporary-name/zod": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb",
|
|
65
|
+
"@temporary-name/standard-server": "1.9.3-alpha.6408adf6ff24635e82c4a1c41dc0dc377b14b7bb"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/supertest": "^6.0.3",
|