@molecule/app-bonds-default-react 1.1.7 → 3.0.0
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 +67 -32
- package/dist/auth.d.ts +56 -35
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +77 -40
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/setup.d.ts +1 -1
- package/dist/setup.js +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-10-
|
|
6
|
+
Generated: 2026-10-25T20:03:32.757Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-bonds-default-react
|
|
@@ -33,7 +33,11 @@ React fleet stack, replacing the byte-identical per-app files:
|
|
|
33
33
|
- Auth/http factories — `createDefaultAuthClient(authConfig)` returns
|
|
34
34
|
`{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
|
|
35
35
|
`...WithFetchClient` variants also keep the bonded http client's bearer
|
|
36
|
-
token in sync with auth events.
|
|
36
|
+
token in sync with auth events. All three accept any JSON object profile
|
|
37
|
+
(`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
|
|
38
|
+
`id`) and fall back to `UserProfile` — with its `id: string` — when no type
|
|
39
|
+
argument is given. The profile is never inferred from `authConfig`, so an
|
|
40
|
+
untyped call keeps the default contract.
|
|
37
41
|
|
|
38
42
|
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
39
43
|
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
@@ -109,7 +113,9 @@ this same wiring. Pass `stripApiPrefix: true` when the app uses
|
|
|
109
113
|
when the API reads another scheme than `Bearer`: it is an option of THIS
|
|
110
114
|
constructor (`createDefaultHttpClientWithAuthBearer({ authScheme: 'Token', … })`,
|
|
111
115
|
or `createFetchClient({ baseURL, authScheme: 'Token' })` directly), never a
|
|
112
|
-
property of the client it returns.
|
|
116
|
+
property of the client it returns. The client is built with the same scheme, so
|
|
117
|
+
a token the client also holds — the one a default auth bond's token sync gives
|
|
118
|
+
it — is sent with that scheme too, not as `Bearer`.
|
|
113
119
|
|
|
114
120
|
```typescript
|
|
115
121
|
function createDefaultHttpClientWithAuthBearer(opts: {
|
|
@@ -124,13 +130,31 @@ function createDefaultHttpClientWithAuthBearer(opts: {
|
|
|
124
130
|
#### `createDefaultAuthClient(authConfig)`
|
|
125
131
|
|
|
126
132
|
Builds the default JWT auth client + wires it into `@molecule/app-auth`.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
(
|
|
133
|
+
Apps pass their own `authConfig` (which lives in `src/config.ts`).
|
|
134
|
+
|
|
135
|
+
`TUser` is the profile the app's pages read, and may be any JSON object type —
|
|
136
|
+
including a profile with NO `id` (`{ username, email, bio, image }`), as in the
|
|
137
|
+
factory it wraps. Never add a synthetic `id` to satisfy a type: nothing in the
|
|
138
|
+
client reads it, and the fabricated value then travels into storage, `getUser()`
|
|
139
|
+
and every page. Omit the type parameter and the default is `UserProfile`, whose
|
|
140
|
+
`id: string` stays required — the profile is never inferred from `authConfig`
|
|
141
|
+
(not even from an annotated config variable), so an untyped wrapper call keeps
|
|
142
|
+
the default contract.
|
|
143
|
+
|
|
144
|
+
Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
|
|
145
|
+
so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
|
|
146
|
+
call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
|
|
147
|
+
required custom field then fails at that call instead of shipping a signed-in
|
|
148
|
+
page that reads `undefined`. An annotated config alone does not supply the type
|
|
149
|
+
argument — that is a 1.8 caller shape this major changes (see
|
|
150
|
+
`AuthClientConfig`'s migration note in `@molecule/app-auth`).
|
|
151
|
+
|
|
152
|
+
`TRegister` is the app's own registration fields (`{ username: string }` for a
|
|
153
|
+
RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
|
|
154
|
+
`authClient.register({ username, email, password })` type-checks with no cast.
|
|
131
155
|
|
|
132
156
|
```typescript
|
|
133
|
-
function createDefaultAuthClient(authConfig:
|
|
157
|
+
function createDefaultAuthClient(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
|
|
134
158
|
authClient: AuthClient<TUser, TRegister>
|
|
135
159
|
setupAuthDefault: () => void
|
|
136
160
|
}
|
|
@@ -139,25 +163,30 @@ function createDefaultAuthClient(authConfig: AuthClientConfig<TUser>): {
|
|
|
139
163
|
#### `createDefaultAuthClientWithHttpSync(authConfig)`
|
|
140
164
|
|
|
141
165
|
Variant of `createDefaultAuthClient` that also keeps the bonded
|
|
142
|
-
`@molecule/app-http` client's bearer token in sync with auth
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
166
|
+
`@molecule/app-http` client's bearer token in sync with the auth client's session.
|
|
167
|
+
Required by apps whose http client must carry the JWT on every request — without
|
|
168
|
+
this wiring, authed endpoints return 401 after page reloads or token refresh.
|
|
169
|
+
|
|
170
|
+
The sync is a LIVE read: `@molecule/app-http`'s `setAuthTokenSource` registers the auth
|
|
171
|
+
client's token, and every client the app bonds — one bonded after this setup too (the
|
|
172
|
+
scaffold wires auth BEFORE http, so a token copied into the client present at setup was
|
|
173
|
+
never sent) — reads it on each request. A session adopted with no
|
|
174
|
+
auth event (`useAuth().setSession()`, an OAuth callback's `setAccessToken()`, the same
|
|
175
|
+
profile under a new token) is therefore sent by the next request, not the previous
|
|
176
|
+
account's bearer. A transport without `setAuthTokenResolver` is followed through a request
|
|
177
|
+
interceptor (see `setAuthTokenSource` for which request first carries the change), and
|
|
178
|
+
auth events still push the token to it.
|
|
179
|
+
|
|
180
|
+
A cookie session (no body token) resolves to `null`, so the request carries NO
|
|
181
|
+
`Authorization` header — a kept bearer would answer as the PRIOR session.
|
|
182
|
+
Requests also wait for the session restore, so a page that fetches viewer data on mount
|
|
183
|
+
cannot race it (see {@link registerAuthGate}).
|
|
184
|
+
|
|
185
|
+
The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
186
|
+
fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
158
187
|
|
|
159
188
|
```typescript
|
|
160
|
-
function createDefaultAuthClientWithHttpSync(authConfig:
|
|
189
|
+
function createDefaultAuthClientWithHttpSync(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
|
|
161
190
|
authClient: AuthClient<TUser, TRegister>
|
|
162
191
|
setupAuthDefault: () => void
|
|
163
192
|
}
|
|
@@ -168,15 +197,18 @@ function createDefaultAuthClientWithHttpSync(authConfig: AuthClientConfig<TUser>
|
|
|
168
197
|
Most aggressive variant — bonds a fetch-based HTTP client with the
|
|
169
198
|
given `baseURL` (so molecule pkg `useGet('/path')` calls hit
|
|
170
199
|
`${baseURL}/path` instead of the SPA's catch-all route), AND keeps
|
|
171
|
-
its bearer token in sync with auth
|
|
200
|
+
its bearer token in sync with the auth client's session, read on every
|
|
201
|
+
request: a session adopted with no auth event (`setSession()`,
|
|
202
|
+
`setAccessToken()`) is sent by the next request. The token uses the auth
|
|
203
|
+
config's `authScheme` (default `Bearer`); a client bonded after this setup
|
|
204
|
+
gets the same source and auth events.
|
|
172
205
|
|
|
173
206
|
The auth client restores a stored token AND user SYNCHRONOUSLY, so the first
|
|
174
207
|
render is the signed-in UI — do not gate a protected page (or a provider of
|
|
175
208
|
yours) on a current-user request. This bond registers `whenRestored()` as the
|
|
176
209
|
HTTP gate, so requests still wait for the background restore/verification to
|
|
177
210
|
settle; only `useAuth().status === 'loading'` means "no decision yet"
|
|
178
|
-
(
|
|
179
|
-
on every navigation).
|
|
211
|
+
(a page that waits on its own `/me` pays a round trip on every navigation).
|
|
180
212
|
|
|
181
213
|
Used by apps where molecule packages render pricing / billing /
|
|
182
214
|
other authed JSON-fetching screens that need both behaviors.
|
|
@@ -185,9 +217,12 @@ Requests are also held until the session restore settles (see
|
|
|
185
217
|
{@link registerAuthGate}), so a page that fetches viewer-dependent data on
|
|
186
218
|
mount cannot race it and answer for an anonymous viewer.
|
|
187
219
|
|
|
220
|
+
The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
221
|
+
fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
222
|
+
|
|
188
223
|
```typescript
|
|
189
224
|
function createDefaultAuthClientWithFetchClient(
|
|
190
|
-
authConfig:
|
|
225
|
+
authConfig: NoInfer<AuthClientConfigOptions<TUser>>,
|
|
191
226
|
fetchClientOptions: { baseURL: string; withCredentials?: boolean },
|
|
192
227
|
): { authClient: AuthClient<TUser, TRegister>; setupAuthDefault: () => void }
|
|
193
228
|
```
|
|
@@ -251,7 +286,7 @@ WITHOUT this, `createStore()` throws
|
|
|
251
286
|
`@molecule/app-state: No provider set. Call setProvider() first` — nothing
|
|
252
287
|
else in a scaffolded app wires the `state` bond, so the documented
|
|
253
288
|
`createStore()` + `useStore()` pattern failed at the first render and every
|
|
254
|
-
page came up blank while `tsc` passed
|
|
289
|
+
page came up blank while `tsc` passed.
|
|
255
290
|
|
|
256
291
|
```typescript
|
|
257
292
|
function setupAppStateSimple(): void
|
|
@@ -312,7 +347,7 @@ function setupAllDefaultBonds(): void
|
|
|
312
347
|
|
|
313
348
|
Peer dependencies:
|
|
314
349
|
|
|
315
|
-
- `@molecule/app-auth` ^
|
|
350
|
+
- `@molecule/app-auth` ^3.0.0
|
|
316
351
|
- `@molecule/app-charts` ^1.0.1
|
|
317
352
|
- `@molecule/app-charts-chartjs` ^1.0.1
|
|
318
353
|
- `@molecule/app-client-search` ^1.0.0
|
|
@@ -325,7 +360,7 @@ Peer dependencies:
|
|
|
325
360
|
- `@molecule/app-drag-drop-dndkit` ^1.0.1
|
|
326
361
|
- `@molecule/app-fonts` ^1.0.1
|
|
327
362
|
- `@molecule/app-fonts-arimo` ^1.0.1
|
|
328
|
-
- `@molecule/app-http` ^1.0
|
|
363
|
+
- `@molecule/app-http` ^1.5.0
|
|
329
364
|
- `@molecule/app-icons` ^1.0.1
|
|
330
365
|
- `@molecule/app-icons-molecule` ^1.0.1
|
|
331
366
|
- `@molecule/app-keyboard-shortcuts` ^1.0.1
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthClient,
|
|
1
|
+
import type { AuthClient, AuthClientConfigOptions, AuthProfileConstraint, RegisterExtraShape, UserProfile } from '@molecule/app-auth';
|
|
2
2
|
import type { HttpClient } from '@molecule/app-http';
|
|
3
3
|
/**
|
|
4
4
|
* Builds the default fetch-based HTTP client + wires it into
|
|
@@ -30,7 +30,9 @@ export declare function createDefaultHttpClient(baseURL: string): {
|
|
|
30
30
|
* when the API reads another scheme than `Bearer`: it is an option of THIS
|
|
31
31
|
* constructor (`createDefaultHttpClientWithAuthBearer({ authScheme: 'Token', … })`,
|
|
32
32
|
* or `createFetchClient({ baseURL, authScheme: 'Token' })` directly), never a
|
|
33
|
-
* property of the client it returns.
|
|
33
|
+
* property of the client it returns. The client is built with the same scheme, so
|
|
34
|
+
* a token the client also holds — the one a default auth bond's token sync gives
|
|
35
|
+
* it — is sent with that scheme too, not as `Bearer`.
|
|
34
36
|
*/
|
|
35
37
|
export declare function createDefaultHttpClientWithAuthBearer(opts: {
|
|
36
38
|
baseURL: string;
|
|
@@ -51,10 +53,28 @@ export declare function createDefaultHttpClientWithAuthBearer(opts: {
|
|
|
51
53
|
};
|
|
52
54
|
/**
|
|
53
55
|
* Builds the default JWT auth client + wires it into `@molecule/app-auth`.
|
|
56
|
+
* Apps pass their own `authConfig` (which lives in `src/config.ts`).
|
|
54
57
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
+
* `TUser` is the profile the app's pages read, and may be any JSON object type —
|
|
59
|
+
* including a profile with NO `id` (`{ username, email, bio, image }`), as in the
|
|
60
|
+
* factory it wraps. Never add a synthetic `id` to satisfy a type: nothing in the
|
|
61
|
+
* client reads it, and the fabricated value then travels into storage, `getUser()`
|
|
62
|
+
* and every page. Omit the type parameter and the default is `UserProfile`, whose
|
|
63
|
+
* `id: string` stays required — the profile is never inferred from `authConfig`
|
|
64
|
+
* (not even from an annotated config variable), so an untyped wrapper call keeps
|
|
65
|
+
* the default contract.
|
|
66
|
+
*
|
|
67
|
+
* Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
|
|
68
|
+
* so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
|
|
69
|
+
* call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
|
|
70
|
+
* required custom field then fails at that call instead of shipping a signed-in
|
|
71
|
+
* page that reads `undefined`. An annotated config alone does not supply the type
|
|
72
|
+
* argument — that is a 1.8 caller shape this major changes (see
|
|
73
|
+
* `AuthClientConfig`'s migration note in `@molecule/app-auth`).
|
|
74
|
+
*
|
|
75
|
+
* `TRegister` is the app's own registration fields (`{ username: string }` for a
|
|
76
|
+
* RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
|
|
77
|
+
* `authClient.register({ username, email, password })` type-checks with no cast.
|
|
58
78
|
*
|
|
59
79
|
* @example
|
|
60
80
|
* ```ts
|
|
@@ -65,41 +85,36 @@ export declare function createDefaultHttpClientWithAuthBearer(opts: {
|
|
|
65
85
|
* export const { authClient, setupAuthDefault } =
|
|
66
86
|
* createDefaultAuthClient(authConfig)
|
|
67
87
|
* ```
|
|
68
|
-
*
|
|
69
|
-
* `TRegister` is the app's own registration fields (`{ username: string }` for a
|
|
70
|
-
* RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
|
|
71
|
-
* `authClient.register({ username, email, password })` type-checks with no cast.
|
|
72
|
-
*
|
|
73
|
-
* `TUser` is the profile the app's pages read. Type the config with the SAME
|
|
74
|
-
* type (`const authConfig: AuthClientConfig<MyUser> = { … }`) so its
|
|
75
|
-
* `mapAuthResponse` is checked against `MyUser`: a mapper that omits a required
|
|
76
|
-
* custom field then fails at the `createDefaultAuthClient<MyUser>(authConfig)`
|
|
77
|
-
* call instead of shipping a signed-in page that reads `undefined`.
|
|
78
88
|
*/
|
|
79
|
-
export declare function createDefaultAuthClient<TUser extends
|
|
89
|
+
export declare function createDefaultAuthClient<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
|
|
80
90
|
authClient: AuthClient<TUser, TRegister>;
|
|
81
91
|
setupAuthDefault: () => void;
|
|
82
92
|
};
|
|
83
93
|
/**
|
|
84
94
|
* Variant of `createDefaultAuthClient` that also keeps the bonded
|
|
85
|
-
* `@molecule/app-http` client's bearer token in sync with auth
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
95
|
+
* `@molecule/app-http` client's bearer token in sync with the auth client's session.
|
|
96
|
+
* Required by apps whose http client must carry the JWT on every request — without
|
|
97
|
+
* this wiring, authed endpoints return 401 after page reloads or token refresh.
|
|
98
|
+
*
|
|
99
|
+
* The sync is a LIVE read: `@molecule/app-http`'s `setAuthTokenSource` registers the auth
|
|
100
|
+
* client's token, and every client the app bonds — one bonded after this setup too (the
|
|
101
|
+
* scaffold wires auth BEFORE http, so a token copied into the client present at setup was
|
|
102
|
+
* never sent) — reads it on each request. A session adopted with no
|
|
103
|
+
* auth event (`useAuth().setSession()`, an OAuth callback's `setAccessToken()`, the same
|
|
104
|
+
* profile under a new token) is therefore sent by the next request, not the previous
|
|
105
|
+
* account's bearer. A transport without `setAuthTokenResolver` is followed through a request
|
|
106
|
+
* interceptor (see `setAuthTokenSource` for which request first carries the change), and
|
|
107
|
+
* auth events still push the token to it.
|
|
89
108
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
109
|
+
* A cookie session (no body token) resolves to `null`, so the request carries NO
|
|
110
|
+
* `Authorization` header — a kept bearer would answer as the PRIOR session.
|
|
111
|
+
* Requests also wait for the session restore, so a page that fetches viewer data on mount
|
|
112
|
+
* cannot race it (see {@link registerAuthGate}).
|
|
94
113
|
*
|
|
95
|
-
* The
|
|
96
|
-
*
|
|
97
|
-
* read here is the unbonded fallback and the restored session's token would land on a
|
|
98
|
-
* client nothing sends through (xr-molecule-flash-m156 — a reload sent every request
|
|
99
|
-
* with no `Authorization` header). The source is applied to the client WHENEVER it is
|
|
100
|
-
* bonded, so setup order no longer decides whether the first request is authorized.
|
|
114
|
+
* The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
115
|
+
* fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
101
116
|
*/
|
|
102
|
-
export declare function createDefaultAuthClientWithHttpSync<TUser extends
|
|
117
|
+
export declare function createDefaultAuthClientWithHttpSync<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>): {
|
|
103
118
|
authClient: AuthClient<TUser, TRegister>;
|
|
104
119
|
setupAuthDefault: () => void;
|
|
105
120
|
};
|
|
@@ -107,15 +122,18 @@ export declare function createDefaultAuthClientWithHttpSync<TUser extends UserPr
|
|
|
107
122
|
* Most aggressive variant — bonds a fetch-based HTTP client with the
|
|
108
123
|
* given `baseURL` (so molecule pkg `useGet('/path')` calls hit
|
|
109
124
|
* `${baseURL}/path` instead of the SPA's catch-all route), AND keeps
|
|
110
|
-
* its bearer token in sync with auth
|
|
125
|
+
* its bearer token in sync with the auth client's session, read on every
|
|
126
|
+
* request: a session adopted with no auth event (`setSession()`,
|
|
127
|
+
* `setAccessToken()`) is sent by the next request. The token uses the auth
|
|
128
|
+
* config's `authScheme` (default `Bearer`); a client bonded after this setup
|
|
129
|
+
* gets the same source and auth events.
|
|
111
130
|
*
|
|
112
131
|
* The auth client restores a stored token AND user SYNCHRONOUSLY, so the first
|
|
113
132
|
* render is the signed-in UI — do not gate a protected page (or a provider of
|
|
114
133
|
* yours) on a current-user request. This bond registers `whenRestored()` as the
|
|
115
134
|
* HTTP gate, so requests still wait for the background restore/verification to
|
|
116
135
|
* settle; only `useAuth().status === 'loading'` means "no decision yet"
|
|
117
|
-
* (
|
|
118
|
-
* on every navigation).
|
|
136
|
+
* (a page that waits on its own `/me` pays a round trip on every navigation).
|
|
119
137
|
*
|
|
120
138
|
* Used by apps where molecule packages render pricing / billing /
|
|
121
139
|
* other authed JSON-fetching screens that need both behaviors.
|
|
@@ -123,8 +141,11 @@ export declare function createDefaultAuthClientWithHttpSync<TUser extends UserPr
|
|
|
123
141
|
* Requests are also held until the session restore settles (see
|
|
124
142
|
* {@link registerAuthGate}), so a page that fetches viewer-dependent data on
|
|
125
143
|
* mount cannot race it and answer for an anonymous viewer.
|
|
144
|
+
*
|
|
145
|
+
* The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
146
|
+
* fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
126
147
|
*/
|
|
127
|
-
export declare function createDefaultAuthClientWithFetchClient<TUser extends
|
|
148
|
+
export declare function createDefaultAuthClientWithFetchClient<TUser extends AuthProfileConstraint<TUser> = UserProfile, TRegister extends RegisterExtraShape<TRegister> = Record<never, never>>(authConfig: NoInfer<AuthClientConfigOptions<TUser>>, fetchClientOptions: {
|
|
128
149
|
baseURL: string;
|
|
129
150
|
withCredentials?: boolean;
|
|
130
151
|
}): {
|
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,EACV,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EAEvB,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACZ,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAsCpD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG;IACxD,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAMA;AAED;;;;;;;;;;;;;;;GAeG;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;IACzC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,GAAG;IACF,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAuBA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,SAAS,qBAAqB,CAAC,KAAK,CAAC,GAAG,WAAW,EACxD,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAEtE,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,GAClD;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAMA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,SAAS,qBAAqB,CAAC,KAAK,CAAC,GAAG,WAAW,EACxD,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAEtE,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,GAClD;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAkCA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sCAAsC,CACpD,KAAK,SAAS,qBAAqB,CAAC,KAAK,CAAC,GAAG,WAAW,EACxD,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAEtE,UAAU,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,EACnD,kBAAkB,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACjE;IACD,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACxC,gBAAgB,EAAE,MAAM,IAAI,CAAA;CAC7B,CAmCA"}
|
package/dist/auth.js
CHANGED
|
@@ -7,9 +7,8 @@ import { createFetchClient, getClient as getHttpClient, setAuthGate, setAuthToke
|
|
|
7
7
|
* flag, a feed, a `favorited` state) sends its request before `initialize()` has
|
|
8
8
|
* restored the session, so it leaves with no `Authorization` header and the server
|
|
9
9
|
* answers for an anonymous viewer. Localhost usually hides it — the restore wins
|
|
10
|
-
* the race against the first effect there — and the deployed URL exposes it,
|
|
11
|
-
*
|
|
12
|
-
* followed user as database leftovers.
|
|
10
|
+
* the race against the first effect there — and the deployed URL exposes it, where a
|
|
11
|
+
* "Follow" button on a followed user reads as stale database state.
|
|
13
12
|
*
|
|
14
13
|
* `whenRestored()` resolves immediately when no restore is in flight, so a request
|
|
15
14
|
* made after boot never waits at all; it holds only while the restore is actually
|
|
@@ -62,13 +61,18 @@ export function createDefaultHttpClient(baseURL) {
|
|
|
62
61
|
* when the API reads another scheme than `Bearer`: it is an option of THIS
|
|
63
62
|
* constructor (`createDefaultHttpClientWithAuthBearer({ authScheme: 'Token', … })`,
|
|
64
63
|
* or `createFetchClient({ baseURL, authScheme: 'Token' })` directly), never a
|
|
65
|
-
* property of the client it returns.
|
|
64
|
+
* property of the client it returns. The client is built with the same scheme, so
|
|
65
|
+
* a token the client also holds — the one a default auth bond's token sync gives
|
|
66
|
+
* it — is sent with that scheme too, not as `Bearer`.
|
|
66
67
|
*/
|
|
67
68
|
export function createDefaultHttpClientWithAuthBearer(opts) {
|
|
68
69
|
const authScheme = opts.authScheme ?? 'Bearer';
|
|
69
70
|
const httpClient = createFetchClient({
|
|
70
71
|
baseURL: opts.baseURL,
|
|
71
72
|
withCredentials: opts.withCredentials,
|
|
73
|
+
// The client's own token (a default auth bond's token sync) overrides the interceptor's
|
|
74
|
+
// header, so it must carry the same scheme.
|
|
75
|
+
authScheme,
|
|
72
76
|
});
|
|
73
77
|
httpClient.addRequestInterceptor((config) => {
|
|
74
78
|
if (opts.stripApiPrefix && typeof config.url === 'string' && config.url.startsWith('/api/')) {
|
|
@@ -87,10 +91,28 @@ export function createDefaultHttpClientWithAuthBearer(opts) {
|
|
|
87
91
|
}
|
|
88
92
|
/**
|
|
89
93
|
* Builds the default JWT auth client + wires it into `@molecule/app-auth`.
|
|
94
|
+
* Apps pass their own `authConfig` (which lives in `src/config.ts`).
|
|
90
95
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
96
|
+
* `TUser` is the profile the app's pages read, and may be any JSON object type —
|
|
97
|
+
* including a profile with NO `id` (`{ username, email, bio, image }`), as in the
|
|
98
|
+
* factory it wraps. Never add a synthetic `id` to satisfy a type: nothing in the
|
|
99
|
+
* client reads it, and the fabricated value then travels into storage, `getUser()`
|
|
100
|
+
* and every page. Omit the type parameter and the default is `UserProfile`, whose
|
|
101
|
+
* `id: string` stays required — the profile is never inferred from `authConfig`
|
|
102
|
+
* (not even from an annotated config variable), so an untyped wrapper call keeps
|
|
103
|
+
* the default contract.
|
|
104
|
+
*
|
|
105
|
+
* Type the config with the SAME type (`const authConfig: AuthClientConfig<MyUser> = { … }`)
|
|
106
|
+
* so its `mapAuthResponse` is checked against `MyUser`, and name that type at the
|
|
107
|
+
* call (`createDefaultAuthClient<MyUser>(authConfig)`): a mapper that omits a
|
|
108
|
+
* required custom field then fails at that call instead of shipping a signed-in
|
|
109
|
+
* page that reads `undefined`. An annotated config alone does not supply the type
|
|
110
|
+
* argument — that is a 1.8 caller shape this major changes (see
|
|
111
|
+
* `AuthClientConfig`'s migration note in `@molecule/app-auth`).
|
|
112
|
+
*
|
|
113
|
+
* `TRegister` is the app's own registration fields (`{ username: string }` for a
|
|
114
|
+
* RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
|
|
115
|
+
* `authClient.register({ username, email, password })` type-checks with no cast.
|
|
94
116
|
*
|
|
95
117
|
* @example
|
|
96
118
|
* ```ts
|
|
@@ -101,16 +123,6 @@ export function createDefaultHttpClientWithAuthBearer(opts) {
|
|
|
101
123
|
* export const { authClient, setupAuthDefault } =
|
|
102
124
|
* createDefaultAuthClient(authConfig)
|
|
103
125
|
* ```
|
|
104
|
-
*
|
|
105
|
-
* `TRegister` is the app's own registration fields (`{ username: string }` for a
|
|
106
|
-
* RealWorld-shaped API), passed on to `@molecule/app-auth`'s factory so
|
|
107
|
-
* `authClient.register({ username, email, password })` type-checks with no cast.
|
|
108
|
-
*
|
|
109
|
-
* `TUser` is the profile the app's pages read. Type the config with the SAME
|
|
110
|
-
* type (`const authConfig: AuthClientConfig<MyUser> = { … }`) so its
|
|
111
|
-
* `mapAuthResponse` is checked against `MyUser`: a mapper that omits a required
|
|
112
|
-
* custom field then fails at the `createDefaultAuthClient<MyUser>(authConfig)`
|
|
113
|
-
* call instead of shipping a signed-in page that reads `undefined`.
|
|
114
126
|
*/
|
|
115
127
|
export function createDefaultAuthClient(authConfig) {
|
|
116
128
|
const authClient = createJWTAuthClient(authConfig);
|
|
@@ -121,22 +133,27 @@ export function createDefaultAuthClient(authConfig) {
|
|
|
121
133
|
}
|
|
122
134
|
/**
|
|
123
135
|
* Variant of `createDefaultAuthClient` that also keeps the bonded
|
|
124
|
-
* `@molecule/app-http` client's bearer token in sync with auth
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
136
|
+
* `@molecule/app-http` client's bearer token in sync with the auth client's session.
|
|
137
|
+
* Required by apps whose http client must carry the JWT on every request — without
|
|
138
|
+
* this wiring, authed endpoints return 401 after page reloads or token refresh.
|
|
139
|
+
*
|
|
140
|
+
* The sync is a LIVE read: `@molecule/app-http`'s `setAuthTokenSource` registers the auth
|
|
141
|
+
* client's token, and every client the app bonds — one bonded after this setup too (the
|
|
142
|
+
* scaffold wires auth BEFORE http, so a token copied into the client present at setup was
|
|
143
|
+
* never sent) — reads it on each request. A session adopted with no
|
|
144
|
+
* auth event (`useAuth().setSession()`, an OAuth callback's `setAccessToken()`, the same
|
|
145
|
+
* profile under a new token) is therefore sent by the next request, not the previous
|
|
146
|
+
* account's bearer. A transport without `setAuthTokenResolver` is followed through a request
|
|
147
|
+
* interceptor (see `setAuthTokenSource` for which request first carries the change), and
|
|
148
|
+
* auth events still push the token to it.
|
|
149
|
+
*
|
|
150
|
+
* A cookie session (no body token) resolves to `null`, so the request carries NO
|
|
151
|
+
* `Authorization` header — a kept bearer would answer as the PRIOR session.
|
|
152
|
+
* Requests also wait for the session restore, so a page that fetches viewer data on mount
|
|
153
|
+
* cannot race it (see {@link registerAuthGate}).
|
|
154
|
+
*
|
|
155
|
+
* The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
156
|
+
* fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
140
157
|
*/
|
|
141
158
|
export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
142
159
|
const authClient = createJWTAuthClient(authConfig);
|
|
@@ -150,7 +167,9 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
|
150
167
|
// Resolve the HTTP client per sync, never once here. `setClient` runs this
|
|
151
168
|
// source, so the token reaches the client the scaffold bonds later as well as
|
|
152
169
|
// one already bonded; a client kept from this moment would be the throwaway
|
|
153
|
-
// fallback the later `setHttpDefault()` replaces.
|
|
170
|
+
// fallback the later `setHttpDefault()` replaces. The client reads the source
|
|
171
|
+
// itself on every request, so a session adopted by `setSession()` (no auth
|
|
172
|
+
// event) or re-adopted for the same profile (no state change) is sent at once.
|
|
154
173
|
setHttpAuthTokenSource(() => authClient.getAccessToken());
|
|
155
174
|
authClient.addEventListener((event) => {
|
|
156
175
|
if (event.type === 'login' || event.type === 'register' || event.type === 'refresh') {
|
|
@@ -159,6 +178,10 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
|
159
178
|
// keeping a previously-set bearer here would pin the http client to the
|
|
160
179
|
// PRIOR session (e.g. a guest's) — the server prefers the Authorization
|
|
161
180
|
// header over the fresh cookie, so every request 401s as the old user.
|
|
181
|
+
//
|
|
182
|
+
// A client that implements `setAuthTokenResolver` already resolves the source
|
|
183
|
+
// per request; this push is what carries the same change to a transport that
|
|
184
|
+
// does not (and keeps `getAuthToken()` current there).
|
|
162
185
|
getHttpClient().setAuthToken(authClient.getAccessToken());
|
|
163
186
|
}
|
|
164
187
|
else if (event.type === 'logout') {
|
|
@@ -172,15 +195,18 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
|
172
195
|
* Most aggressive variant — bonds a fetch-based HTTP client with the
|
|
173
196
|
* given `baseURL` (so molecule pkg `useGet('/path')` calls hit
|
|
174
197
|
* `${baseURL}/path` instead of the SPA's catch-all route), AND keeps
|
|
175
|
-
* its bearer token in sync with auth
|
|
198
|
+
* its bearer token in sync with the auth client's session, read on every
|
|
199
|
+
* request: a session adopted with no auth event (`setSession()`,
|
|
200
|
+
* `setAccessToken()`) is sent by the next request. The token uses the auth
|
|
201
|
+
* config's `authScheme` (default `Bearer`); a client bonded after this setup
|
|
202
|
+
* gets the same source and auth events.
|
|
176
203
|
*
|
|
177
204
|
* The auth client restores a stored token AND user SYNCHRONOUSLY, so the first
|
|
178
205
|
* render is the signed-in UI — do not gate a protected page (or a provider of
|
|
179
206
|
* yours) on a current-user request. This bond registers `whenRestored()` as the
|
|
180
207
|
* HTTP gate, so requests still wait for the background restore/verification to
|
|
181
208
|
* settle; only `useAuth().status === 'loading'` means "no decision yet"
|
|
182
|
-
* (
|
|
183
|
-
* on every navigation).
|
|
209
|
+
* (a page that waits on its own `/me` pays a round trip on every navigation).
|
|
184
210
|
*
|
|
185
211
|
* Used by apps where molecule packages render pricing / billing /
|
|
186
212
|
* other authed JSON-fetching screens that need both behaviors.
|
|
@@ -188,6 +214,9 @@ export function createDefaultAuthClientWithHttpSync(authConfig) {
|
|
|
188
214
|
* Requests are also held until the session restore settles (see
|
|
189
215
|
* {@link registerAuthGate}), so a page that fetches viewer-dependent data on
|
|
190
216
|
* mount cannot race it and answer for an anonymous viewer.
|
|
217
|
+
*
|
|
218
|
+
* The profile type is `createDefaultAuthClient`'s: a JSON object type of named
|
|
219
|
+
* fields (see `AuthProfileShape`), including an app profile with no `id`.
|
|
191
220
|
*/
|
|
192
221
|
export function createDefaultAuthClientWithFetchClient(authConfig, fetchClientOptions) {
|
|
193
222
|
const authClient = createJWTAuthClient(authConfig);
|
|
@@ -197,22 +226,30 @@ export function createDefaultAuthClientWithFetchClient(authConfig, fetchClientOp
|
|
|
197
226
|
const httpClient = createFetchClient({
|
|
198
227
|
baseURL: fetchClientOptions.baseURL,
|
|
199
228
|
withCredentials: fetchClientOptions.withCredentials ?? true,
|
|
229
|
+
// The scheme the auth config names for this token (`Authorization: Token <jwt>`).
|
|
230
|
+
authScheme: authConfig.authScheme,
|
|
200
231
|
});
|
|
201
232
|
// Registered BEFORE the bond: `setHttpClient` applies the restored session's
|
|
202
233
|
// token, and the same source reaches any client an app bonds later instead of
|
|
203
|
-
// this one (xr-molecule-flash-m156 — a client captured at setup cannot).
|
|
234
|
+
// this one (xr-molecule-flash-m156 — a client captured at setup cannot). The
|
|
235
|
+
// client resolves the source on every request, so a session adopted by
|
|
236
|
+
// `setSession()` or `setAccessToken()` after this point is sent immediately.
|
|
204
237
|
setHttpAuthTokenSource(() => authClient.getAccessToken());
|
|
205
238
|
setHttpClient(httpClient);
|
|
206
239
|
setClient(authClient);
|
|
207
240
|
registerAuthGate(authClient);
|
|
208
241
|
authClient.addEventListener((event) => {
|
|
242
|
+
// The client bonded NOW, resolved per event: an app that bonds its own client after
|
|
243
|
+
// this setup sends through that one, never through the client created above.
|
|
209
244
|
if (event.type === 'login' || event.type === 'register' || event.type === 'refresh') {
|
|
210
245
|
// Mirror the token exactly, including null — see the identical note in
|
|
211
246
|
// createDefaultAuthClientWithHttpSync (stale bearer = stuck prior session).
|
|
212
|
-
|
|
247
|
+
// The per-request read of the source above is the guarantee; this push keeps
|
|
248
|
+
// `getAuthToken()` current on a transport without `setAuthTokenResolver`.
|
|
249
|
+
getHttpClient().setAuthToken(authClient.getAccessToken());
|
|
213
250
|
}
|
|
214
251
|
else if (event.type === 'logout') {
|
|
215
|
-
|
|
252
|
+
getHttpClient().setAuthToken(null);
|
|
216
253
|
}
|
|
217
254
|
});
|
|
218
255
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
* - Auth/http factories — `createDefaultAuthClient(authConfig)` returns
|
|
25
25
|
* `{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
|
|
26
26
|
* `...WithFetchClient` variants also keep the bonded http client's bearer
|
|
27
|
-
* token in sync with auth events.
|
|
27
|
+
* token in sync with auth events. All three accept any JSON object profile
|
|
28
|
+
* (`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
|
|
29
|
+
* `id`) and fall back to `UserProfile` — with its `id: string` — when no type
|
|
30
|
+
* argument is given. The profile is never inferred from `authConfig`, so an
|
|
31
|
+
* untyped call keeps the default contract.
|
|
28
32
|
*
|
|
29
33
|
* @example
|
|
30
34
|
* ```tsx
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
* - Auth/http factories — `createDefaultAuthClient(authConfig)` returns
|
|
25
25
|
* `{ authClient, setupAuthDefault }`; the `...WithHttpSync` /
|
|
26
26
|
* `...WithFetchClient` variants also keep the bonded http client's bearer
|
|
27
|
-
* token in sync with auth events.
|
|
27
|
+
* token in sync with auth events. All three accept any JSON object profile
|
|
28
|
+
* (`createDefaultAuthClient<SessionUser>(config)` for an API whose user has no
|
|
29
|
+
* `id`) and fall back to `UserProfile` — with its `id: string` — when no type
|
|
30
|
+
* argument is given. The profile is never inferred from `authConfig`, so an
|
|
31
|
+
* untyped call keeps the default contract.
|
|
28
32
|
*
|
|
29
33
|
* @example
|
|
30
34
|
* ```tsx
|
package/dist/setup.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare function setupAppRoutingReactRouter(): void;
|
|
|
29
29
|
* `@molecule/app-state: No provider set. Call setProvider() first` — nothing
|
|
30
30
|
* else in a scaffolded app wires the `state` bond, so the documented
|
|
31
31
|
* `createStore()` + `useStore()` pattern failed at the first render and every
|
|
32
|
-
* page came up blank while `tsc` passed
|
|
32
|
+
* page came up blank while `tsc` passed.
|
|
33
33
|
*/
|
|
34
34
|
export declare function setupAppStateSimple(): void;
|
|
35
35
|
/** Wires `@molecule/app-storage-localstorage` to `@molecule/app-storage`. */
|
package/dist/setup.js
CHANGED
|
@@ -68,7 +68,7 @@ export function setupAppRoutingReactRouter() {
|
|
|
68
68
|
* `@molecule/app-state: No provider set. Call setProvider() first` — nothing
|
|
69
69
|
* else in a scaffolded app wires the `state` bond, so the documented
|
|
70
70
|
* `createStore()` + `useStore()` pattern failed at the first render and every
|
|
71
|
-
* page came up blank while `tsc` passed
|
|
71
|
+
* page came up blank while `tsc` passed.
|
|
72
72
|
*/
|
|
73
73
|
export function setupAppStateSimple() {
|
|
74
74
|
setState(defaultStateProvider);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-bonds-default-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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
5
|
"homepage": "https://www.molecule.dev/packages/app-bonds-default-react",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"test": "vitest run",
|
|
12
|
-
"test:watch": "vitest"
|
|
12
|
+
"test:watch": "vitest",
|
|
13
|
+
"typecheck:tests": "tsc -p tsconfig.tests.json"
|
|
13
14
|
},
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
"directory": "packages/app/infrastructure/bonds-default-react"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@molecule/app-auth": "
|
|
42
|
+
"@molecule/app-auth": "3.0.0",
|
|
42
43
|
"@molecule/app-charts-chartjs": "1.0.3",
|
|
43
44
|
"@molecule/app-client-search": "1.0.3",
|
|
44
45
|
"@molecule/app-client-search-minisearch": "1.0.4",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@molecule/app-drag-drop-dndkit": "1.0.3",
|
|
51
52
|
"@molecule/app-fonts": "1.2.2",
|
|
52
53
|
"@molecule/app-fonts-arimo": "1.0.5",
|
|
53
|
-
"@molecule/app-http": "1.
|
|
54
|
+
"@molecule/app-http": "1.5.0",
|
|
54
55
|
"@molecule/app-icons": "1.0.3",
|
|
55
56
|
"@molecule/app-icons-molecule": "1.0.3",
|
|
56
57
|
"@molecule/app-keyboard-shortcuts": "1.0.3",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"@molecule/app-realtime": "1.0.4",
|
|
60
61
|
"@molecule/app-realtime-socketio": "1.1.1",
|
|
61
62
|
"@molecule/app-routing": "1.0.4",
|
|
62
|
-
"@molecule/app-routing-react-router": "1.1.
|
|
63
|
+
"@molecule/app-routing-react-router": "1.1.2",
|
|
63
64
|
"@molecule/app-state": "1.0.4",
|
|
64
65
|
"@molecule/app-storage": "1.0.4",
|
|
65
66
|
"@molecule/app-storage-localstorage": "1.0.3",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"vitest": "4.1.12"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|
|
83
|
-
"@molecule/app-auth": "^
|
|
84
|
+
"@molecule/app-auth": "^3.0.0",
|
|
84
85
|
"@molecule/app-charts": "^1.0.1",
|
|
85
86
|
"@molecule/app-charts-chartjs": "^1.0.1",
|
|
86
87
|
"@molecule/app-client-search": "^1.0.0",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"@molecule/app-drag-drop-dndkit": "^1.0.1",
|
|
94
95
|
"@molecule/app-fonts": "^1.0.1",
|
|
95
96
|
"@molecule/app-fonts-arimo": "^1.0.1",
|
|
96
|
-
"@molecule/app-http": "^1.0
|
|
97
|
+
"@molecule/app-http": "^1.5.0",
|
|
97
98
|
"@molecule/app-icons": "^1.0.1",
|
|
98
99
|
"@molecule/app-icons-molecule": "^1.0.1",
|
|
99
100
|
"@molecule/app-keyboard-shortcuts": "^1.0.1",
|