@orpc/experimental-pino 0.0.0-next.8606faa → 0.0.0-next.8dab177

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -3
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { mapEventIterator } from '@orpc/client';
2
- import { isAsyncIteratorObject, overlayProxy } from '@orpc/shared';
2
+ import { ORPC_NAME, isAsyncIteratorObject, overlayProxy } from '@orpc/shared';
3
3
  import pino from 'pino';
4
4
 
5
5
  const CONTEXT_LOGGER_SYMBOL = Symbol("ORPC_PINO_CONTEXT_LOGGER_SYMBOL");
@@ -24,7 +24,7 @@ class LoggingHandlerPlugin {
24
24
  options.clientInterceptors ??= [];
25
25
  options.rootInterceptors.unshift(async (interceptorOptions) => {
26
26
  const logger = (interceptorOptions.context[CONTEXT_LOGGER_SYMBOL] ?? this.logger).child({
27
- orpc: { id: this.generateId(interceptorOptions) }
27
+ rpc: { id: this.generateId(interceptorOptions), system: ORPC_NAME }
28
28
  });
29
29
  if (!logger.bindings().req) {
30
30
  logger.setBindings({
@@ -93,7 +93,7 @@ class LoggingHandlerPlugin {
93
93
  });
94
94
  options.clientInterceptors.unshift(async ({ next, path, context, signal }) => {
95
95
  const logger = getLogger(context);
96
- logger?.setBindings({ orpc: { ...logger.bindings().orpc, path } });
96
+ logger?.setBindings({ rpc: { ...logger.bindings().rpc, method: path.join(".") } });
97
97
  const output = await next();
98
98
  if (isAsyncIteratorObject(output)) {
99
99
  return overlayProxy(output, mapEventIterator(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/experimental-pino",
3
3
  "type": "module",
4
- "version": "0.0.0-next.8606faa",
4
+ "version": "0.0.0-next.8dab177",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -27,9 +27,9 @@
27
27
  "pino": ">=10.1.0"
28
28
  },
29
29
  "dependencies": {
30
- "@orpc/client": "0.0.0-next.8606faa",
31
- "@orpc/server": "0.0.0-next.8606faa",
32
- "@orpc/shared": "0.0.0-next.8606faa"
30
+ "@orpc/client": "0.0.0-next.8dab177",
31
+ "@orpc/server": "0.0.0-next.8dab177",
32
+ "@orpc/shared": "0.0.0-next.8dab177"
33
33
  },
34
34
  "devDependencies": {
35
35
  "pino": "^10.1.0"