@stiviar/modeled-react 1.0.1 → 1.0.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 +1 -3
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -32,7 +32,6 @@ export const api = register<{
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
export const useData = api.useData;
|
|
35
|
-
export const isContractValid = api.isContractValid;
|
|
36
35
|
```
|
|
37
36
|
|
|
38
37
|
Use it in a component:
|
|
@@ -66,8 +65,7 @@ export const api = register<TypeModel>(apiModel, {
|
|
|
66
65
|
## API
|
|
67
66
|
|
|
68
67
|
- `useData(key, params?)` — TanStack Query-backed fetch hook for a registered endpoint
|
|
69
|
-
- `isContractValid(openApiSchema)` — validates a live OpenAPI contract against your registered types
|
|
70
68
|
|
|
71
69
|
## License
|
|
72
70
|
|
|
73
|
-
MIT
|
|
71
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stiviar/modeled-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Declarative, type-safe API layer for frontend apps. Register your API once, get validated data, caching, and testable contracts everywhere",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"test": "vitest run",
|
|
27
27
|
"test:watch": "vitest",
|
|
28
|
-
"build": "tsup src/index.ts --format cjs,esm --dts"
|
|
28
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
29
|
+
"patch": "npm version patch && npm run build && npm publish"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@testing-library/jest-dom": "^7.0.0",
|