@orpc/node 2.0.0-beta.33 → 2.0.0-beta.35

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/README.md CHANGED
@@ -55,20 +55,20 @@ You can read the documentation [here](https://orpc.dev).
55
55
 
56
56
  **Framework & ecosystem integrations**
57
57
 
58
- | Package | Purpose | Docs |
59
- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
- | [@orpc/next](https://www.npmjs.com/package/@orpc/next) | Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data). | [Next.js](https://orpc.dev/docs/integrations/next) |
61
- | [@orpc/ai-sdk](https://www.npmjs.com/package/@orpc/ai-sdk) | Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools. | [AI SDK](https://orpc.dev/docs/integrations/ai-sdk) |
62
- | [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query) | Integrate with [TanStack Query](https://tanstack.com/query/latest). | [TanStack Query](https://orpc.dev/docs/integrations/tanstack-query) |
63
- | [@orpc/pinia-colada](https://www.npmjs.com/package/@orpc/pinia-colada) | Integrate with [Pinia Colada](https://pinia-colada.esm.dev/). | [Pinia Colada](https://orpc.dev/docs/integrations/pinia-colada) |
64
- | [@orpc/swr](https://www.npmjs.com/package/@orpc/swr) | Integrate with [SWR](https://swr.vercel.app/). | [SWR](https://orpc.dev/docs/integrations/swr) |
65
- | [@orpc/experimental-msw](https://www.npmjs.com/package/@orpc/experimental-msw) | Mock procedures with [Mock Service Worker](https://mswjs.io/). | [MSW](https://orpc.dev/docs/integrations/msw) |
66
- | [@orpc/experimental-effect](https://www.npmjs.com/package/@orpc/experimental-effect) | Integrate with [Effect](https://effect.website/). | [Effect](https://orpc.dev/docs/integrations/effect) |
67
- | [@orpc/nest](https://www.npmjs.com/package/@orpc/nest) | Implement your contract with [NestJS](https://nestjs.com/). | [NestJS](https://orpc.dev/docs/integrations/nest) |
68
- | [@orpc/node](https://www.npmjs.com/package/@orpc/node) | [Node.js](https://nodejs.org/) plugins for static file serving and large uploads. | [Static File](https://orpc.dev/docs/plugins/static-file), [Tmp File Upload](https://orpc.dev/docs/plugins/tmp-file-upload), [Batch Response Compression](https://orpc.dev/docs/plugins/batch-response-compression) |
69
- | [@orpc/bun](https://www.npmjs.com/package/@orpc/bun) | Adapters for [Bun's Redis](https://bun.sh/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
70
- | [@orpc/cloudflare](https://www.npmjs.com/package/@orpc/cloudflare) | Adapters for [Cloudflare's RateLimit and Durable Objects](https://developers.cloudflare.com/workers/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
71
- | [@orpc/trpc](https://www.npmjs.com/package/@orpc/trpc) | Reuse existing [tRPC](https://trpc.io/) routers within oRPC. | [tRPC](https://orpc.dev/docs/integrations/trpc) |
58
+ | Package | Purpose | Docs |
59
+ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
+ | [@orpc/next](https://www.npmjs.com/package/@orpc/next) | Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data). | [Next.js](https://orpc.dev/docs/integrations/next) |
61
+ | [@orpc/ai-sdk](https://www.npmjs.com/package/@orpc/ai-sdk) | Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools. | [AI SDK](https://orpc.dev/docs/integrations/ai-sdk) |
62
+ | [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query) | Integrate with [TanStack Query](https://tanstack.com/query/latest). | [TanStack Query](https://orpc.dev/docs/integrations/tanstack-query) |
63
+ | [@orpc/pinia-colada](https://www.npmjs.com/package/@orpc/pinia-colada) | Integrate with [Pinia Colada](https://pinia-colada.esm.dev/). | [Pinia Colada](https://orpc.dev/docs/integrations/pinia-colada) |
64
+ | [@orpc/swr](https://www.npmjs.com/package/@orpc/swr) | Integrate with [SWR](https://swr.vercel.app/). | [SWR](https://orpc.dev/docs/integrations/swr) |
65
+ | [@orpc/experimental-msw](https://www.npmjs.com/package/@orpc/experimental-msw) | Mock procedures with [Mock Service Worker](https://mswjs.io/). | [MSW](https://orpc.dev/docs/integrations/msw) |
66
+ | [@orpc/experimental-effect](https://www.npmjs.com/package/@orpc/experimental-effect) | Integrate with [Effect](https://effect.website/). | [Effect](https://orpc.dev/docs/integrations/effect) |
67
+ | [@orpc/nest](https://www.npmjs.com/package/@orpc/nest) | Implement your contract with [NestJS](https://nestjs.com/). | [NestJS](https://orpc.dev/docs/integrations/nest) |
68
+ | [@orpc/node](https://www.npmjs.com/package/@orpc/node) | [Node.js](https://nodejs.org/) plugins for static file serving and large uploads. | [Static File](https://orpc.dev/docs/plugins/static-file), [Tmp File Upload](https://orpc.dev/docs/plugins/tmp-file-upload), [Batch Response Compression](https://orpc.dev/docs/plugins/batch-response-compression) |
69
+ | [@orpc/bun](https://www.npmjs.com/package/@orpc/bun) | Adapters for [Bun's Redis](https://bun.sh/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit) |
70
+ | [@orpc/cloudflare](https://www.npmjs.com/package/@orpc/cloudflare) | Adapters for [Cloudflare Workers](https://developers.cloudflare.com/workers/). | [Publisher](https://orpc.dev/docs/helpers/publisher), [Rate Limit](https://orpc.dev/docs/helpers/ratelimit), [Traces](https://orpc.dev/docs/integrations/cloudflare-traces) |
71
+ | [@orpc/trpc](https://www.npmjs.com/package/@orpc/trpc) | Reuse existing [tRPC](https://trpc.io/) routers within oRPC. | [tRPC](https://orpc.dev/docs/integrations/trpc) |
72
72
 
73
73
  **Observability**
74
74
 
@@ -127,6 +127,7 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
127
127
  <td align="center"><a href="https://github.com/ellis-driscoll?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Ellis Driscoll"><img src="https://avatars.githubusercontent.com/u/70685966?u=c5f95bc33b5991d9744abe00052542e4a2ed3cb9&amp;v=4" width="139" alt="Ellis Driscoll"/><br />Ellis Driscoll</a></td>
128
128
  <td align="center"><a href="https://github.com/hoangbn?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Hoang Nguyen"><img src="https://avatars.githubusercontent.com/u/38968280?u=c90084c6de65c56facabab7ba13a72a49ddbc3e4&amp;v=4" width="139" alt="Hoang Nguyen"/><br />Hoang Nguyen</a></td>
129
129
  <td align="center"><a href="https://opencollective.com/guest-ac41de3b?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Orestis Ioannou"><img src="https://images.opencollective.com/guest-ac41de3b/avatar/460.png" width="139" alt="Orestis Ioannou"/><br />Orestis Ioannou</a></td>
130
+ <td align="center"><a href="https://automatio.ai/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Stefan Smiljkovic"><img src="https://avatars.githubusercontent.com/u/1984909?u=b7bf5bc40ed49df3c22f69d2da7b8d78709c49ed&amp;v=4" width="139" alt="Stefan Smiljkovic"/><br />Stefan Smiljkovic</a></td>
130
131
  </tr>
131
132
  </table>
132
133
 
package/dist/index.d.mts CHANGED
@@ -126,7 +126,7 @@ interface StaticFileHandlerPluginOptions {
126
126
  declare class StaticFileHandlerPlugin<T extends Context> implements StandardHandlerPlugin<T> {
127
127
  name: string;
128
128
  /**
129
- * Ensure the OpenTelemetry span is available when the interceptor renames it.
129
+ * Ensure the request span is available when the interceptor renames it.
130
130
  */
131
131
  after: string[];
132
132
  private readonly rootDir;
package/dist/index.d.ts CHANGED
@@ -126,7 +126,7 @@ interface StaticFileHandlerPluginOptions {
126
126
  declare class StaticFileHandlerPlugin<T extends Context> implements StandardHandlerPlugin<T> {
127
127
  name: string;
128
128
  /**
129
- * Ensure the OpenTelemetry span is available when the interceptor renames it.
129
+ * Ensure the request span is available when the interceptor renames it.
130
130
  */
131
131
  after: string[];
132
132
  private readonly rootDir;
package/dist/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  import { Duplex } from 'node:stream';
2
2
  import { constants, createGzip, createDeflate, createDeflateRaw } from 'node:zlib';
3
- import { toArray, isNoTransformCacheControl, parseAcceptEncodingQualities, stringifyJSON, varyByAcceptEncoding, mergeHttpPath, tryDecodeURIComponent, matchesHttpPathPrefix, isCompressibleContentType, getOpenTelemetryConfig, value, isAsyncIteratorObject, override, wrapAsyncIterator, wrapReadableStream } from '@orpc/shared';
4
- import { flattenStandardHeader, parseStandardUrl, resolveStandardBodyHint, getFilenameFromContentDisposition } from '@standardserver/core';
3
+ import { toArray, isNoTransformCacheControl, parseAcceptEncodingQualities, stringifyJSON, varyByAcceptEncoding, mergeHttpPath, tryDecodeURIComponent, matchesHttpPathPrefix, isCompressibleContentType, getTracer, value, isAsyncIteratorObject, override, wrapAsyncIterator, wrapReadableStream } from '@orpc/shared';
4
+ import { flattenStandardHeader, parseStandardUrl, resolveStandardBodyHint, getFilenameFromContentDisposition } from '@standard-server/core';
5
5
  import { createReadStream, openAsBlob } from 'node:fs';
6
6
  import { realpath, stat, mkdtemp, appendFile, rm } from 'node:fs/promises';
7
7
  import path from 'node:path';
8
- import { toWebReadableStream } from '@standardserver/node';
8
+ import { toWebReadableStream } from '@standard-server/node';
9
9
  import mime from 'mime';
10
10
  import { Buffer } from 'node:buffer';
11
11
  import { tmpdir } from 'node:os';
12
12
  import { ORPCError } from '@orpc/server';
13
- import { toFetchHeaders, toStandardBody } from '@standardserver/fetch';
13
+ import { toFetchHeaders, toStandardBody } from '@standard-server/fetch';
14
14
 
15
15
  class BatchResponseCompressionHandlerPlugin {
16
16
  name = "~batch-response-compression";
@@ -128,9 +128,9 @@ const PRECOMPRESSED_ENCODINGS = [
128
128
  class StaticFileHandlerPlugin {
129
129
  name = "~static-file";
130
130
  /**
131
- * Ensure the OpenTelemetry span is available when the interceptor renames it.
131
+ * Ensure the request span is available when the interceptor renames it.
132
132
  */
133
- after = ["~opentelemetry"];
133
+ after = ["~tracing"];
134
134
  rootDir;
135
135
  /** `rootDir` with a trailing separator, precomputed for the lexical containment check. */
136
136
  rootDirPrefix;
@@ -172,7 +172,7 @@ class StaticFileHandlerPlugin {
172
172
  if (response === void 0) {
173
173
  return result;
174
174
  }
175
- getOpenTelemetryConfig()?.trace.getActiveSpan()?.updateName(`${request.method} ${base === "/" ? "" : base}/* (static file)`);
175
+ getTracer()?.getActiveSpan()?.updateName(`${request.method} ${base === "/" ? "" : base}/* (static file)`);
176
176
  return { matched: true, response };
177
177
  };
178
178
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/node",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.33",
4
+ "version": "2.0.0-beta.35",
5
5
  "description": "Node.js plugins for oRPC: static file serving, temporary file uploads, and batch response compression",
6
6
  "license": "MIT",
7
7
  "funding": [
@@ -36,15 +36,15 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@orpc/server": "2.0.0-beta.33",
40
- "@orpc/shared": "2.0.0-beta.33",
41
- "@standardserver/core": "^0.8.3",
42
- "@standardserver/fetch": "^0.8.3",
43
- "@standardserver/node": "^0.8.3",
39
+ "@orpc/server": "2.0.0-beta.35",
40
+ "@orpc/shared": "2.0.0-beta.35",
41
+ "@standard-server/core": "~0.9.0",
42
+ "@standard-server/fetch": "~0.9.0",
43
+ "@standard-server/node": "~0.9.0",
44
44
  "mime": "^4.1.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@orpc/client": "2.0.0-beta.33",
47
+ "@orpc/client": "2.0.0-beta.35",
48
48
  "supertest": "^7.2.2"
49
49
  },
50
50
  "scripts": {