@nxtedition/lib 21.0.10 → 21.0.12

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/deepstream.js CHANGED
@@ -41,9 +41,9 @@ function provide(ds, domain, callback, options) {
41
41
  if (options.id === true) {
42
42
  idExpr = '[^}]:'
43
43
  } else if (options.id === false) {
44
- idExpr = '[}]:'
44
+ idExpr = '(?:^|[}]:)'
45
45
  } else {
46
- idExpr = ':'
46
+ idExpr = '(?:^|.+:)'
47
47
  }
48
48
 
49
49
  return ds.record.provide(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "21.0.10",
3
+ "version": "21.0.12",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
package/trace.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { threadId } from 'node:worker_threads'
1
2
  import { Pool } from 'undici'
2
3
  import fp from 'lodash/fp.js'
3
4
 
@@ -94,7 +95,8 @@ export function makeTrace({
94
95
  } else {
95
96
  const doc = (typeof obj === 'string' ? obj : stringify(obj)).slice(1, -1)
96
97
  traceData +=
97
- prefix + `${op}", "traceId": ${genTraceId()}, "@timestamp": ${Date.now()}, ${doc} }\n`
98
+ prefix +
99
+ `${op}", "pid": ${process.pid}, "tid": ${threadId}, "traceId": ${genTraceId()}, "@timestamp": ${Date.now()}, ${doc} }\n`
98
100
  if (traceData.length > batch) {
99
101
  flushTraces()
100
102
  }