@povio/openapi-codegen-cli 2.0.5 → 2.0.7
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/generator.js +12 -12
- package/dist/generators/utils/object.utils.d.ts +1 -1
- package/dist/lib/acl/AclGuard.mjs +1 -1
- package/dist/lib/acl/Can.mjs +1 -1
- package/dist/lib/acl/ability.context.mjs +1 -1
- package/dist/lib/config/queryConfig.context.d.ts +3 -1
- package/dist/lib/config/queryConfig.context.mjs +2 -2
- package/dist/lib/rest/error-handling.mjs +3 -0
- package/dist/lib/rest/rest.utils.mjs +1 -1
- package/dist/sh.js +58 -58
- package/package.json +3 -3
- package/src/assets/useMutationEffects.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@povio/openapi-codegen-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"codegen",
|
|
6
6
|
"openapi",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
71
71
|
"@casl/ability": "^6.7.3",
|
|
72
72
|
"@casl/react": "^5.0.0",
|
|
73
|
-
"@tanstack/react-query": "~5.
|
|
73
|
+
"@tanstack/react-query": "~5.90.21",
|
|
74
74
|
"@types/node": "^20.12.12",
|
|
75
75
|
"@types/prompt-sync": "^4.2.3",
|
|
76
76
|
"@types/react": "^19.1.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@casl/ability": "^6.7.3",
|
|
102
102
|
"@casl/react": "^5.0.0",
|
|
103
|
-
"@tanstack/react-query": "^5.
|
|
103
|
+
"@tanstack/react-query": "^5.90.21",
|
|
104
104
|
"axios": "^1.13.1",
|
|
105
105
|
"react": "^19.1.0",
|
|
106
106
|
"zod": "^4.1.12"
|
|
@@ -24,6 +24,8 @@ export function useMutationEffects({ currentModule }: UseMutationEffectsProps) {
|
|
|
24
24
|
async <TData>(data: TData, options: MutationEffectsOptions = {}, updateKeys?: QueryKey[]) => {
|
|
25
25
|
const { invalidateCurrentModule = true, invalidateModules, invalidateKeys, preferUpdate } = options;
|
|
26
26
|
const shouldUpdate = preferUpdate || (preferUpdate === undefined && config.preferUpdate);
|
|
27
|
+
const shouldInvalidateCurrentModule =
|
|
28
|
+
invalidateCurrentModule || (invalidateCurrentModule === undefined && config.invalidateCurrentModule);
|
|
27
29
|
|
|
28
30
|
const isQueryKeyEqual = (keyA: QueryKey, keyB: QueryKey) =>
|
|
29
31
|
keyA.length === keyB.length && keyA.every((item, index) => item === keyB[index]);
|
|
@@ -35,7 +37,7 @@ export function useMutationEffects({ currentModule }: UseMutationEffectsProps) {
|
|
|
35
37
|
return false;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
const isCurrentModule =
|
|
40
|
+
const isCurrentModule = shouldInvalidateCurrentModule && queryKey[0] === currentModule;
|
|
39
41
|
const isInvalidateModule = !!invalidateModules && invalidateModules.some((module) => queryKey[0] === module);
|
|
40
42
|
const isInvalidateKey = !!invalidateKeys && invalidateKeys.some((key) => isQueryKeyEqual(queryKey, key));
|
|
41
43
|
return isCurrentModule || isInvalidateModule || isInvalidateKey;
|