raindrop-ai 0.0.39 → 0.0.40
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/{chunk-45CPPW3B.mjs → chunk-LZEUWPOP.mjs} +16 -3
- package/dist/index.js +15 -3
- package/dist/index.mjs +2 -2
- package/dist/tracing/index.js +4 -26
- package/dist/tracing/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -100,6 +100,7 @@ var NonLiveInteraction = class {
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
// src/tracing/tracer-core.ts
|
|
103
|
+
var hasRealImplementation = false;
|
|
103
104
|
var createTracing = (analytics, _apiUrl, _writeKey, _options, isDebug = false) => ({
|
|
104
105
|
begin(traceContext) {
|
|
105
106
|
if (isDebug) {
|
|
@@ -124,10 +125,22 @@ var createTracing = (analytics, _apiUrl, _writeKey, _options, isDebug = false) =
|
|
|
124
125
|
close() {
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
|
-
var
|
|
128
|
-
var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) =>
|
|
128
|
+
var realImplementation = null;
|
|
129
|
+
var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) => {
|
|
130
|
+
if (hasRealImplementation && realImplementation) {
|
|
131
|
+
if (isDebug) {
|
|
132
|
+
console.log("Raindrop: Using real tracing implementation");
|
|
133
|
+
}
|
|
134
|
+
return realImplementation(analytics, apiUrl, writeKey, options, isDebug);
|
|
135
|
+
}
|
|
136
|
+
if (isDebug) {
|
|
137
|
+
console.log("Raindrop: Using stub implementation");
|
|
138
|
+
}
|
|
139
|
+
return createTracing(analytics, apiUrl, writeKey, options, isDebug);
|
|
140
|
+
};
|
|
129
141
|
var _setImplementation = (impl) => {
|
|
130
|
-
|
|
142
|
+
realImplementation = impl;
|
|
143
|
+
hasRealImplementation = true;
|
|
131
144
|
};
|
|
132
145
|
|
|
133
146
|
export {
|
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.
|
|
110
|
+
version: "0.0.40",
|
|
111
111
|
main: "dist/index.js",
|
|
112
112
|
module: "dist/index.mjs",
|
|
113
113
|
types: "dist/index.d.ts",
|
|
@@ -363,6 +363,7 @@ var NonLiveInteraction = class {
|
|
|
363
363
|
};
|
|
364
364
|
|
|
365
365
|
// src/tracing/tracer-core.ts
|
|
366
|
+
var hasRealImplementation = false;
|
|
366
367
|
var createTracing = (analytics, _apiUrl, _writeKey, _options, isDebug = false) => ({
|
|
367
368
|
begin(traceContext) {
|
|
368
369
|
if (isDebug) {
|
|
@@ -387,8 +388,19 @@ var createTracing = (analytics, _apiUrl, _writeKey, _options, isDebug = false) =
|
|
|
387
388
|
close() {
|
|
388
389
|
}
|
|
389
390
|
});
|
|
390
|
-
var
|
|
391
|
-
var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) =>
|
|
391
|
+
var realImplementation = null;
|
|
392
|
+
var tracing = (analytics, apiUrl, writeKey, options, isDebug = false) => {
|
|
393
|
+
if (hasRealImplementation && realImplementation) {
|
|
394
|
+
if (isDebug) {
|
|
395
|
+
console.log("Raindrop: Using real tracing implementation");
|
|
396
|
+
}
|
|
397
|
+
return realImplementation(analytics, apiUrl, writeKey, options, isDebug);
|
|
398
|
+
}
|
|
399
|
+
if (isDebug) {
|
|
400
|
+
console.log("Raindrop: Using stub implementation");
|
|
401
|
+
}
|
|
402
|
+
return createTracing(analytics, apiUrl, writeKey, options, isDebug);
|
|
403
|
+
};
|
|
392
404
|
|
|
393
405
|
// src/types.ts
|
|
394
406
|
var import_zod2 = require("zod");
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tracing
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LZEUWPOP.mjs";
|
|
4
4
|
|
|
5
5
|
// ../schemas/src/ingest/index.ts
|
|
6
6
|
import { z } from "zod";
|
|
@@ -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.
|
|
86
|
+
version: "0.0.40",
|
|
87
87
|
main: "dist/index.js",
|
|
88
88
|
module: "dist/index.mjs",
|
|
89
89
|
types: "dist/index.d.ts",
|
package/dist/tracing/index.js
CHANGED
|
@@ -238,33 +238,11 @@ var NonLiveInteraction = class {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
// src/tracing/tracer-core.ts
|
|
241
|
-
var
|
|
242
|
-
|
|
243
|
-
if (isDebug) {
|
|
244
|
-
console.log("not using traces");
|
|
245
|
-
}
|
|
246
|
-
if (!traceContext.eventId) {
|
|
247
|
-
traceContext.eventId = crypto.randomUUID();
|
|
248
|
-
}
|
|
249
|
-
analytics._trackAiPartial({
|
|
250
|
-
...traceContext
|
|
251
|
-
});
|
|
252
|
-
return new NonLiveInteraction(
|
|
253
|
-
traceContext,
|
|
254
|
-
void 0,
|
|
255
|
-
// No traceId in stub
|
|
256
|
-
analytics
|
|
257
|
-
);
|
|
258
|
-
},
|
|
259
|
-
getActiveInteraction(eventId) {
|
|
260
|
-
return new NonLiveInteraction({ eventId }, void 0, analytics);
|
|
261
|
-
},
|
|
262
|
-
close() {
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
var implementation = createTracing;
|
|
241
|
+
var hasRealImplementation = false;
|
|
242
|
+
var realImplementation = null;
|
|
266
243
|
var _setImplementation = (impl) => {
|
|
267
|
-
|
|
244
|
+
realImplementation = impl;
|
|
245
|
+
hasRealImplementation = true;
|
|
268
246
|
};
|
|
269
247
|
|
|
270
248
|
// src/tracing/index.ts
|
package/dist/tracing/index.mjs
CHANGED