@sudobility/testomniac_lib 0.0.89 → 0.0.91
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 +11 -11
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @sudobility/
|
|
1
|
+
# @sudobility/testomniac_lib
|
|
2
2
|
|
|
3
3
|
Business logic library with Zustand stores for the Starter application.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bun add @sudobility/
|
|
8
|
+
bun add @sudobility/testomniac_lib
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Peer dependencies:
|
|
@@ -17,7 +17,7 @@ bun add react @tanstack/react-query zustand @sudobility/types
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
import { useHistoriesManager } from
|
|
20
|
+
import { useHistoriesManager } from '@sudobility/testomniac_lib';
|
|
21
21
|
|
|
22
22
|
// In a React component:
|
|
23
23
|
const {
|
|
@@ -29,9 +29,9 @@ const {
|
|
|
29
29
|
updateHistory,
|
|
30
30
|
deleteHistory,
|
|
31
31
|
} = useHistoriesManager({
|
|
32
|
-
baseUrl:
|
|
32
|
+
baseUrl: 'https://api.example.com',
|
|
33
33
|
networkClient,
|
|
34
|
-
userId:
|
|
34
|
+
userId: 'firebase-uid',
|
|
35
35
|
token: firebaseIdToken,
|
|
36
36
|
autoFetch: true, // default
|
|
37
37
|
});
|
|
@@ -41,7 +41,7 @@ const {
|
|
|
41
41
|
|
|
42
42
|
### useHistoriesManager
|
|
43
43
|
|
|
44
|
-
Unified hook that combines
|
|
44
|
+
Unified hook that combines testomniac_client hooks + Zustand store + business logic:
|
|
45
45
|
|
|
46
46
|
- Percentage calculation: `(userSum / globalTotal) * 100`
|
|
47
47
|
- Cache fallback: returns cached data while server hasn't responded
|
|
@@ -65,11 +65,11 @@ bun run verify # All checks + build (use before commit)
|
|
|
65
65
|
|
|
66
66
|
## Related Packages
|
|
67
67
|
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
68
|
+
- **testomniac_types** -- Shared type definitions (imported transitively via testomniac_client)
|
|
69
|
+
- **testomniac_client** -- API client SDK; this library wraps its hooks with business logic
|
|
70
|
+
- **testomniac_app** -- Web frontend that consumes `useHistoriesManager`
|
|
71
|
+
- **testomniac_app_rn** -- React Native app that consumes `useHistoriesManager`
|
|
72
|
+
- **testomniac_api** -- Backend server (communicated with indirectly through testomniac_client)
|
|
73
73
|
|
|
74
74
|
## License
|
|
75
75
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/testomniac_lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"description": "Testomniac business logic library with Zustand stores",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/js": "^9.38.0",
|
|
45
|
-
"@sudobility/testomniac_client": "^0.0.
|
|
46
|
-
"@sudobility/testomniac_types": "^0.0.
|
|
45
|
+
"@sudobility/testomniac_client": "^0.0.86",
|
|
46
|
+
"@sudobility/testomniac_types": "^0.0.67",
|
|
47
47
|
"@sudobility/types": "^1.9.62",
|
|
48
48
|
"@tanstack/react-query": "^5.90.5",
|
|
49
49
|
"@testing-library/react": "^16.3.2",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
},
|
|
67
67
|
"repository": {
|
|
68
68
|
"type": "git",
|
|
69
|
-
"url": "https://github.com/johnqh/
|
|
69
|
+
"url": "https://github.com/johnqh/entitytestomniac_lib.git"
|
|
70
70
|
}
|
|
71
71
|
}
|