@equinor/fusion-framework-vite-plugin-spa 3.0.6 → 3.0.7-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @equinor/fusion-framework-vite-plugin-spa
2
2
 
3
+ ## 3.0.7-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b) Thanks [@odinr](https://github.com/odinr)! - relase next
8
+
9
+ - Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b), [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8)]:
10
+ - @equinor/fusion-framework-module-telemetry@5.0.0-next.0
11
+ - @equinor/fusion-framework-module-http@7.0.6-next.0
12
+ - @equinor/fusion-framework-module@5.0.6-next.0
13
+ - @equinor/fusion-framework-module-msal@7.0.0-next.0
14
+ - @equinor/fusion-framework-module-service-discovery@9.0.5-next.0
15
+
3
16
  ## 3.0.6
4
17
 
5
18
  ### Patch Changes
@@ -49,7 +62,6 @@
49
62
  ### Patch Changes
50
63
 
51
64
  - [#3714](https://github.com/equinor/fusion-framework/pull/3714) [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8) Thanks [@odinr](https://github.com/odinr)! - Fix MSAL v4 compatibility issues in SPA plugin.
52
-
53
65
  - Update MSAL client configuration to use nested auth object structure
54
66
  - Replace deprecated defaultAccount with account property
55
67
  - Update acquireToken calls to use MSAL v4 request structure
@@ -87,20 +99,17 @@
87
99
  This update addresses a security vulnerability in Vite's development server and includes bug fixes for improved compatibility. The update ensures secure development environments and better plugin ecosystem compatibility.
88
100
 
89
101
  **Changes:**
90
-
91
102
  - Updated Vite from v7.1.10 to v7.1.12
92
103
  - Includes security fix for development server file system checks
93
104
  - Includes compatibility fix for CommonJS plugin
94
105
  - No breaking changes or API modifications
95
106
 
96
107
  **Security Fix (v7.1.11):**
97
-
98
108
  - **dev**: trim trailing slash before `server.fs.deny` check ([#20968](https://github.com/vitejs/vite/issues/20968))
99
109
  - Prevents potential path traversal vulnerability in development server
100
110
  - Only affects development environment, not production builds
101
111
 
102
112
  **Bug Fix (v7.1.12):**
103
-
104
113
  - **deps**: downgrade commonjs plugin to 28.0.6 to avoid rollup/plugins issues ([#20990](https://github.com/vitejs/vite/issues/20990))
105
114
  - Improves compatibility with Rollup plugin ecosystem
106
115
  - Prevents potential build issues
@@ -116,19 +125,16 @@
116
125
  - [#3584](https://github.com/equinor/fusion-framework/pull/3584) [`0dd31cd`](https://github.com/equinor/fusion-framework/commit/0dd31cd1078b383ddab4a8cf1bb03d502e214715) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump @rollup/plugin-node-resolve from 16.0.1 to 16.0.3
117
126
 
118
127
  Bug fixes:
119
-
120
128
  - fix: resolve bare targets of package "imports" using export maps; avoid fileURLToPath(null)
121
129
  - fix: error thrown with empty entry
122
130
 
123
131
  - [#3604](https://github.com/equinor/fusion-framework/pull/3604) [`31e2581`](https://github.com/equinor/fusion-framework/commit/31e2581fca2765dc7caf54f74db3db51020b53b7) Thanks [@odinr](https://github.com/odinr)! - Update SPA bootstrap telemetry configuration to use proper adapter identifiers.
124
132
 
125
133
  **Changes:**
126
-
127
134
  - Refactor console adapter setup for cleaner conditional logic
128
135
  - Update setAdapter calls to include required identifier parameter
129
136
 
130
137
  **Migration:**
131
-
132
138
  - No breaking changes for SPA consumers - internal implementation update only
133
139
 
134
140
  - Updated dependencies [[`6900d98`](https://github.com/equinor/fusion-framework/commit/6900d98142c84f4703095f8d03b09af57a1d7d2e), [`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`31e2581`](https://github.com/equinor/fusion-framework/commit/31e2581fca2765dc7caf54f74db3db51020b53b7), [`0bc6b38`](https://github.com/equinor/fusion-framework/commit/0bc6b38e61c98a2f9dea7b55fa9983f268f860be), [`a13de68`](https://github.com/equinor/fusion-framework/commit/a13de68b2f196a779ea850af055d8db7926941ce)]:
@@ -147,7 +153,6 @@
147
153
  Previously, the plugin was using direct `.pathname` access on URL objects which could cause issues on Windows due to path separator differences. This change replaces the direct pathname access with `fileURLToPath()` and `normalizePath()` from Vite to ensure proper cross-platform path handling.
148
154
 
149
155
  **Changes:**
150
-
151
156
  - Import `normalizePath` from Vite for consistent path normalization
152
157
  - Use `fileURLToPath()` to properly convert file URLs to paths
153
158
  - Apply `normalizePath()` to ensure consistent path separators across platforms
@@ -161,7 +166,6 @@
161
166
  - [#3579](https://github.com/equinor/fusion-framework/pull/3579) [`b6a64d9`](https://github.com/equinor/fusion-framework/commit/b6a64d94bad7248c06b3aa7d65d7d698052437c7) Thanks [@Noggling](https://github.com/Noggling)! - Add peer dependencies to SPA Vite plugin
162
167
 
163
168
  Added peer dependencies to ensure proper dependency resolution for the SPA Vite plugin. This change declares the Fusion Framework modules that the plugin expects to be available in the consuming application:
164
-
165
169
  - `@equinor/fusion-framework-module`
166
170
  - `@equinor/fusion-framework-module-http`
167
171
  - `@equinor/fusion-framework-module-msal`
@@ -175,7 +179,6 @@
175
179
  ### Minor Changes
176
180
 
177
181
  - [#3547](https://github.com/equinor/fusion-framework/pull/3547) [`99a3c26`](https://github.com/equinor/fusion-framework/commit/99a3c26275c2089c3708124f5819ce383d8dc3dc) Thanks [@odinr](https://github.com/odinr)! - Enhanced SPA plugin with portal proxy support for testing apps in real portal environments ([Issue #3546](https://github.com/equinor/fusion-framework/issues/3546)).
178
-
179
182
  - Added `proxy` option to portal configuration to enable `/portal-proxy` routing
180
183
  - Added `FUSION_SPA_PORTAL_PROXY` environment variable support
181
184
  - Updated TypeScript types to include portal proxy configuration
@@ -201,7 +204,6 @@
201
204
  ### Patch Changes
202
205
 
203
206
  - [#3490](https://github.com/equinor/fusion-framework/pull/3490) [`45954e5`](https://github.com/equinor/fusion-framework/commit/45954e5db471a2faa24e88e41fc6d6c18817d6d1) Thanks [@odinr](https://github.com/odinr)! - Remove logger level configuration from bootstrap template.
204
-
205
207
  - Removed `configurator.logger.level` assignment from `bootstrap.ts`
206
208
  - Logger level configuration should be handled elsewhere or is no longer needed
207
209
 
@@ -212,7 +214,6 @@
212
214
  This patch update fixes bugs and improves stability in the vite dependency.
213
215
 
214
216
  - [#3521](https://github.com/equinor/fusion-framework/pull/3521) [`d1098f7`](https://github.com/equinor/fusion-framework/commit/d1098f7eeff04380c9e05e4a7a7d6b16e1d95884) Thanks [@odinr](https://github.com/odinr)! - Add comprehensive telemetry integration to SPA bootstrap and service worker.
215
-
216
217
  - Enable telemetry in SPA bootstrap with ConsoleAdapter
217
218
  - Add configurable console logging levels via FUSION_SPA_TELEMETRY_CONSOLE_LEVEL environment variable
218
219
  - Track bootstrap performance for portal loading operations
@@ -222,7 +223,6 @@
222
223
  - Fix console level filtering logic to properly respect environment variable settings
223
224
 
224
225
  **Implementation Notes:**
225
-
226
226
  - Console level filtering defaults to `TelemetryLevel.Information` (1) when env var not set
227
227
  - Invalid env var values fallback to logging all telemetry (robust error handling)
228
228
  - Backward compatible: existing behavior unchanged when no FUSION_SPA_TELEMETRY_CONSOLE_LEVEL specified
@@ -235,7 +235,6 @@
235
235
  ### Patch Changes
236
236
 
237
237
  - [`56c27ec`](https://github.com/equinor/fusion-framework/commit/56c27ec9de03e07e725eecfdf2c028a1e29b6ece) Thanks [@odinr](https://github.com/odinr)! - Updated workspace dependencies to use exact version specifiers for consistent release behavior.
238
-
239
238
  - Changed workspace dependencies from `workspace:^` to `workspace:*` across CLI, dev-server, and SPA vite plugin packages
240
239
  - Ensures exact version resolution within the monorepo for predictable builds and releases
241
240
  - Affects both dependencies and devDependencies where applicable
@@ -249,19 +248,16 @@
249
248
  **Problem**: During hard refresh, the service worker would not intercept fetch requests, causing authenticated API requests to fail. The service worker could be stuck in "waiting" state or already active but not controlling the page (`navigator.serviceWorker.controller` was `undefined`).
250
249
 
251
250
  **Root Cause**: Two related issues in the service worker lifecycle during hard refresh:
252
-
253
251
  1. **Waiting state**: When code changes, the new service worker enters "waiting" state, but `skipWaiting()` only runs in the `install` event (which already fired)
254
252
  2. **No controller**: Even when active, `clients.claim()` only runs in the `activate` event, which doesn't fire again if the service worker is already active
255
253
 
256
254
  **Solution**:
257
-
258
255
  - **Force activation on config receipt**: When receiving `INIT_CONFIG`, immediately call both `skipWaiting()` and `clients.claim()` to ensure the service worker activates and takes control regardless of its current state
259
256
  - **Wait for controller**: Registration now waits for `navigator.serviceWorker.controller` to be set before proceeding, ensuring fetch interception is ready
260
257
  - **Disable service worker caching**: Added `updateViaCache: 'none'` to always fetch fresh service worker code during development
261
258
  - **Comprehensive state handling**: Handle service workers in installing, waiting, and active states
262
259
 
263
260
  **Changes**:
264
-
265
261
  1. **sw.ts**: Call `skipWaiting()` and `clients.claim()` when receiving `INIT_CONFIG` message
266
262
  2. **register-service-worker.ts**: Wait for controller with polling and timeout fallback; disable service worker HTTP caching
267
263
 
@@ -285,7 +281,6 @@
285
281
  - [#3349](https://github.com/equinor/fusion-framework/pull/3349) [`c511123`](https://github.com/equinor/fusion-framework/commit/c511123c835e24e9ddefcc4c47c2455f5df12087) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump vite from 6.x to 7.1.5
286
282
 
287
283
  Major version update of Vite build tool across all packages. This update includes:
288
-
289
284
  - Enhanced build performance and caching
290
285
  - Better error reporting with code frames
291
286
  - Improved TypeScript integration
@@ -293,7 +288,6 @@
293
288
  - New development server features
294
289
 
295
290
  ### Links
296
-
297
291
  - [Vite 7.1.5 Release Notes](https://github.com/vitejs/vite/releases/tag/v7.1.5)
298
292
  - [Vite 7.x Migration Guide](https://vitejs.dev/guide/migration)
299
293
 
@@ -302,7 +296,6 @@
302
296
  ### Patch Changes
303
297
 
304
298
  - [#3381](https://github.com/equinor/fusion-framework/pull/3381) [`bae9c95`](https://github.com/equinor/fusion-framework/commit/bae9c9554f335d0384b864436874bded47d00ed8) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update rollup from 4.49.0 to 4.50.2
305
-
306
299
  - Updated rollup dependency via vite transitive dependency
307
300
  - Includes bug fixes for tree-shaking array destructuring patterns
308
301
  - Performance improvements and platform support updates
@@ -311,7 +304,6 @@
311
304
  - [#2910](https://github.com/equinor/fusion-framework/pull/2910) [`07cc985`](https://github.com/equinor/fusion-framework/commit/07cc9857e1427b574e011cc319518e701dba784d) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updated vitest from 2.1.9 to 3.2.4 across all packages.
312
305
 
313
306
  ## Breaking Changes
314
-
315
307
  - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
316
308
  - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
317
309
  - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
@@ -319,18 +311,15 @@
319
311
  - **TypeScript Support**: Enhanced TypeScript integration and type definitions
320
312
 
321
313
  ## Security Updates
322
-
323
314
  - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
324
315
  - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
325
316
 
326
317
  ## Migration Notes
327
-
328
318
  - Test snapshots may need regeneration due to quote format changes
329
319
  - Some test configurations might need updates for new TypeScript support
330
320
  - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
331
321
 
332
322
  ## Links
333
-
334
323
  - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
335
324
  - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
336
325
 
@@ -345,7 +334,6 @@
345
334
  This plugin represents a strategic modularization of the Fusion Framework CLI codebase. By extracting the SPA functionality into its own dedicated package, we've simplified the CLI's architecture while enabling greater flexibility. This modular design allows the SPA component to be replaced or reused by third-party developers independently of the CLI. The primary goal is to maintain a cleaner, more maintainable codebase through proper separation of concerns, with the CLI using this plugin rather than containing this functionality directly.
346
335
 
347
336
  **Key Features**:
348
-
349
337
  - **Fusion Framework Bootstrap**: Automatically initializes core modules and renders configured portals
350
338
  - **Service Discovery**: Enables dynamic service routing and eliminates hardcoded service endpoints
351
339
  - **MSAL Authentication**: Provides seamless Azure AD integration with configurable authentication flows
@@ -373,7 +361,6 @@
373
361
  ### Patch Changes
374
362
 
375
363
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`5973182`](https://github.com/equinor/fusion-framework/commit/5973182b156adb56137f1fc683635ae15274cc57) Thanks [@odinr](https://github.com/odinr)! - Update portal config and manifest API routes and types for consistency:
376
-
377
364
  - Change dev server API route for portal manifest/config from `/portals/portals/...` to `/portal-config/portals/...` for alignment with client usage.
378
365
  - Make portal config optional in dev server route and type definitions.
379
366
  - Update SPA bootstrap to use `portal-config` as the service discovery client key.
@@ -387,7 +374,6 @@
387
374
  ### Patch Changes
388
375
 
389
376
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`23fdc8a`](https://github.com/equinor/fusion-framework/commit/23fdc8a80d21ff063b17d8c596c0afc0a891305f) Thanks [@odinr](https://github.com/odinr)! - Fix dependency and devDependency declarations for lodash.mergewith:
390
-
391
377
  - Move "lodash.mergewith" to dependencies and ensure correct version for @types/lodash.mergewith in devDependencies.
392
378
  - Remove duplicate and misplaced entries for lodash.mergewith and its types.
393
379
  - Remove unused @equinor/fusion-framework-vite-plugin-api-service from devDependencies.
@@ -400,7 +386,6 @@
400
386
  ### Patch Changes
401
387
 
402
388
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`713cb15`](https://github.com/equinor/fusion-framework/commit/713cb15c5f1607e7f7285940a58165d97d8e41df) Thanks [@odinr](https://github.com/odinr)! - Refactor plugin internals for improved Vite compatibility and maintainability:
403
-
404
389
  - Made `resolveId` and `config` hooks async to support dynamic import resolution for virtual modules.
405
390
  - Improved resource alias resolution for `/@fusion-spa-bootstrap.js` and `/@fusion-spa-sw.js` using `import.meta.resolve` and `fileURLToPath`.
406
391
  - Enhanced environment variable handling by merging plugin and loaded environments, and defining them on `config.define`.
@@ -412,7 +397,6 @@
412
397
  ### Minor Changes
413
398
 
414
399
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`ea96493`](https://github.com/equinor/fusion-framework/commit/ea96493d95336f682e31a7b63161783ae7c99a63) Thanks [@odinr](https://github.com/odinr)! - Refactor build output and entrypoints for SPA Vite plugin:
415
-
416
400
  - Change main export entrypoint to `./dist/bin/index.js` (was `./dist/esm/index.js`).
417
401
  - Remove the `./html` export subpath.
418
402
  - Update Rollup config to bundle from `dist/esm` to `dist/bin` and adjust input/output accordingly.
@@ -426,7 +410,6 @@
426
410
  ### Patch Changes
427
411
 
428
412
  - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8870e73`](https://github.com/equinor/fusion-framework/commit/8870e73bd6d4141142c69c11c67b5b154bc80023) Thanks [@odinr](https://github.com/odinr)! - Update build system and dependencies:
429
-
430
413
  - Switch build script to use Rollup with a new `rollup.config.js` for ESM output
431
414
  - Add postbuild script to emit TypeScript declarations
432
415
  - Move all dependencies to devDependencies for clarity
@@ -482,7 +465,6 @@
482
465
  This plugin enables building single-page applications (SPAs) with Vite. It provides features such as service discovery, MSAL authentication, and service worker configuration.
483
466
 
484
467
  **Features**:
485
-
486
468
  - **Service Discovery**: Fetch service discovery configurations and authenticate requests.
487
469
  - **MSAL Authentication**: Authenticate users with Azure AD.
488
470
  - **Service Worker**: Intercept fetch requests, apply authentication headers, and rewrite URLs.
@@ -531,7 +513,6 @@
531
513
  ```
532
514
 
533
515
  **Additional Details**:
534
-
535
516
  - **Custom Bootstrap**: Allows defining custom bootloader scripts.
536
517
  - **Dynamic Proxy**: Supports dynamic proxy services using `@equinor/fusion-framework-vite-plugin-api-service`.
537
518
  - **Environment Variables**: Automatically maps `.env` variables to `import.meta.env`.
@@ -541,7 +522,6 @@
541
522
  ### Patch Changes
542
523
 
543
524
  - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - Fetch and pass portal config to portal render function in bootstrap.ts
544
-
545
525
  - The SPA bootstrap script now fetches the portal config from `/portals/{portalId}@{portalTag}/config` and passes it as `config` to the portal's render function.
546
526
  - This enables portals to receive their runtime configuration directly at startup.
547
527
 
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '3.0.6';
2
+ export const version = '3.0.7-next.0';
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,cAAc,CAAC"}
@@ -5296,7 +5296,7 @@ class BaseModuleProvider {
5296
5296
  }
5297
5297
 
5298
5298
  // Generated by genversion.
5299
- const version$8 = '5.0.5';
5299
+ const version$8 = '5.0.6-next.0';
5300
5300
 
5301
5301
  /* eslint-disable @typescript-eslint/no-explicit-any */
5302
5302
  /**
@@ -19435,7 +19435,7 @@ class HttpClientConfigurator {
19435
19435
  }
19436
19436
 
19437
19437
  // Generated by genversion.
19438
- const version$6 = '7.0.5';
19438
+ const version$6 = '7.0.6-next.0';
19439
19439
 
19440
19440
  /**
19441
19441
  * Exception thrown when a client cannot be found.
@@ -21854,7 +21854,7 @@ class TelemetryConfigurator extends BaseConfigBuilder {
21854
21854
  }
21855
21855
 
21856
21856
  // Generated by genversion.
21857
- const version$5 = '4.6.0';
21857
+ const version$5 = '5.0.0-next.0';
21858
21858
 
21859
21859
  /**
21860
21860
  * Enum representing the severity levels of telemetry items.
@@ -42812,7 +42812,7 @@ const createClientLogCallback = (provider, metadata, scope) => {
42812
42812
  };
42813
42813
 
42814
42814
  // Generated by genversion.
42815
- const version$2 = '6.0.4';
42815
+ const version$2 = '7.0.0-next.0';
42816
42816
 
42817
42817
  /**
42818
42818
  * Zod schema for telemetry configuration validation.
@@ -46531,7 +46531,7 @@ class ServiceDiscoveryConfigurator extends BaseConfigBuilder {
46531
46531
  }
46532
46532
 
46533
46533
  // Generated by genversion.
46534
- const version$1 = '9.0.4';
46534
+ const version$1 = '9.0.5-next.0';
46535
46535
 
46536
46536
  class ServiceDiscoveryProvider extends BaseModuleProvider {
46537
46537
  config;
@@ -47050,7 +47050,7 @@ async function registerServiceWorker(framework) {
47050
47050
  }
47051
47051
 
47052
47052
  // Generated by genversion.
47053
- const version = '3.0.6';
47053
+ const version = '3.0.7-next.0';
47054
47054
 
47055
47055
  // Allow dynamic import without vite
47056
47056
  const importWithoutVite = (path) => import(/* @vite-ignore */ path);