chore: remove grecaptcha types

it didnt work anyway
This commit is contained in:
Miodec 2024-02-17 18:44:14 +01:00
parent c3d0b23087
commit aec04bc8cc
5 changed files with 21 additions and 30 deletions

View file

@ -37,7 +37,6 @@
"@types/canvas-confetti": "1.4.3",
"@types/chartjs-plugin-trendline": "1.0.1",
"@types/damerau-levenshtein": "1.0.0",
"@types/grecaptcha": "3.0.4",
"@types/howler": "2.2.7",
"@types/jest": "27.5.0",
"@types/jquery": "3.5.14",
@ -57,7 +56,6 @@
"eslint-webpack-plugin": "3.1.1",
"extra-watch-webpack-plugin": "1.0.3",
"filemanager-webpack-plugin": "8.0.0",
"grecaptcha": "1.0.3",
"gulp": "4.0.2",
"gulp-eslint-new": "1.4.2",
"html-minimizer-webpack-plugin": "3.5.0",
@ -3720,12 +3718,6 @@
"@types/node": "*"
}
},
"node_modules/@types/grecaptcha": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/grecaptcha/-/grecaptcha-3.0.4.tgz",
"integrity": "sha512-7l1Y8DTGXkx/r4pwU1nMVAR+yD/QC+MCHKXAyEX/7JZhwcN1IED09aZ9vCjjkcGdhSQiu/eJqcXInpl6eEEEwg==",
"dev": true
},
"node_modules/@types/howler": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/@types/howler/-/howler-2.2.7.tgz",
@ -3814,9 +3806,12 @@
"dev": true
},
"node_modules/@types/node": {
"version": "17.0.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz",
"integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w=="
"version": "18.19.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.1.tgz",
"integrity": "sha512-mZJ9V11gG5Vp0Ox2oERpeFDl+JvCwK24PGy76vVY/UgBtjwJWc5rYBThFxmbnYOm9UPZNm6wEl/sxHt2SU7x9A==",
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/object-hash": {
"version": "2.2.1",
@ -5812,12 +5807,6 @@
"url": "https://www.paypal.me/kirilvatev"
}
},
"node_modules/centra": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/centra/-/centra-1.0.1.tgz",
"integrity": "sha512-NyC/mxn9vTH9GXFuybc91nftdWdJUhv7HYRuXaJWQkpzpXghRBEr7WlP7wAxtHb0SrePpuJO127gJsWD+xOZrg==",
"dev": true
},
"node_modules/chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
@ -10913,15 +10902,6 @@
"node": ">=0.6.8"
}
},
"node_modules/grecaptcha": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/grecaptcha/-/grecaptcha-1.0.3.tgz",
"integrity": "sha512-L0yHm3V+p82zBVCqPA7gbBxf+Hvf8nxQ+h3XtVmwEWXQf7pzAQzaSsf6eTUiV/ZoZd0R4+3d7ToEHIVwWHLOzQ==",
"dev": true,
"dependencies": {
"centra": "^1.0.1"
}
},
"node_modules/gulp": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
@ -11116,6 +11096,12 @@
"node": "12 >=12.20 || 14 >=14.13 || >=16"
}
},
"node_modules/gulp-eslint-new/node_modules/@types/node": {
"version": "17.0.45",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz",
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==",
"dev": true
},
"node_modules/gulp-eslint-new/node_modules/fancy-log": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-2.0.0.tgz",
@ -21445,6 +21431,11 @@
"node": ">=14.0"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
},
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",

View file

@ -26,10 +26,10 @@
"@types/canvas-confetti": "1.4.3",
"@types/chartjs-plugin-trendline": "1.0.1",
"@types/damerau-levenshtein": "1.0.0",
"@types/grecaptcha": "3.0.4",
"@types/howler": "2.2.7",
"@types/jest": "27.5.0",
"@types/jquery": "3.5.14",
"@types/node": "18.19.1",
"@types/object-hash": "2.2.1",
"@types/throttle-debounce": "2.1.0",
"@types/tinycolor2": "1.4.3",
@ -45,7 +45,6 @@
"eslint-webpack-plugin": "3.1.1",
"extra-watch-webpack-plugin": "1.0.3",
"filemanager-webpack-plugin": "8.0.0",
"grecaptcha": "1.0.3",
"gulp": "4.0.2",
"gulp-eslint-new": "1.4.2",
"html-minimizer-webpack-plugin": "3.5.0",

View file

@ -11,6 +11,7 @@ export function render(
return;
}
//@ts-expect-error
const widgetId = grecaptcha.render(element, {
sitekey: siteKey,
callback,
@ -24,6 +25,7 @@ export function reset(id: string): void {
return;
}
//@ts-expect-error
grecaptcha.reset(captchas[id]);
}
@ -32,5 +34,6 @@ export function getResponse(id: string): string {
return "";
}
//@ts-expect-error
return grecaptcha.getResponse(captchas[id]);
}

View file

@ -1 +0,0 @@
declare let grecaptcha: ReCaptchaV2.ReCaptcha;

View file

@ -36,6 +36,5 @@
}
},
"include": ["./src/**/*.ts", "../shared-types/**/*.d.ts"],
"files": ["src/ts/modules.d.ts"],
"exclude": ["node_modules", "build", "setup-tests.ts", "**/*.spec.ts"]
}