@cuenca-mx/cuenca-js 0.0.1-dev.3 → 0.0.1-dev.4
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/build/README.md +7 -0
- package/build/package.json +37 -0
- package/build/{queries-f146b91b.js → queries-395c7467.js} +1 -1
- package/build/{walletTransactionRequest-bbfb87bd.js → walletTransactionRequest-17132eb5.js} +1 -1
- package/package.json +11 -2
- package/build/errors/index.mjs +0 -64
- package/build/index.mjs +0 -1475
- package/build/jwt/index.mjs +0 -46
- package/build/requests/index.mjs +0 -3
- package/build/types/index.mjs +0 -3
package/build/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# cuenca-js · [](https://codecov.io/gh/cuenca-mx/cuenca-js)
|
|
2
|
+
|
|
3
|
+
`cuenca-js` is a Javascript library client to use Cuenca's services.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cuenca-mx/cuenca-js",
|
|
3
|
+
"version": "0.0.1-dev.4",
|
|
4
|
+
"description": "Cuenca client for JS",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"module": "./index.mjs",
|
|
7
|
+
"browser": "./umd/cuenca.umd.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"build/**/*"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./build/index.mjs",
|
|
13
|
+
"./errors/": "./build/errors/",
|
|
14
|
+
"./jwt/": "./build/jwt/",
|
|
15
|
+
"./requests/": "./build/requests/",
|
|
16
|
+
"./types/": "./build/types/"
|
|
17
|
+
},
|
|
18
|
+
"packageManager": "yarn@3.0.2",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/cuenca-mx/cuenca-js.git",
|
|
23
|
+
"directory": "packages/cuenca-js"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"cuenca"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/cuenca-mx/cuenca-js/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://cuenca.com",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"axios": "^0.24.0"
|
|
35
|
+
},
|
|
36
|
+
"private": false
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuenca-mx/cuenca-js",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.4",
|
|
4
4
|
"description": "Cuenca client for JS",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"module": "./build/index.mjs",
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"build/**/*"
|
|
10
10
|
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./build/index.mjs",
|
|
13
|
+
"./errors/": "./build/errors/",
|
|
14
|
+
"./jwt/": "./build/jwt/",
|
|
15
|
+
"./requests/": "./build/requests/",
|
|
16
|
+
"./types/": "./build/types/"
|
|
17
|
+
},
|
|
11
18
|
"packageManager": "yarn@3.0.2",
|
|
12
19
|
"type": "module",
|
|
13
20
|
"repository": {
|
|
@@ -24,13 +31,15 @@
|
|
|
24
31
|
},
|
|
25
32
|
"homepage": "https://cuenca.com",
|
|
26
33
|
"scripts": {
|
|
27
|
-
"build": "rm -rf build/ && yarn rollup
|
|
34
|
+
"build": "rm -rf build/ && yarn node ./scripts/rollup/rollup.cjs",
|
|
28
35
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest)",
|
|
29
36
|
"publish": "yarn build && yarn npm publish"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
33
40
|
"@rollup/plugin-node-resolve": "^13.1.1",
|
|
41
|
+
"chalk": "^4.1.2",
|
|
42
|
+
"fs-extra": "^10.0.0",
|
|
34
43
|
"jest": "^27.4.5",
|
|
35
44
|
"rollup": "^2.61.1",
|
|
36
45
|
"rollup-plugin-terser": "^7.0.2"
|
package/build/errors/index.mjs
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
class CuencaException extends Error {
|
|
2
|
-
constructor(msg) {
|
|
3
|
-
super(msg);
|
|
4
|
-
|
|
5
|
-
Object.setPrototypeOf(this, CuencaException.prototype);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
class CuencaResponseException extends CuencaException {
|
|
10
|
-
constructor(data, status) {
|
|
11
|
-
super(`Cuenca Response Error: ${status}`);
|
|
12
|
-
this.name = 'CuencaResponseError';
|
|
13
|
-
this.data = data;
|
|
14
|
-
this.status = status;
|
|
15
|
-
|
|
16
|
-
Object.setPrototypeOf(this, CuencaResponseException.prototype);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
class NoResultFound extends CuencaException {
|
|
21
|
-
constructor() {
|
|
22
|
-
super('No results were found');
|
|
23
|
-
this.name = 'NoResultFound';
|
|
24
|
-
|
|
25
|
-
Object.setPrototypeOf(this, NoResultFound.prototype);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
class MultipleResultsFound extends CuencaException {
|
|
30
|
-
constructor() {
|
|
31
|
-
super('One result was expected but multiple were found');
|
|
32
|
-
this.name = 'MultipleResultsFound';
|
|
33
|
-
|
|
34
|
-
Object.setPrototypeOf(this, MultipleResultsFound.prototype);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
class MalformedJwtToken extends CuencaException {
|
|
39
|
-
constructor() {
|
|
40
|
-
super('An invalid JWT token was obtained during authentication');
|
|
41
|
-
this.name = 'MalformedJwtToken';
|
|
42
|
-
|
|
43
|
-
Object.setPrototypeOf(this, MalformedJwtToken.prototype);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
class InvalidPassword extends CuencaException {
|
|
48
|
-
constructor() {
|
|
49
|
-
super('Invalid password');
|
|
50
|
-
this.name = 'InvalidPassword';
|
|
51
|
-
|
|
52
|
-
Object.setPrototypeOf(this, InvalidPassword.prototype);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
class ValidationError extends Error {
|
|
57
|
-
constructor(msg) {
|
|
58
|
-
super(msg);
|
|
59
|
-
|
|
60
|
-
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { CuencaException, CuencaResponseException, InvalidPassword, MalformedJwtToken, MultipleResultsFound, NoResultFound, ValidationError };
|