@deepfrog/pangents-widget 2.2.1 → 2.2.2
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.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{widget-embed-DgFZhnDu.cjs.js → widget-embed-DCSN_j6Y.cjs.js} +4 -4
- package/dist/widget-embed-DCSN_j6Y.cjs.js.map +1 -0
- package/dist/{widget-embed-B3A5H6pf.es.js → widget-embed-DzLM7DN8.es.js} +7 -8
- package/dist/widget-embed-DzLM7DN8.es.js.map +1 -0
- package/dist/widget-embed.cjs.js +1 -1
- package/dist/widget-embed.es.js +1 -1
- package/dist/widget.js +6 -7
- package/package.json +1 -1
- package/dist/widget-embed-B3A5H6pf.es.js.map +0 -1
- package/dist/widget-embed-DgFZhnDu.cjs.js.map +0 -1
|
@@ -16836,10 +16836,6 @@ class EnhancedErrorHandler {
|
|
|
16836
16836
|
console.warn("[Enhanced Error Handler] No API key provided for validation");
|
|
16837
16837
|
return false;
|
|
16838
16838
|
}
|
|
16839
|
-
if (!apiKey.startsWith("pangents_wk_") || apiKey.length < 20) {
|
|
16840
|
-
console.warn("[Enhanced Error Handler] Invalid API key format");
|
|
16841
|
-
return false;
|
|
16842
|
-
}
|
|
16843
16839
|
return true;
|
|
16844
16840
|
}
|
|
16845
16841
|
// Generate error fingerprint for duplicate detection
|
|
@@ -28286,14 +28282,14 @@ class ApiKeyValidator {
|
|
|
28286
28282
|
if (!this.validateApiKeyFormat(sanitized)) {
|
|
28287
28283
|
return {
|
|
28288
28284
|
isValid: false,
|
|
28289
|
-
error: "Invalid API key format.
|
|
28285
|
+
error: "Invalid API key format."
|
|
28290
28286
|
};
|
|
28291
28287
|
}
|
|
28292
28288
|
return { isValid: true };
|
|
28293
28289
|
} catch (error) {
|
|
28294
28290
|
return {
|
|
28295
28291
|
isValid: false,
|
|
28296
|
-
error: error instanceof Error ? error.message : "Invalid API key"
|
|
28292
|
+
error: error instanceof Error ? error.message : "Invalid API key format."
|
|
28297
28293
|
};
|
|
28298
28294
|
}
|
|
28299
28295
|
}
|
|
@@ -29348,8 +29344,11 @@ function WidgetContent() {
|
|
|
29348
29344
|
});
|
|
29349
29345
|
}
|
|
29350
29346
|
};
|
|
29347
|
+
const prevAuthRef = useRef({});
|
|
29351
29348
|
useEffect(() => {
|
|
29352
|
-
|
|
29349
|
+
const force = prevAuthRef.current.apiKey !== apiKey || prevAuthRef.current.tenantId !== tenantId;
|
|
29350
|
+
validateKey(force);
|
|
29351
|
+
prevAuthRef.current = { apiKey, tenantId };
|
|
29353
29352
|
}, [apiKey, tenantId]);
|
|
29354
29353
|
const handleRetry = () => {
|
|
29355
29354
|
validateKey(true);
|
|
@@ -29836,4 +29835,4 @@ export {
|
|
|
29836
29835
|
Chatbot as C,
|
|
29837
29836
|
Widget as W
|
|
29838
29837
|
};
|
|
29839
|
-
//# sourceMappingURL=widget-embed-
|
|
29838
|
+
//# sourceMappingURL=widget-embed-DzLM7DN8.es.js.map
|