@deflectbot/deflect-sdk 1.1.6 → 1.1.7
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 +2 -1
- package/package.json +3 -3
- package/src/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -35,7 +35,8 @@ class Deflect {
|
|
|
35
35
|
if (!window.Deflect.siteKey) {
|
|
36
36
|
throw new Error("API key (siteKey) is missing in configuration");
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const nonce = Date.now().toString();
|
|
39
|
+
const scriptUrl = `https://js.deflect.bot/main.js?sitekey=${window.Deflect.siteKey}&_=${nonce}`;
|
|
39
40
|
const response = yield fetch(scriptUrl);
|
|
40
41
|
if (!response.ok) {
|
|
41
42
|
throw new Error("Failed to fetch the Deflect script");
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deflectbot/deflect-sdk",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.1.7",
|
|
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",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc"
|
|
9
9
|
},
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "Deflect",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@eslint/js": "^9.22.0",
|
package/src/index.ts
CHANGED
|
@@ -33,7 +33,8 @@ class Deflect {
|
|
|
33
33
|
throw new Error("API key (siteKey) is missing in configuration");
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const nonce = Date.now().toString();
|
|
37
|
+
const scriptUrl = `https://js.deflect.bot/main.js?sitekey=${window.Deflect.siteKey}&_=${nonce}`;
|
|
37
38
|
const response = await fetch(scriptUrl);
|
|
38
39
|
|
|
39
40
|
if (!response.ok) {
|