raindrop-ai 0.0.37 → 0.0.39

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.js CHANGED
@@ -107,7 +107,7 @@ var CategorizationRequestSchema = import_zod.z.object({
107
107
  // package.json
108
108
  var package_default = {
109
109
  name: "raindrop-ai",
110
- version: "0.0.37",
110
+ version: "0.0.39",
111
111
  main: "dist/index.js",
112
112
  module: "dist/index.mjs",
113
113
  types: "dist/index.d.ts",
@@ -442,6 +442,9 @@ var Raindrop = class {
442
442
  this.debugLogs = (_d = config.debugLogs) != null ? _d : false;
443
443
  this.redactPii = (_e = config.redactPii) != null ? _e : false;
444
444
  this.context = this.getContext();
445
+ if (this.debugLogs) {
446
+ process.env.RAINDROP_DEBUG = "true";
447
+ }
445
448
  const url = new URL(this.apiUrl);
446
449
  this._tracing = tracing(
447
450
  this,
package/dist/index.mjs CHANGED
@@ -83,7 +83,7 @@ var CategorizationRequestSchema = z.object({
83
83
  // package.json
84
84
  var package_default = {
85
85
  name: "raindrop-ai",
86
- version: "0.0.37",
86
+ version: "0.0.39",
87
87
  main: "dist/index.js",
88
88
  module: "dist/index.mjs",
89
89
  types: "dist/index.d.ts",
@@ -291,6 +291,9 @@ var Raindrop = class {
291
291
  this.debugLogs = (_d = config.debugLogs) != null ? _d : false;
292
292
  this.redactPii = (_e = config.redactPii) != null ? _e : false;
293
293
  this.context = this.getContext();
294
+ if (this.debugLogs) {
295
+ process.env.RAINDROP_DEBUG = "true";
296
+ }
294
297
  const url = new URL(this.apiUrl);
295
298
  this._tracing = tracing(
296
299
  this,
@@ -315,6 +315,16 @@ var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) => {
315
315
  }
316
316
  };
317
317
  };
318
+ try {
319
+ _setImplementation(tracing);
320
+ if (typeof process !== "undefined" && process.env.RAINDROP_DEBUG === "true") {
321
+ console.log("Raindrop: Auto-initialized tracing");
322
+ }
323
+ } catch (e) {
324
+ if (typeof process !== "undefined" && process.env.RAINDROP_DEBUG === "true") {
325
+ console.error("Raindrop: Failed to auto-initialize tracing:", e);
326
+ }
327
+ }
318
328
  function initTracing() {
319
329
  _setImplementation(tracing);
320
330
  }
@@ -156,6 +156,16 @@ var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) => {
156
156
  }
157
157
  };
158
158
  };
159
+ try {
160
+ _setImplementation(tracing);
161
+ if (typeof process !== "undefined" && process.env.RAINDROP_DEBUG === "true") {
162
+ console.log("Raindrop: Auto-initialized tracing");
163
+ }
164
+ } catch (e) {
165
+ if (typeof process !== "undefined" && process.env.RAINDROP_DEBUG === "true") {
166
+ console.error("Raindrop: Failed to auto-initialize tracing:", e);
167
+ }
168
+ }
159
169
  function initTracing() {
160
170
  _setImplementation(tracing);
161
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raindrop-ai",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",