@xh/hoist 78.1.1 → 78.1.3

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
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 78.1.1 - 2025-12-03
3
+ ## 78.1.3 - 2025-12-04
4
4
 
5
5
  ### 🐞 Bug Fixes
6
6
  * Fix to Highchart timezone handling regression from version 77. Applications should note that
@@ -185,12 +185,17 @@ export declare class XHApi {
185
185
  */
186
186
  get logLevel(): LogLevel;
187
187
  /**
188
- * Set the minimum severity for Hoist log utils until the page is refreshed. Optionally persist
189
- * this adjustment for up to 1440 minutes in local storage.
190
- *
191
- * Hint: call this method from the console to adjust your app's log level while troubleshooting.
188
+ * Set the minimum severity for Hoist log utils.
189
+ * Optionally persist this adjustment for up to 1440 minutes in local storage.
192
190
  */
193
191
  setLogLevel(level: LogLevel, persistMins?: number): void;
192
+ /**
193
+ * Short cut to enable client-side logging at level `debug`.
194
+ * Optionally persist this adjustment for up to 1440 minutes in local storage.
195
+ *
196
+ * Hint: call this method from the console to show more verbose data while troubleshooting.
197
+ */
198
+ enableDebugLogging(persistMins?: number): void;
194
199
  /**
195
200
  * Main entry point to start the client app - initializes and renders application code.
196
201
  * Call from the app's entry-point file within your project's `/client-app/src/apps/` folder.
@@ -49,7 +49,7 @@ export interface MsalClientConfig extends BaseOAuthClientConfig<MsalTokenSpec> {
49
49
  *
50
50
  * In practice, and according to documentation, this operation is likely to fail for a
51
51
  * number of reasons, and can often do so as timeout. Therefore, keeping the timeout limit
52
- * value -- `system.iFrameHashTimeout` -- at a relatively low value is critical. Hoist
52
+ * value -- `system.iframeHashTimeout` -- at a relatively low value is critical. Hoist
53
53
  * defaults this value to 3000ms vs. the default 10000ms.
54
54
  */
55
55
  enableSsoSilent?: boolean;
package/core/XH.ts CHANGED
@@ -370,15 +370,23 @@ export class XHApi {
370
370
  }
371
371
 
372
372
  /**
373
- * Set the minimum severity for Hoist log utils until the page is refreshed. Optionally persist
374
- * this adjustment for up to 1440 minutes in local storage.
375
- *
376
- * Hint: call this method from the console to adjust your app's log level while troubleshooting.
373
+ * Set the minimum severity for Hoist log utils.
374
+ * Optionally persist this adjustment for up to 1440 minutes in local storage.
377
375
  */
378
376
  setLogLevel(level: LogLevel, persistMins: number = -1) {
379
377
  setLogLevel(level, persistMins);
380
378
  }
381
379
 
380
+ /**
381
+ * Short cut to enable client-side logging at level `debug`.
382
+ * Optionally persist this adjustment for up to 1440 minutes in local storage.
383
+ *
384
+ * Hint: call this method from the console to show more verbose data while troubleshooting.
385
+ */
386
+ enableDebugLogging(persistMins: number = -1) {
387
+ setLogLevel('debug', persistMins);
388
+ }
389
+
382
390
  //----------------------
383
391
  // App lifecycle support
384
392
  //----------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "78.1.1",
3
+ "version": "78.1.3",
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",
@@ -72,7 +72,7 @@ export interface MsalClientConfig extends BaseOAuthClientConfig<MsalTokenSpec> {
72
72
  *
73
73
  * In practice, and according to documentation, this operation is likely to fail for a
74
74
  * number of reasons, and can often do so as timeout. Therefore, keeping the timeout limit
75
- * value -- `system.iFrameHashTimeout` -- at a relatively low value is critical. Hoist
75
+ * value -- `system.iframeHashTimeout` -- at a relatively low value is critical. Hoist
76
76
  * defaults this value to 3000ms vs. the default 10000ms.
77
77
  */
78
78
  enableSsoSilent?: boolean;
@@ -385,37 +385,30 @@ export class MsalClient extends BaseOAuthClient<MsalClientConfig, MsalTokenSpec>
385
385
  const {clientId, authority, msalLogLevel, msalClientOptions, enableTelemetry} = this.config;
386
386
  throwIf(!authority, 'Missing MSAL authority. Please review your configuration.');
387
387
 
388
- const mergedConf: Configuration = mergeDeep(
389
- {
390
- auth: {
391
- clientId,
392
- authority,
393
- postLogoutRedirectUri: this.postLogoutRedirectUrl
394
- },
395
- system: {
396
- loggerOptions: {
397
- loggerCallback: this.logFromMsal,
398
- logLevel: msalLogLevel
399
- },
400
- iFrameHashTimeout: 3000 // Prevent long pauses for sso failures.
388
+ let conf: Configuration = {
389
+ auth: {
390
+ clientId,
391
+ authority,
392
+ postLogoutRedirectUri: this.postLogoutRedirectUrl
393
+ },
394
+ system: {
395
+ loggerOptions: {
396
+ loggerCallback: this.logFromMsal,
397
+ logLevel: msalLogLevel
401
398
  },
402
- cache: {
403
- cacheLocation: 'localStorage' // allows sharing auth info across tabs.
404
- }
399
+ iframeHashTimeout: 3000 // Prevent long pauses for sso failures.
405
400
  },
406
- msalClientOptions
407
- );
401
+ cache: {
402
+ cacheLocation: 'localStorage' // allows sharing auth info across tabs.
403
+ }
404
+ };
408
405
 
409
- return msal.PublicClientApplication.createPublicClientApplication(
410
- enableTelemetry
411
- ? {
412
- ...mergedConf,
413
- telemetry: {
414
- client: new BrowserPerformanceClient(mergedConf)
415
- }
416
- }
417
- : mergedConf
418
- );
406
+ conf = mergeDeep(conf, msalClientOptions);
407
+ if (enableTelemetry) {
408
+ conf.telemetry = {client: new BrowserPerformanceClient(conf)};
409
+ }
410
+
411
+ return msal.PublicClientApplication.createPublicClientApplication(conf);
419
412
  }
420
413
 
421
414
  private logFromMsal(level: LogLevel, message: string) {