@prosopo/datasets 0.3.41 → 0.3.42
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/captcha/util.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProsopoDatasetError, ProsopoEnvError } from '@prosopo/common';
|
|
2
2
|
export async function downloadImage(url) {
|
|
3
3
|
try {
|
|
4
4
|
const response = await fetch(url);
|
|
5
5
|
if (!response.ok) {
|
|
6
|
-
throw new
|
|
6
|
+
throw new ProsopoDatasetError('API.BAD_REQUEST', {
|
|
7
7
|
context: { error: `Network response was not ok, status: ${response.status}`, url },
|
|
8
8
|
});
|
|
9
9
|
}
|
package/dist/captcha/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/captcha/util.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/captcha/util.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC3C,IAAI;QACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;QACjC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YACd,MAAM,IAAI,mBAAmB,CAAC,iBAAiB,EAAE;gBAC7C,OAAO,EAAE,EAAE,KAAK,EAAE,wCAAwC,QAAQ,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE;aACrF,CAAC,CAAA;SACL;QACD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAA;QAC3C,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;KAChC;IAAC,OAAO,GAAG,EAAE;QACV,MAAM,IAAI,eAAe,CAAC,2BAA2B,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAA;KACtF;AACL,CAAC"}
|
|
@@ -5,7 +5,7 @@ async function downloadImage(url) {
|
|
|
5
5
|
try {
|
|
6
6
|
const response = await fetch(url);
|
|
7
7
|
if (!response.ok) {
|
|
8
|
-
throw new common.
|
|
8
|
+
throw new common.ProsopoDatasetError("API.BAD_REQUEST", {
|
|
9
9
|
context: { error: `Network response was not ok, status: ${response.status}`, url }
|
|
10
10
|
});
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/datasets",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.42",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"private": false,
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@polkadot/util": "12.6.2",
|
|
51
|
-
"@prosopo/common": "0.3.
|
|
52
|
-
"@prosopo/types": "0.3.
|
|
53
|
-
"@prosopo/util": "0.3.
|
|
51
|
+
"@prosopo/common": "0.3.42",
|
|
52
|
+
"@prosopo/types": "0.3.42",
|
|
53
|
+
"@prosopo/util": "0.3.42",
|
|
54
54
|
"vitest": "^1.3.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@prosopo/config": "0.3.
|
|
57
|
+
"@prosopo/config": "0.3.42",
|
|
58
58
|
"dotenv": "^16.0.1",
|
|
59
59
|
"tslib": "2.6.2",
|
|
60
60
|
"typescript": "5.1.6"
|