@amplifyup/sdk 0.1.76 → 0.1.78
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/README.md +2 -0
- package/dist/AmplifyRenderer.js +27 -19
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +28 -20
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +3 -1
- package/dist/react.d.ts +3 -1
- package/dist/react.js +108 -62
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +109 -63
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -159,6 +159,7 @@ var AWSAdapter = class {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
const trackingId = eventData?.trackingId || this.config?.trackingId;
|
|
162
|
+
const debug = this.config?.debug;
|
|
162
163
|
const query = trackingId ? `?tid=${encodeURIComponent(trackingId)}` : "";
|
|
163
164
|
const url = `${this.apiGatewayUrl}${endpoint}${query}`;
|
|
164
165
|
try {
|
|
@@ -173,15 +174,15 @@ var AWSAdapter = class {
|
|
|
173
174
|
keepalive: true
|
|
174
175
|
});
|
|
175
176
|
if (!response.ok) {
|
|
176
|
-
if (
|
|
177
|
+
if (debug) {
|
|
177
178
|
console.warn(`AmplifyUp SDK: Event tracking failed: ${response.status} ${response.statusText}`);
|
|
178
179
|
}
|
|
179
|
-
} else if (
|
|
180
|
+
} else if (debug) {
|
|
180
181
|
const result = await response.json().catch(() => ({}));
|
|
181
182
|
console.log("AmplifyUp SDK: Event tracked", result);
|
|
182
183
|
}
|
|
183
184
|
} catch (error) {
|
|
184
|
-
if (
|
|
185
|
+
if (debug) {
|
|
185
186
|
console.error("AmplifyUp SDK: Event tracking error:", error);
|
|
186
187
|
}
|
|
187
188
|
}
|