@equinor/fusion-framework-vite-plugin-spa 3.1.8 → 3.1.10

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,5 +1,19 @@
1
1
  # @equinor/fusion-framework-vite-plugin-spa
2
2
 
3
+ ## 3.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ec7d2ce`](https://github.com/equinor/fusion-framework/commit/ec7d2ce0ed3f1d447b8cf410d2ef94fb1b557bbb)]:
8
+ - @equinor/fusion-framework-module-msal@7.3.0
9
+
10
+ ## 3.1.9
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`c8e27eb`](https://github.com/equinor/fusion-framework/commit/c8e27eb3a119b4077effe20a10dfb2dfd3dc865e)]:
15
+ - @equinor/fusion-framework-module-msal@7.2.2
16
+
3
17
  ## 3.1.8
4
18
 
5
19
  ### Patch Changes
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '3.1.8';
2
+ export const version = '3.1.10';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
@@ -40463,7 +40463,7 @@ const createClientLogCallback = (provider, metadata, scope) => {
40463
40463
  };
40464
40464
 
40465
40465
  // Generated by genversion.
40466
- const version$2 = '7.2.1';
40466
+ const version$2 = '7.3.0';
40467
40467
 
40468
40468
  /**
40469
40469
  * Zod schema for telemetry configuration validation.
@@ -40568,7 +40568,7 @@ class MsalConfigurator extends BaseConfigBuilder {
40568
40568
  * This follows Microsoft's standard SPA Auth Code Flow pattern and is compatible with
40569
40569
  * MSAL Browser's acquireTokenByCode() method.
40570
40570
  *
40571
- * @param authCode - The authorization code issued by the backend
40571
+ * @param authCode - The authorization code issued by the backend, or undefined to clear/reset it
40572
40572
  * @returns The configurator instance for method chaining
40573
40573
  *
40574
40574
  * @example
@@ -40576,16 +40576,21 @@ class MsalConfigurator extends BaseConfigBuilder {
40576
40576
  * // Backend provides auth code in HTML/config
40577
40577
  * const config = { auth: { code: getAuthCodeFromBackend() } };
40578
40578
  * configurator.setAuthCode(config.auth.code);
40579
+ *
40580
+ * // Clear previously configured auth code
40581
+ * configurator.setAuthCode(undefined);
40579
40582
  * ```
40580
40583
  *
40581
40584
  * @remarks
40582
40585
  * - Auth codes are single-use and short-lived (typically 5-10 minutes)
40583
40586
  * - The exchange happens during module initialization before requiresAuth check
40584
40587
  * - If exchange fails, the provider falls back to standard MSAL authentication flows
40588
+ * - Passing undefined, empty, or whitespace-only values clears the configured auth code
40585
40589
  * - Requires backend to be configured with SPA Auth Code support
40586
40590
  */
40587
40591
  setAuthCode(authCode) {
40588
- this._set('authCode', async () => authCode);
40592
+ const normalizedAuthCode = authCode?.trim() || undefined;
40593
+ this._set('authCode', async () => normalizedAuthCode);
40589
40594
  return this;
40590
40595
  }
40591
40596
  /**
@@ -41563,7 +41568,7 @@ class MsalProvider extends BaseModuleProvider {
41563
41568
  this.#loginHint = config.loginHint;
41564
41569
  // Extract auth code from config if present
41565
41570
  // This will be used during initialize to exchange for tokens
41566
- this.#authCode = config.authCode;
41571
+ this.#authCode = config.authCode?.trim() || undefined;
41567
41572
  // Validate required client configuration
41568
41573
  if (!config.client) {
41569
41574
  const error = new Error('Client is required, please provide a valid client in the configuration');
@@ -44956,7 +44961,7 @@ async function registerServiceWorker(framework) {
44956
44961
  }
44957
44962
 
44958
44963
  // Generated by genversion.
44959
- const version = '3.1.8';
44964
+ const version = '3.1.10';
44960
44965
 
44961
44966
  // Allow dynamic import without vite
44962
44967
  const importWithoutVite = (path) => import(/* @vite-ignore */ path);