rampkit-expo-dev 0.0.59 → 0.0.61
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/build/EventManager.js +11 -2
- package/build/RampKit.js +12 -3
- package/build/constants.d.ts +1 -1
- package/build/constants.js +1 -1
- package/package.json +1 -1
package/build/EventManager.js
CHANGED
|
@@ -174,14 +174,23 @@ class EventManager {
|
|
|
174
174
|
body: JSON.stringify(event),
|
|
175
175
|
});
|
|
176
176
|
if (!response.ok) {
|
|
177
|
-
|
|
177
|
+
// Try to get error details from response body
|
|
178
|
+
let errorDetails = "";
|
|
179
|
+
try {
|
|
180
|
+
const errorBody = await response.text();
|
|
181
|
+
errorDetails = errorBody ? ` - ${errorBody}` : "";
|
|
182
|
+
}
|
|
183
|
+
catch (_a) {
|
|
184
|
+
// Ignore if we can't read the body
|
|
185
|
+
}
|
|
186
|
+
console.warn(`[RampKit] EventManager: Failed to send event: ${event.eventName}`, `\n Status: ${response.status} ${response.statusText}`, `\n URL: ${url}`, `\n AppId: ${event.appId}`, `\n UserId: ${event.appUserId}`, errorDetails ? `\n Error: ${errorDetails}` : "");
|
|
178
187
|
}
|
|
179
188
|
else {
|
|
180
189
|
console.log("[RampKit] EventManager: Event sent:", event.eventName);
|
|
181
190
|
}
|
|
182
191
|
}
|
|
183
192
|
catch (error) {
|
|
184
|
-
console.warn(
|
|
193
|
+
console.warn(`[RampKit] EventManager: Network error sending event: ${event.eventName}`, `\n Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
185
194
|
}
|
|
186
195
|
}
|
|
187
196
|
// ============================================================================
|
package/build/RampKit.js
CHANGED
|
@@ -176,14 +176,23 @@ class RampKitCore {
|
|
|
176
176
|
body: JSON.stringify(deviceInfo),
|
|
177
177
|
});
|
|
178
178
|
if (!response.ok) {
|
|
179
|
-
|
|
179
|
+
// Try to get error details from response body
|
|
180
|
+
let errorDetails = "";
|
|
181
|
+
try {
|
|
182
|
+
const errorBody = await response.text();
|
|
183
|
+
errorDetails = errorBody ? ` - ${errorBody}` : "";
|
|
184
|
+
}
|
|
185
|
+
catch (_a) {
|
|
186
|
+
// Ignore if we can't read the body
|
|
187
|
+
}
|
|
188
|
+
console.warn(`[RampKit] Configure: Failed to send user data`, `\n Status: ${response.status} ${response.statusText}`, `\n URL: ${url}`, `\n AppId: ${this.appId}`, `\n UserId: ${deviceInfo.appUserId}`, errorDetails ? `\n Error: ${errorDetails}` : "");
|
|
180
189
|
}
|
|
181
190
|
else {
|
|
182
|
-
console.log("[RampKit]
|
|
191
|
+
console.log("[RampKit] Configure: User data sent successfully");
|
|
183
192
|
}
|
|
184
193
|
}
|
|
185
194
|
catch (error) {
|
|
186
|
-
console.warn(
|
|
195
|
+
console.warn(`[RampKit] Configure: Network error sending user data`, `\n Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
187
196
|
}
|
|
188
197
|
}
|
|
189
198
|
/**
|
package/build/constants.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export declare const STORAGE_KEYS: {
|
|
|
16
16
|
readonly ONBOARDING_RESPONSES: "rk_onboarding_responses";
|
|
17
17
|
};
|
|
18
18
|
export declare const CAPABILITIES: readonly ["onboarding", "paywall_event_receiver", "haptic_feedback", "push_notifications"];
|
|
19
|
-
export declare const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
19
|
+
export declare const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV1c3RsenV2am1vY2h4a3hhdGZ4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjIxMDM2NTUsImV4cCI6MjA3NzY3OTY1NX0.d5XsIMGnia4n9Pou0IidipyyEfSlwpXFoeDBufMOEwE";
|
package/build/constants.js
CHANGED
|
@@ -28,4 +28,4 @@ exports.CAPABILITIES = [
|
|
|
28
28
|
"push_notifications",
|
|
29
29
|
];
|
|
30
30
|
// Supabase anon key for API calls
|
|
31
|
-
exports.SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
31
|
+
exports.SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV1c3RsenV2am1vY2h4a3hhdGZ4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjIxMDM2NTUsImV4cCI6MjA3NzY3OTY1NX0.d5XsIMGnia4n9Pou0IidipyyEfSlwpXFoeDBufMOEwE";
|
package/package.json
CHANGED