@xh/hoist 73.0.0-SNAPSHOT.1743781894378 → 73.0.0-SNAPSHOT.1744046548420
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
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## v73.0.0-SNAPSHOT - unreleased
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
### 🎁 New Features
|
|
6
|
+
|
|
7
|
+
* Added the reported client app version as a column in the Admin Console WebSockets tab.
|
|
7
8
|
|
|
8
9
|
## v72.2.0 - 2025-03-13
|
|
9
10
|
|
|
10
11
|
### 🎁 New Features
|
|
12
|
+
|
|
11
13
|
* Modified `TabContainerModel` to make more methods `protected`, improving extensibility for
|
|
12
14
|
advanced use-cases.
|
|
13
15
|
* Enhanced `XH.reloadApp` with new argument to clear query parameters before loading.
|
|
@@ -20,8 +22,8 @@
|
|
|
20
22
|
|
|
21
23
|
### 🐞 Bug Fixes
|
|
22
24
|
|
|
23
|
-
*
|
|
24
|
-
|
|
25
|
+
* Prevented native browser context menu from showing on `DashCanvas` surfaces and obscuring the
|
|
26
|
+
`DashCanvas` custom context menu.
|
|
25
27
|
|
|
26
28
|
## v72.1.0 - 2025-02-13
|
|
27
29
|
|
|
@@ -40,14 +40,13 @@ export interface BaseOAuthClientConfig<S extends AccessTokenSpec> {
|
|
|
40
40
|
*/
|
|
41
41
|
idScopes?: string[];
|
|
42
42
|
/**
|
|
43
|
-
* Optional
|
|
43
|
+
* Optional spec for access tokens to be loaded and maintained to support access to one or more
|
|
44
|
+
* different back-end resources, distinct from the core Hoist auth flow via ID token.
|
|
44
45
|
*
|
|
45
|
-
* Map of
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* Use this map to gain targeted access tokens for different back-end resources.
|
|
46
|
+
* Map of key to a spec for an access token. The key is an arbitrary, app-determined string
|
|
47
|
+
* used to retrieve the loaded token via {@link getAccessTokenAsync}. The spec is implementation
|
|
48
|
+
* specific, but will typically include scopes to be loaded for the access token and potentially
|
|
49
|
+
* other metadata required by the underlying provider.
|
|
51
50
|
*/
|
|
52
51
|
accessTokens?: Record<string, S>;
|
|
53
52
|
}
|
|
@@ -2,11 +2,13 @@ import { Token } from './Token';
|
|
|
2
2
|
export type TokenMap = Record<string, Token>;
|
|
3
3
|
export interface AccessTokenSpec {
|
|
4
4
|
/**
|
|
5
|
-
* Mode governing when the access token should be requested from provider
|
|
6
|
-
* eager (
|
|
7
|
-
*
|
|
5
|
+
* Mode governing when the access token should be requested from provider:
|
|
6
|
+
* - eager (or undefined) - load on overall initialization, but do not block on failure.
|
|
7
|
+
* Useful for tokens that an app is almost certain to require during a user session.
|
|
8
|
+
* - lazy - defer loading until first requested by client. Useful for tokens that might
|
|
9
|
+
* never be needed by the app during a given user session.
|
|
8
10
|
*/
|
|
9
|
-
fetchMode
|
|
11
|
+
fetchMode?: 'eager' | 'lazy';
|
|
10
12
|
/** Scopes for the desired access token.*/
|
|
11
13
|
scopes: string[];
|
|
12
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "73.0.0-SNAPSHOT.
|
|
3
|
+
"version": "73.0.0-SNAPSHOT.1744046548420",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|
|
@@ -64,14 +64,13 @@ export interface BaseOAuthClientConfig<S extends AccessTokenSpec> {
|
|
|
64
64
|
idScopes?: string[];
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Optional
|
|
67
|
+
* Optional spec for access tokens to be loaded and maintained to support access to one or more
|
|
68
|
+
* different back-end resources, distinct from the core Hoist auth flow via ID token.
|
|
68
69
|
*
|
|
69
|
-
* Map of
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* Use this map to gain targeted access tokens for different back-end resources.
|
|
70
|
+
* Map of key to a spec for an access token. The key is an arbitrary, app-determined string
|
|
71
|
+
* used to retrieve the loaded token via {@link getAccessTokenAsync}. The spec is implementation
|
|
72
|
+
* specific, but will typically include scopes to be loaded for the access token and potentially
|
|
73
|
+
* other metadata required by the underlying provider.
|
|
75
74
|
*/
|
|
76
75
|
accessTokens?: Record<string, S>;
|
|
77
76
|
}
|
|
@@ -314,7 +313,7 @@ export abstract class BaseOAuthClient<
|
|
|
314
313
|
const eagerOnly = opts?.eagerOnly ?? false,
|
|
315
314
|
useCache = opts?.useCache ?? true,
|
|
316
315
|
accessSpecs = eagerOnly
|
|
317
|
-
? pickBy(this.accessSpecs, spec => spec.fetchMode
|
|
316
|
+
? pickBy(this.accessSpecs, spec => spec.fetchMode !== 'lazy') // specs are eager by default - opt-in to lazy
|
|
318
317
|
: this.accessSpecs,
|
|
319
318
|
ret: TokenMap = {};
|
|
320
319
|
|
package/security/Types.ts
CHANGED
|
@@ -11,11 +11,13 @@ export type TokenMap = Record<string, Token>;
|
|
|
11
11
|
|
|
12
12
|
export interface AccessTokenSpec {
|
|
13
13
|
/**
|
|
14
|
-
* Mode governing when the access token should be requested from provider
|
|
15
|
-
* eager (
|
|
16
|
-
*
|
|
14
|
+
* Mode governing when the access token should be requested from provider:
|
|
15
|
+
* - eager (or undefined) - load on overall initialization, but do not block on failure.
|
|
16
|
+
* Useful for tokens that an app is almost certain to require during a user session.
|
|
17
|
+
* - lazy - defer loading until first requested by client. Useful for tokens that might
|
|
18
|
+
* never be needed by the app during a given user session.
|
|
17
19
|
*/
|
|
18
|
-
fetchMode
|
|
20
|
+
fetchMode?: 'eager' | 'lazy';
|
|
19
21
|
|
|
20
22
|
/** Scopes for the desired access token.*/
|
|
21
23
|
scopes: string[];
|