vedatrace 0.1.5 → 0.1.7

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/index.cjs CHANGED
@@ -74,7 +74,7 @@ class VedaTraceBatcher {
74
74
  this.flush();
75
75
  }
76
76
  }, this.config.flushInterval);
77
- if (this.config.unrefTimer !== false) {
77
+ if (this.config.unrefTimer === true) {
78
78
  this.flushTimer.unref();
79
79
  }
80
80
  }
@@ -105,7 +105,7 @@ class VedaTraceLogger {
105
105
  this.config = {
106
106
  service: config.service,
107
107
  apiKey: config.apiKey,
108
- endpoint: config.endpoint ?? "https://api.vedatrace.io/v1/logs",
108
+ endpoint: config.endpoint ?? "https://ingest.vedatrace.dev/v1/logs",
109
109
  environment: config.environment,
110
110
  batchSize: config.batchSize ?? 100,
111
111
  flushInterval: config.flushInterval ?? 5e3,
@@ -114,7 +114,8 @@ class VedaTraceLogger {
114
114
  onError: config.onError,
115
115
  onSuccess: config.onSuccess,
116
116
  debug: config.debug ?? false,
117
- immediateFlush: config.immediateFlush ?? false
117
+ immediateFlush: config.immediateFlush ?? false,
118
+ unrefTimer: config.unrefTimer
118
119
  };
119
120
  if (!config.disabled) {
120
121
  this.initializeBatcher(config);
@@ -131,7 +132,8 @@ class VedaTraceLogger {
131
132
  batchSize: this.config.batchSize,
132
133
  flushInterval: this.config.flushInterval,
133
134
  maxRetries: this.config.maxRetries,
134
- retryDelay: this.config.retryDelay
135
+ retryDelay: this.config.retryDelay,
136
+ unrefTimer: this.config.unrefTimer
135
137
  },
136
138
  this.config.onError,
137
139
  this.config.onSuccess,
@@ -319,7 +321,8 @@ function vedatrace(config = {}) {
319
321
  batchSize: config.batchSize ?? 100,
320
322
  flushInterval: config.flushInterval ?? 1e3,
321
323
  maxRetries: config.maxRetries ?? 3,
322
- retryDelay: config.retryDelay ?? 1e3
324
+ retryDelay: config.retryDelay ?? 1e3,
325
+ unrefTimer: config.unrefTimer
323
326
  },
324
327
  config.onError,
325
328
  config.onSuccess
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { b as VedaTraceTransport, B as BatcherConfig, I as InternalLogEntry, V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata, R as RedactionConfig } from './types-CGtcllp9.cjs';
2
- export { c as VedaTraceLevel, d as VedaTraceLog } from './types-CGtcllp9.cjs';
1
+ import { b as VedaTraceTransport, B as BatcherConfig, I as InternalLogEntry, V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata, R as RedactionConfig } from './types-CcdFb-vY.cjs';
2
+ export { c as VedaTraceLevel, d as VedaTraceLog } from './types-CcdFb-vY.cjs';
3
3
  export { ConsoleFormat, ConsoleTransportConfig, HttpTransportConfig, VedaTraceConsoleTransport, VedaTraceHttpTransport } from './transports/index.cjs';
4
4
 
5
5
  /**
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { b as VedaTraceTransport, B as BatcherConfig, I as InternalLogEntry, V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata, R as RedactionConfig } from './types-CGtcllp9.mjs';
2
- export { c as VedaTraceLevel, d as VedaTraceLog } from './types-CGtcllp9.mjs';
1
+ import { b as VedaTraceTransport, B as BatcherConfig, I as InternalLogEntry, V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata, R as RedactionConfig } from './types-CcdFb-vY.mjs';
2
+ export { c as VedaTraceLevel, d as VedaTraceLog } from './types-CcdFb-vY.mjs';
3
3
  export { ConsoleFormat, ConsoleTransportConfig, HttpTransportConfig, VedaTraceConsoleTransport, VedaTraceHttpTransport } from './transports/index.mjs';
4
4
 
5
5
  /**
package/dist/index.mjs CHANGED
@@ -70,7 +70,7 @@ class VedaTraceBatcher {
70
70
  this.flush();
71
71
  }
72
72
  }, this.config.flushInterval);
73
- if (this.config.unrefTimer !== false) {
73
+ if (this.config.unrefTimer === true) {
74
74
  this.flushTimer.unref();
75
75
  }
76
76
  }
@@ -101,7 +101,7 @@ class VedaTraceLogger {
101
101
  this.config = {
102
102
  service: config.service,
103
103
  apiKey: config.apiKey,
104
- endpoint: config.endpoint ?? "https://api.vedatrace.io/v1/logs",
104
+ endpoint: config.endpoint ?? "https://ingest.vedatrace.dev/v1/logs",
105
105
  environment: config.environment,
106
106
  batchSize: config.batchSize ?? 100,
107
107
  flushInterval: config.flushInterval ?? 5e3,
@@ -110,7 +110,8 @@ class VedaTraceLogger {
110
110
  onError: config.onError,
111
111
  onSuccess: config.onSuccess,
112
112
  debug: config.debug ?? false,
113
- immediateFlush: config.immediateFlush ?? false
113
+ immediateFlush: config.immediateFlush ?? false,
114
+ unrefTimer: config.unrefTimer
114
115
  };
115
116
  if (!config.disabled) {
116
117
  this.initializeBatcher(config);
@@ -127,7 +128,8 @@ class VedaTraceLogger {
127
128
  batchSize: this.config.batchSize,
128
129
  flushInterval: this.config.flushInterval,
129
130
  maxRetries: this.config.maxRetries,
130
- retryDelay: this.config.retryDelay
131
+ retryDelay: this.config.retryDelay,
132
+ unrefTimer: this.config.unrefTimer
131
133
  },
132
134
  this.config.onError,
133
135
  this.config.onSuccess,
@@ -315,7 +317,8 @@ function vedatrace(config = {}) {
315
317
  batchSize: config.batchSize ?? 100,
316
318
  flushInterval: config.flushInterval ?? 1e3,
317
319
  maxRetries: config.maxRetries ?? 3,
318
- retryDelay: config.retryDelay ?? 1e3
320
+ retryDelay: config.retryDelay ?? 1e3,
321
+ unrefTimer: config.unrefTimer
319
322
  },
320
323
  config.onError,
321
324
  config.onSuccess
@@ -1,5 +1,5 @@
1
1
  import { Request, Response, NextFunction } from 'express';
2
- import { V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata } from '../types-CGtcllp9.cjs';
2
+ import { V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata } from '../types-CcdFb-vY.cjs';
3
3
 
4
4
  /**
5
5
  * Express.js middleware integration for VedaTrace
@@ -1,5 +1,5 @@
1
1
  import { Request, Response, NextFunction } from 'express';
2
- import { V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata } from '../types-CGtcllp9.mjs';
2
+ import { V as VedaTraceLoggerInterface, a as VedaTraceConfig, L as LogMetadata } from '../types-CcdFb-vY.mjs';
3
3
 
4
4
  /**
5
5
  * Express.js middleware integration for VedaTrace
@@ -1,4 +1,4 @@
1
- import { a as VedaTraceConfig, L as LogMetadata, V as VedaTraceLoggerInterface } from '../types-CGtcllp9.cjs';
1
+ import { a as VedaTraceConfig, L as LogMetadata, V as VedaTraceLoggerInterface } from '../types-CcdFb-vY.cjs';
2
2
 
3
3
  /**
4
4
  * Next.js integration for VedaTrace
@@ -1,4 +1,4 @@
1
- import { a as VedaTraceConfig, L as LogMetadata, V as VedaTraceLoggerInterface } from '../types-CGtcllp9.mjs';
1
+ import { a as VedaTraceConfig, L as LogMetadata, V as VedaTraceLoggerInterface } from '../types-CcdFb-vY.mjs';
2
2
 
3
3
  /**
4
4
  * Next.js integration for VedaTrace
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
- import { a as VedaTraceConfig, V as VedaTraceLoggerInterface, L as LogMetadata } from '../types-CGtcllp9.cjs';
2
+ import { a as VedaTraceConfig, V as VedaTraceLoggerInterface, L as LogMetadata } from '../types-CcdFb-vY.cjs';
3
3
 
4
4
  /**
5
5
  * React integration for VedaTrace
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
- import { a as VedaTraceConfig, V as VedaTraceLoggerInterface, L as LogMetadata } from '../types-CGtcllp9.mjs';
2
+ import { a as VedaTraceConfig, V as VedaTraceLoggerInterface, L as LogMetadata } from '../types-CcdFb-vY.mjs';
3
3
 
4
4
  /**
5
5
  * React integration for VedaTrace
@@ -84,7 +84,7 @@ class VedaTraceHttpTransport {
84
84
  headers;
85
85
  constructor(config) {
86
86
  this.apiKey = config.apiKey;
87
- this.endpoint = config.endpoint ?? "https://api.vedatrace.io/v1/logs";
87
+ this.endpoint = config.endpoint ?? "https://ingest.vedatrace.dev/v1/logs";
88
88
  this.timeout = config.timeout ?? 3e4;
89
89
  this.headers = config.headers ?? {};
90
90
  }
@@ -1,4 +1,4 @@
1
- import { c as VedaTraceLevel, b as VedaTraceTransport, I as InternalLogEntry } from '../types-CGtcllp9.cjs';
1
+ import { c as VedaTraceLevel, b as VedaTraceTransport, I as InternalLogEntry } from '../types-CcdFb-vY.cjs';
2
2
 
3
3
  /**
4
4
  * Console transport for development/debugging
@@ -1,4 +1,4 @@
1
- import { c as VedaTraceLevel, b as VedaTraceTransport, I as InternalLogEntry } from '../types-CGtcllp9.mjs';
1
+ import { c as VedaTraceLevel, b as VedaTraceTransport, I as InternalLogEntry } from '../types-CcdFb-vY.mjs';
2
2
 
3
3
  /**
4
4
  * Console transport for development/debugging
@@ -82,7 +82,7 @@ class VedaTraceHttpTransport {
82
82
  headers;
83
83
  constructor(config) {
84
84
  this.apiKey = config.apiKey;
85
- this.endpoint = config.endpoint ?? "https://api.vedatrace.io/v1/logs";
85
+ this.endpoint = config.endpoint ?? "https://ingest.vedatrace.dev/v1/logs";
86
86
  this.timeout = config.timeout ?? 3e4;
87
87
  this.headers = config.headers ?? {};
88
88
  }
@@ -49,6 +49,8 @@ interface VedaTraceConfig {
49
49
  debug?: boolean;
50
50
  /** Flush immediately after each log (for console/dev mode) */
51
51
  immediateFlush?: boolean;
52
+ /** Unref the flush timer (Node.js only, default: false) */
53
+ unrefTimer?: boolean;
52
54
  }
53
55
  /** Redaction configuration */
54
56
  interface RedactionConfig {
@@ -49,6 +49,8 @@ interface VedaTraceConfig {
49
49
  debug?: boolean;
50
50
  /** Flush immediately after each log (for console/dev mode) */
51
51
  immediateFlush?: boolean;
52
+ /** Unref the flush timer (Node.js only, default: false) */
53
+ unrefTimer?: boolean;
52
54
  }
53
55
  /** Redaction configuration */
54
56
  interface RedactionConfig {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vedatrace",
3
3
  "description": "Universal JavaScript logging SDK for VedaTrace - type-safe, lightweight, and developer-friendly",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "scripts": {
6
6
  "setup": "rm -rf node_modules && npm i && git init && husky",
7
7
  "prepublishOnly": "npm run build",