@rendomnet/apiservice 1.3.1 → 1.3.2
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/README.md +21 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -11,6 +11,27 @@ A robust TypeScript API service framework for making authenticated API calls wit
|
|
|
11
11
|
- ✅ Support for multiple accounts or a single default account
|
|
12
12
|
- ✅ Automatic token refresh for 401 errors
|
|
13
13
|
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @rendomnet/apiservice
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Testing
|
|
21
|
+
|
|
22
|
+
ApiService includes a comprehensive test suite using Jest. To run the tests:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Run tests
|
|
26
|
+
npm test
|
|
27
|
+
|
|
28
|
+
# Run tests with coverage report
|
|
29
|
+
npm run test:coverage
|
|
30
|
+
|
|
31
|
+
# Run tests in watch mode during development
|
|
32
|
+
npm run test:watch
|
|
33
|
+
```
|
|
34
|
+
|
|
14
35
|
## Usage
|
|
15
36
|
|
|
16
37
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rendomnet/apiservice",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "A robust TypeScript API service framework for making authenticated API calls",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"clean": "rimraf dist",
|
|
13
13
|
"prebuild": "npm run clean",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"test": "
|
|
15
|
+
"test": "jest",
|
|
16
|
+
"test:watch": "jest --watch",
|
|
17
|
+
"test:coverage": "jest --coverage",
|
|
16
18
|
"prepare": "npm run build"
|
|
17
19
|
},
|
|
18
20
|
"keywords": [
|
|
@@ -38,12 +40,15 @@
|
|
|
38
40
|
"qs": "^6.11.0"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
43
|
+
"@types/jest": "^29.5.5",
|
|
41
44
|
"@types/node": "^18.0.0",
|
|
42
45
|
"@types/qs": "^6.9.7",
|
|
46
|
+
"jest": "^29.7.0",
|
|
43
47
|
"rimraf": "^3.0.2",
|
|
48
|
+
"ts-jest": "^29.1.1",
|
|
44
49
|
"typescript": "^4.7.4"
|
|
45
50
|
},
|
|
46
51
|
"publishConfig": {
|
|
47
52
|
"access": "public"
|
|
48
53
|
}
|
|
49
|
-
}
|
|
54
|
+
}
|