@molecule/app-bonds-default-react 1.0.2 → 1.0.4
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/auth.d.ts.map +1 -1
- package/dist/auth.js +9 -6
- package/package.json +32 -31
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAOpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG;IACxD,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAMA;AAED;;;;;;;;;GASG;AACH,wBAAgB,qCAAqC,CAAC,IAAI,EAAE;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAC1C,GAAG;IACF,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAmBA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,SAAS,WAAW,GAAG,WAAW,EAC7E,UAAU,EAAE,gBAAgB,GAC3B;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAA;IAC7B,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAMA;AAED;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,SAAS,WAAW,GAAG,WAAW,EACzF,UAAU,EAAE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,CAwBA;AAED;;;;;;;;GAQG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,SAAS,WAAW,GAAG,WAAW,EAC5F,UAAU,EAAE,gBAAgB,EAC5B,kBAAkB,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACjE;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,CAAA;IAC7B,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CA0BA"}
|
package/dist/auth.js
CHANGED
|
@@ -97,9 +97,12 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
|
97
97
|
}
|
|
98
98
|
authClient.addEventListener((event) => {
|
|
99
99
|
if (event.type === 'login' || event.type === 'register' || event.type === 'refresh') {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
// Mirror the auth client's token EXACTLY — including null. Cookie-session
|
|
101
|
+
// APIs issue no body token (the credential is the httpOnly cookie), and
|
|
102
|
+
// keeping a previously-set bearer here would pin the http client to the
|
|
103
|
+
// PRIOR session (e.g. a guest's) — the server prefers the Authorization
|
|
104
|
+
// header over the fresh cookie, so every request 401s as the old user.
|
|
105
|
+
getHttpClient().setAuthToken(authClient.getAccessToken());
|
|
103
106
|
}
|
|
104
107
|
else if (event.type === 'logout') {
|
|
105
108
|
getHttpClient().setAuthToken(null);
|
|
@@ -134,9 +137,9 @@ export function createDefaultAuthClientWithFetchClient(authConfig, fetchClientOp
|
|
|
134
137
|
}
|
|
135
138
|
authClient.addEventListener((event) => {
|
|
136
139
|
if (event.type === 'login' || event.type === 'register' || event.type === 'refresh') {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
+
// Mirror the token exactly, including null — see the identical note in
|
|
141
|
+
// createDefaultAuthClientWithHttpSync (stale bearer = stuck prior session).
|
|
142
|
+
httpClient.setAuthToken(authClient.getAccessToken());
|
|
140
143
|
}
|
|
141
144
|
else if (event.type === 'logout') {
|
|
142
145
|
httpClient.setAuthToken(null);
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-bonds-default-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Default app-side bond wirings for React+Tailwind+react-router+localStorage+Arimo font+molecule icons. 5 setup functions consolidating 665 byte-identical per-app bond wiring files across the fleet.",
|
|
5
|
+
"homepage": "https://www.molecule.dev/packages/app-bonds-default-react",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"types": "dist/index.d.ts",
|
|
@@ -37,35 +38,35 @@
|
|
|
37
38
|
"directory": "packages/app/infrastructure/bonds-default-react"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@molecule/app-auth": "1.
|
|
41
|
-
"@molecule/app-charts-chartjs": "1.0.
|
|
42
|
-
"@molecule/app-code-editor": "1.0.
|
|
43
|
-
"@molecule/app-code-editor-monaco": "1.0.
|
|
44
|
-
"@molecule/app-command-palette": "1.0.
|
|
45
|
-
"@molecule/app-command-palette-cmdk": "1.0.
|
|
46
|
-
"@molecule/app-drag-drop": "1.0.
|
|
47
|
-
"@molecule/app-drag-drop-dndkit": "1.0.
|
|
48
|
-
"@molecule/app-fonts": "1.0.
|
|
49
|
-
"@molecule/app-fonts-arimo": "1.0.
|
|
50
|
-
"@molecule/app-http": "1.0.
|
|
51
|
-
"@molecule/app-icons": "1.0.
|
|
52
|
-
"@molecule/app-icons-molecule": "1.0.
|
|
53
|
-
"@molecule/app-keyboard-shortcuts": "1.0.
|
|
54
|
-
"@molecule/app-keyboard-shortcuts-hotkeys": "1.0.
|
|
55
|
-
"@molecule/app-maps-leaflet": "1.0.
|
|
56
|
-
"@molecule/app-realtime": "1.0.
|
|
57
|
-
"@molecule/app-realtime-socketio": "1.0.
|
|
58
|
-
"@molecule/app-routing": "1.0.
|
|
59
|
-
"@molecule/app-routing-react-router": "1.0.
|
|
60
|
-
"@molecule/app-storage": "1.0.
|
|
61
|
-
"@molecule/app-storage-localstorage": "1.0.
|
|
62
|
-
"@molecule/app-theme": "1.0.
|
|
63
|
-
"@molecule/app-theme-css-variables": "1.0.
|
|
64
|
-
"@molecule/app-ui": "1.
|
|
65
|
-
"@molecule/app-ui-tailwind": "1.
|
|
66
|
-
"@molecule/app-video-hls": "1.0.
|
|
67
|
-
"@molecule/app-virtual-scroll": "1.0.
|
|
68
|
-
"@molecule/app-virtual-scroll-tanstack": "1.0.
|
|
41
|
+
"@molecule/app-auth": "1.1.1",
|
|
42
|
+
"@molecule/app-charts-chartjs": "1.0.2",
|
|
43
|
+
"@molecule/app-code-editor": "1.0.2",
|
|
44
|
+
"@molecule/app-code-editor-monaco": "1.0.2",
|
|
45
|
+
"@molecule/app-command-palette": "1.0.2",
|
|
46
|
+
"@molecule/app-command-palette-cmdk": "1.0.2",
|
|
47
|
+
"@molecule/app-drag-drop": "1.0.2",
|
|
48
|
+
"@molecule/app-drag-drop-dndkit": "1.0.2",
|
|
49
|
+
"@molecule/app-fonts": "1.0.2",
|
|
50
|
+
"@molecule/app-fonts-arimo": "1.0.2",
|
|
51
|
+
"@molecule/app-http": "1.0.2",
|
|
52
|
+
"@molecule/app-icons": "1.0.2",
|
|
53
|
+
"@molecule/app-icons-molecule": "1.0.2",
|
|
54
|
+
"@molecule/app-keyboard-shortcuts": "1.0.2",
|
|
55
|
+
"@molecule/app-keyboard-shortcuts-hotkeys": "1.0.2",
|
|
56
|
+
"@molecule/app-maps-leaflet": "1.0.2",
|
|
57
|
+
"@molecule/app-realtime": "1.0.2",
|
|
58
|
+
"@molecule/app-realtime-socketio": "1.0.2",
|
|
59
|
+
"@molecule/app-routing": "1.0.2",
|
|
60
|
+
"@molecule/app-routing-react-router": "1.0.2",
|
|
61
|
+
"@molecule/app-storage": "1.0.2",
|
|
62
|
+
"@molecule/app-storage-localstorage": "1.0.2",
|
|
63
|
+
"@molecule/app-theme": "1.0.3",
|
|
64
|
+
"@molecule/app-theme-css-variables": "1.0.3",
|
|
65
|
+
"@molecule/app-ui": "1.1.1",
|
|
66
|
+
"@molecule/app-ui-tailwind": "1.1.3",
|
|
67
|
+
"@molecule/app-video-hls": "1.0.2",
|
|
68
|
+
"@molecule/app-virtual-scroll": "1.0.2",
|
|
69
|
+
"@molecule/app-virtual-scroll-tanstack": "1.0.2",
|
|
69
70
|
"@types/node": "26.1.2",
|
|
70
71
|
"@types/react": "19.2.17",
|
|
71
72
|
"@types/react-dom": "19.2.3",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"react": "19.2.8",
|
|
74
75
|
"react-dom": "19.2.8",
|
|
75
76
|
"typescript": "6.0.3",
|
|
76
|
-
"vitest": "4.1.
|
|
77
|
+
"vitest": "4.1.11"
|
|
77
78
|
},
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"@molecule/app-auth": "^1.0.1",
|