@dropout-ai/runtime 0.2.12 → 0.2.13
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/package.json +1 -1
- package/src/index.js +9 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -37,10 +37,13 @@ let config = {
|
|
|
37
37
|
privacyMode: (typeof process !== 'undefined' && process.env.DROPOUT_PRIVACY_MODE) || 'full'
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
console.log("[Dropout Debug] Runtime Initializing...");
|
|
41
|
+
console.log("[Dropout Debug] Session ID:", GLOBAL_OBJ.__dropout_session_id__ || "Not set");
|
|
40
42
|
/**
|
|
41
43
|
* Telemetry Emitter (Non-blocking, Fire-and-forget)
|
|
42
44
|
*/
|
|
43
45
|
function emit(payload) {
|
|
46
|
+
console.log("[Dropout Debug] emit() called with payload:", JSON.stringify(payload).slice(0, 100) + "...");
|
|
44
47
|
const fetchFn = GLOBAL_OBJ.__dropout_original_fetch__ || GLOBAL_OBJ.fetch;
|
|
45
48
|
if (typeof fetchFn !== 'function') return;
|
|
46
49
|
|
|
@@ -53,8 +56,14 @@ function emit(payload) {
|
|
|
53
56
|
},
|
|
54
57
|
body: JSON.stringify(payload),
|
|
55
58
|
keepalive: true
|
|
59
|
+
}).then(res => {
|
|
60
|
+
console.log(`[Dropout Debug] Supabase Response: ${res.status} ${res.statusText}`);
|
|
61
|
+
if (!res.ok) {
|
|
62
|
+
res.text().then(t => console.error("[Dropout Debug] Error Body:", t));
|
|
63
|
+
}
|
|
56
64
|
}).catch(() => {
|
|
57
65
|
// Silent fail (Fire & Forget) to ensure no impact on host app
|
|
66
|
+
console.error("[Dropout Debug] NETWORK ERROR:", err);
|
|
58
67
|
});
|
|
59
68
|
}, 0);
|
|
60
69
|
}
|