owlservable 0.2.5 → 0.2.6

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 (3) hide show
  1. package/index.cjs +2 -2
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -200,8 +200,8 @@ function patchHttpModule(mod, protocol) {
200
200
  const ct = res.headers['content-type'] || ''
201
201
  const isJson = ct.includes('application/json')
202
202
  const isSse = ct.includes('text/event-stream')
203
- const r = addRequest({ url, method: method.toUpperCase(), status: res.statusCode, latency: Date.now() - start, reqBody, metaPending: isJson || isSse })
204
- if (r && (isJson || isSse)) {
203
+ const r = addRequest({ url, method: method.toUpperCase(), status: res.statusCode, latency: Date.now() - start, reqBody, metaPending: isJson })
204
+ if (r && isJson) {
205
205
  try {
206
206
  const chunks = []; let size = 0
207
207
  res.on('data', chunk => { try { if (size < MAX_PARSE) { chunks.push(chunk); size += chunk.length } } catch (_) {} })
package/index.js CHANGED
@@ -200,8 +200,8 @@ function patchHttpModule(mod, protocol) {
200
200
  const ct = res.headers['content-type'] || ''
201
201
  const isJson = ct.includes('application/json')
202
202
  const isSse = ct.includes('text/event-stream')
203
- const r = addRequest({ url, method: method.toUpperCase(), status: res.statusCode, latency: Date.now() - start, reqBody, metaPending: isJson || isSse })
204
- if (r && (isJson || isSse)) {
203
+ const r = addRequest({ url, method: method.toUpperCase(), status: res.statusCode, latency: Date.now() - start, reqBody, metaPending: isJson })
204
+ if (r && isJson) {
205
205
  try {
206
206
  const chunks = []; let size = 0
207
207
  res.on('data', chunk => { try { if (size < MAX_PARSE) { chunks.push(chunk); size += chunk.length } } catch (_) {} })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owlservable",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Minimalist Observability Platform. Zero config, zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "index.js",