@deflectbot/deflect-sdk 1.1.14 → 1.1.15

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 CHANGED
@@ -49,7 +49,6 @@ class Deflect {
49
49
  throw new Error("siteKey is required in configuration");
50
50
  }
51
51
  window.Deflect.siteKey = params.siteKey;
52
- console.log("Deflect configured with siteKey");
53
52
  }
54
53
  solveChallenge() {
55
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -97,8 +96,7 @@ class Deflect {
97
96
  token = yield window.Deflect.getToken();
98
97
  }
99
98
  catch (error) {
100
- console.error("Error during Deflect script execution:", error);
101
- throw new Error("Deflect script execution failed");
99
+ throw new Error(`Deflect script execution failed: ${error}`);
102
100
  }
103
101
  URL.revokeObjectURL(blobUrl);
104
102
  scriptEl.remove();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deflectbot/deflect-sdk",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "SDK for deflect.bot - Use it for seamless captcha integration on any website.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",
package/src/index.ts CHANGED
@@ -49,7 +49,6 @@ class Deflect {
49
49
  throw new Error("siteKey is required in configuration");
50
50
  }
51
51
  window.Deflect.siteKey = params.siteKey;
52
- console.log("Deflect configured with siteKey");
53
52
  }
54
53
 
55
54
  async solveChallenge(): Promise<string> {
@@ -110,8 +109,7 @@ class Deflect {
110
109
  try {
111
110
  token = await window.Deflect.getToken();
112
111
  } catch (error) {
113
- console.error("Error during Deflect script execution:", error);
114
- throw new Error("Deflect script execution failed");
112
+ throw new Error(`Deflect script execution failed: ${error}`);
115
113
  }
116
114
 
117
115
  URL.revokeObjectURL(blobUrl);