@plitzi/sdk-auth 0.36.1 → 0.36.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* A request's cache key carries the token it was sent with, but a request authenticated by cookie carries nothing
|
|
6
6
|
* that tells two visitors apart, and its answer would otherwise be served to whoever signs in next. A token renewal
|
|
7
7
|
* is the same person, so `identity` is who they are, never the credential.
|
|
8
|
+
*
|
|
9
|
+
* In the LAYOUT phase, which is the whole of why it lands before anything below asks. A sign-in mounts the account
|
|
10
|
+
* area in the same commit that changes who is looking, and a provider asks from an ordinary effect — every one of
|
|
11
|
+
* those runs after every layout effect of the commit. From a passive effect here the account area had already sent
|
|
12
|
+
* its requests, so forgetting and asking again duplicated all of them and cancelled the two still in flight.
|
|
8
13
|
*/
|
|
9
14
|
declare const useSessionQueryReset: (identity: string) => void;
|
|
10
15
|
export default useSessionQueryReset;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRef as e } from "react";
|
|
2
|
+
import { useIsomorphicLayoutEffect as t } from "@plitzi/nexus/react";
|
|
2
3
|
import { queryCache as n } from "@plitzi/sdk-shared/queries";
|
|
3
4
|
//#region src/hooks/useSessionQueryReset/useSessionQueryReset.ts
|
|
4
5
|
var r = (r) => {
|
|
5
|
-
let i =
|
|
6
|
-
|
|
7
|
-
i.current !== r && (i.current = r, n.reset());
|
|
6
|
+
let i = e(r);
|
|
7
|
+
t(() => {
|
|
8
|
+
i.current !== r && (i.current = r, n.reset({ refetch: r !== "" }));
|
|
8
9
|
}, [r]);
|
|
9
10
|
};
|
|
10
11
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-auth",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -87,15 +87,16 @@
|
|
|
87
87
|
"build:prod": "vite build && node ../sdk-shared/scripts/generate-exports.mjs"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
+
"@plitzi/nexus": "^1.2.2",
|
|
90
91
|
"@plitzi/plitzi-ui": "^1.6.21",
|
|
91
|
-
"@plitzi/sdk-navigation": "0.36.
|
|
92
|
-
"@plitzi/sdk-schema": "0.36.
|
|
93
|
-
"@plitzi/sdk-shared": "0.36.
|
|
92
|
+
"@plitzi/sdk-navigation": "0.36.2",
|
|
93
|
+
"@plitzi/sdk-schema": "0.36.2",
|
|
94
|
+
"@plitzi/sdk-shared": "0.36.2"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
97
|
"eslint": "^9.39.5",
|
|
97
98
|
"typescript": "^6.0.3",
|
|
98
99
|
"vite": "^8.3.0",
|
|
99
|
-
"vitest": "^5.0.
|
|
100
|
+
"vitest": "^5.0.1"
|
|
100
101
|
}
|
|
101
102
|
}
|