raindrop-ai 0.0.67 → 0.0.68-otelv2
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 +10 -4
- package/dist/index.mjs +10 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -128,7 +128,7 @@ var CategorizationRequestSchema = import_zod.z.object({
|
|
|
128
128
|
// package.json
|
|
129
129
|
var package_default = {
|
|
130
130
|
name: "raindrop-ai",
|
|
131
|
-
version: "0.0.
|
|
131
|
+
version: "0.0.68",
|
|
132
132
|
main: "dist/index.js",
|
|
133
133
|
module: "dist/index.mjs",
|
|
134
134
|
types: "dist/index.d.ts",
|
|
@@ -921,13 +921,15 @@ var Raindrop = class {
|
|
|
921
921
|
* Deeply merges properties of the source object into the target object.
|
|
922
922
|
* Modifies the target object in place. Handles nested plain objects.
|
|
923
923
|
*/
|
|
924
|
-
deepMergeObjects(target, source) {
|
|
924
|
+
deepMergeObjects(target, source, options) {
|
|
925
925
|
for (const key in source) {
|
|
926
926
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
927
927
|
const targetValue = target[key];
|
|
928
928
|
const sourceValue = source[key];
|
|
929
929
|
if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
|
|
930
|
-
this.deepMergeObjects(targetValue, sourceValue);
|
|
930
|
+
this.deepMergeObjects(targetValue, sourceValue, options);
|
|
931
|
+
} else if (options.mergeArrays && sourceValue && Array.isArray(sourceValue) && targetValue && Array.isArray(targetValue)) {
|
|
932
|
+
target[key] = options.mergeArrays(targetValue, sourceValue);
|
|
931
933
|
} else {
|
|
932
934
|
target[key] = sourceValue;
|
|
933
935
|
}
|
|
@@ -952,7 +954,11 @@ var Raindrop = class {
|
|
|
952
954
|
const existingEvent = this.partialEventBuffer.get(eventId) || {};
|
|
953
955
|
const mergedEvent = this.deepMergeObjects(
|
|
954
956
|
{ ...existingEvent },
|
|
955
|
-
{ ...rest, isPending: isPending === void 0 ? true : isPending }
|
|
957
|
+
{ ...rest, isPending: isPending === void 0 ? true : isPending },
|
|
958
|
+
{
|
|
959
|
+
mergeArrays: (targetValue, sourceValue) => [...targetValue, ...sourceValue]
|
|
960
|
+
// Concat arrays
|
|
961
|
+
}
|
|
956
962
|
);
|
|
957
963
|
this.partialEventBuffer.set(eventId, mergedEvent);
|
|
958
964
|
const existingTimeout = this.partialEventTimeouts.get(eventId);
|
package/dist/index.mjs
CHANGED
|
@@ -104,7 +104,7 @@ var CategorizationRequestSchema = z.object({
|
|
|
104
104
|
// package.json
|
|
105
105
|
var package_default = {
|
|
106
106
|
name: "raindrop-ai",
|
|
107
|
-
version: "0.0.
|
|
107
|
+
version: "0.0.68",
|
|
108
108
|
main: "dist/index.js",
|
|
109
109
|
module: "dist/index.mjs",
|
|
110
110
|
types: "dist/index.d.ts",
|
|
@@ -693,13 +693,15 @@ var Raindrop = class {
|
|
|
693
693
|
* Deeply merges properties of the source object into the target object.
|
|
694
694
|
* Modifies the target object in place. Handles nested plain objects.
|
|
695
695
|
*/
|
|
696
|
-
deepMergeObjects(target, source) {
|
|
696
|
+
deepMergeObjects(target, source, options) {
|
|
697
697
|
for (const key in source) {
|
|
698
698
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
699
699
|
const targetValue = target[key];
|
|
700
700
|
const sourceValue = source[key];
|
|
701
701
|
if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
|
|
702
|
-
this.deepMergeObjects(targetValue, sourceValue);
|
|
702
|
+
this.deepMergeObjects(targetValue, sourceValue, options);
|
|
703
|
+
} else if (options.mergeArrays && sourceValue && Array.isArray(sourceValue) && targetValue && Array.isArray(targetValue)) {
|
|
704
|
+
target[key] = options.mergeArrays(targetValue, sourceValue);
|
|
703
705
|
} else {
|
|
704
706
|
target[key] = sourceValue;
|
|
705
707
|
}
|
|
@@ -724,7 +726,11 @@ var Raindrop = class {
|
|
|
724
726
|
const existingEvent = this.partialEventBuffer.get(eventId) || {};
|
|
725
727
|
const mergedEvent = this.deepMergeObjects(
|
|
726
728
|
{ ...existingEvent },
|
|
727
|
-
{ ...rest, isPending: isPending === void 0 ? true : isPending }
|
|
729
|
+
{ ...rest, isPending: isPending === void 0 ? true : isPending },
|
|
730
|
+
{
|
|
731
|
+
mergeArrays: (targetValue, sourceValue) => [...targetValue, ...sourceValue]
|
|
732
|
+
// Concat arrays
|
|
733
|
+
}
|
|
728
734
|
);
|
|
729
735
|
this.partialEventBuffer.set(eventId, mergedEvent);
|
|
730
736
|
const existingTimeout = this.partialEventTimeouts.get(eventId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raindrop-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68-otelv2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"zod": "^3.23.8"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"@traceloop/node-server-sdk": "^0.
|
|
53
|
+
"@traceloop/node-server-sdk": "^0.22.2"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
},
|
|
77
77
|
"clean": true
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|