@equinor/fusion-framework-vite-plugin-spa 4.1.0 → 4.1.2

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 DELETED
@@ -1,874 +0,0 @@
1
- # @equinor/fusion-framework-vite-plugin-spa
2
-
3
- ## 4.1.0
4
-
5
- ### Minor Changes
6
-
7
- - f663b46: Add `FUSION_SPA_MSAL_MOCK` environment variable. When set to `true`, the generated bootstrap
8
- script signs in through `@equinor/fusion-framework-module-msal/mock` instead of the real MSAL
9
- client, so the dev server can run without Entra ID credentials, redirects, or network calls.
10
- Intended for CI and Playwright runs against the dev server. The mock client is lazily
11
- imported, so it is not loaded at runtime unless the flag is enabled.
12
-
13
- Also add `FUSION_SPA_MSAL_MOCK_TOKEN`, an optional companion variable read only when
14
- `FUSION_SPA_MSAL_MOCK` is set. Provide a JWT (e.g. from `createMockToken`, or one issued by a
15
- team's backend mock) and its `name`, `preferred_username`, `oid`, `tid`, and `scp` claims name
16
- the signed-in mock user. The token itself is also sent verbatim as the access/id token, so a
17
- backend mock that validates the token sees exactly what was configured, not a regenerated one.
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies [f663b46]
22
- - Updated dependencies [f663b46]
23
- - Updated dependencies [f663b46]
24
- - Updated dependencies [f663b46]
25
- - Updated dependencies [f663b46]
26
- - Updated dependencies [f663b46]
27
- - Updated dependencies [f663b46]
28
- - Updated dependencies [f663b46]
29
- - Updated dependencies [f663b46]
30
- - Updated dependencies [f663b46]
31
- - Updated dependencies [f663b46]
32
- - Updated dependencies [f663b46]
33
- - Updated dependencies [f663b46]
34
- - @equinor/fusion-framework-module-service-discovery@10.1.0
35
- - @equinor/fusion-framework-module-msal@11.0.0
36
- - @equinor/fusion-framework-module-http@8.1.0
37
- - @equinor/fusion-framework-module-telemetry@7.1.0
38
- - @equinor/fusion-framework-module@6.1.3
39
-
40
- ## 4.0.17
41
-
42
- ### Patch Changes
43
-
44
- - @equinor/fusion-framework-module-telemetry@7.0.3
45
-
46
- ## 4.0.16
47
-
48
- ### Patch Changes
49
-
50
- - Updated dependencies [b92698d]
51
- - @equinor/fusion-framework-module@6.1.2
52
- - @equinor/fusion-framework-module-telemetry@7.0.2
53
-
54
- ## 4.0.15
55
-
56
- ### Patch Changes
57
-
58
- - 6a3080a: Forward the original request's `cache` mode when the service worker re-fetches a proxied request. Previously a caller requesting `cache: 'no-store'` (e.g. a polling endpoint) would silently fall back to the default HTTP cache once passed through the service worker.
59
- - Updated dependencies [de2b4fb]
60
- - @equinor/fusion-framework-module-http@8.0.5
61
-
62
- ## 4.0.14
63
-
64
- ### Patch Changes
65
-
66
- - 80c3e4a: Internal: renamed several source files to align with filename conventions and added a missing intent comment for object-merge logic; no public API changes.
67
- - 80c3e4a: Internal: added intent comments to satisfy `fusion-lint` rules (control-flow, iterator/rxjs chains, TSDoc `@template` tags, and single-export-per-file), and referenced tracking issues (#5065, #5066) for pre-existing TODO comments. `InvalidRouteError` was moved to its own module (`invalid-route-error.ts`) in `api-service` to satisfy `single-export-per-file`. No behavior changes.
68
- - Updated dependencies [80c3e4a]
69
- - Updated dependencies [80c3e4a]
70
- - Updated dependencies [80c3e4a]
71
- - Updated dependencies [80c3e4a]
72
- - Updated dependencies [80c3e4a]
73
- - Updated dependencies [80c3e4a]
74
- - Updated dependencies [80c3e4a]
75
- - Updated dependencies [80c3e4a]
76
- - Updated dependencies [80c3e4a]
77
- - Updated dependencies [80c3e4a]
78
- - Updated dependencies [80c3e4a]
79
- - Updated dependencies [80c3e4a]
80
- - Updated dependencies [80c3e4a]
81
- - Updated dependencies [80c3e4a]
82
- - Updated dependencies [80c3e4a]
83
- - Updated dependencies [80c3e4a]
84
- - @equinor/fusion-framework-module-http@8.0.4
85
- - @equinor/fusion-framework-module-msal@10.0.2
86
- - @equinor/fusion-framework-module-service-discovery@10.0.2
87
- - @equinor/fusion-framework-module@6.1.1
88
- - @equinor/fusion-framework-module-telemetry@7.0.1
89
-
90
- ## 4.0.13
91
-
92
- ### Patch Changes
93
-
94
- - Updated dependencies [7508555]
95
- - @equinor/fusion-framework-module-msal@10.0.1
96
-
97
- ## 4.0.12
98
-
99
- ### Patch Changes
100
-
101
- - 74beb1c: Fix type export paths for `./bootstrap.js` and `./sw.js` so TypeScript resolves the published declarations correctly.
102
- - Prevent broken type resolution when consuming the SPA bootstrap and service worker entrypoints.
103
-
104
- ## 4.0.11
105
-
106
- ### Patch Changes
107
-
108
- - @equinor/fusion-framework-module-telemetry@7.0.0
109
- - @equinor/fusion-framework-module-msal@10.0.0
110
- - @equinor/fusion-framework-module-http@8.0.3
111
-
112
- ## 4.0.10
113
-
114
- ### Patch Changes
115
-
116
- - @equinor/fusion-framework-module-telemetry@6.0.1
117
-
118
- ## 4.0.9
119
-
120
- ### Patch Changes
121
-
122
- - Updated dependencies [b7b1d9a]
123
- - Updated dependencies [b7b1d9a]
124
- - Updated dependencies [b7b1d9a]
125
- - @equinor/fusion-framework-module@6.1.0
126
- - @equinor/fusion-framework-module-telemetry@6.0.0
127
- - @equinor/fusion-framework-module-msal@9.0.0
128
- - @equinor/fusion-framework-module-http@8.0.2
129
-
130
- ## 4.0.8
131
-
132
- ### Patch Changes
133
-
134
- - Updated dependencies [730d51a]
135
- - @equinor/fusion-framework-module-msal@8.0.5
136
-
137
- ## 4.0.7
138
-
139
- ### Patch Changes
140
-
141
- - 5c05455: Forward request method and body to service worker fetch calls
142
-
143
- ## 4.0.6
144
-
145
- ### Patch Changes
146
-
147
- - Updated dependencies [f045ac0]
148
- - Updated dependencies [f045ac0]
149
- - @equinor/fusion-framework-module-msal@8.0.4
150
- - @equinor/fusion-framework-module-http@8.0.1
151
- - @equinor/fusion-framework-module-service-discovery@10.0.1
152
- - @equinor/fusion-framework-module-telemetry@5.0.2
153
-
154
- ## 4.0.5
155
-
156
- ### Patch Changes
157
-
158
- - Updated dependencies [51e6e50]
159
- - @equinor/fusion-framework-module-msal@8.0.3
160
-
161
- ## 4.0.4
162
-
163
- ### Patch Changes
164
-
165
- - 3005189: Fix SPA bootstrap portal template URL construction to normalize slash boundaries between `/portal-proxy`, `assetPath`, and `templateEntry`.
166
-
167
- This avoids malformed entrypoint imports like `/portal-proxy//bundles/...` that can fail with unauthorized dynamic module fetches in dev-server scenarios where `spa.templateEnv.portal.proxy` is enabled.
168
-
169
- ## 4.0.3
170
-
171
- ### Patch Changes
172
-
173
- - @equinor/fusion-framework-module-telemetry@5.0.1
174
-
175
- ## 4.0.2
176
-
177
- ### Patch Changes
178
-
179
- - Updated dependencies [02a5859]
180
- - @equinor/fusion-framework-module-msal@8.0.2
181
-
182
- ## 4.0.1
183
-
184
- ### Patch Changes
185
-
186
- - 8f16c97: Update rollup (4.59.0 → 4.60.1) used to produce the published bundles for both packages.
187
-
188
- rollup 4.60.1 fixes a bug where side-effect imports could be silently dropped during bundling due to a namespace re-export caching issue ([rollup#6274](https://github.com/rollup/rollup/issues/6274)). Both packages use rollup to bundle their published output, so the fix ensures the emitted artifacts are correct.
189
-
190
- No API or behaviour changes for consumers.
191
-
192
- - Updated dependencies [244b995]
193
- - @equinor/fusion-framework-module-msal@8.0.1
194
-
195
- ## 4.0.0
196
-
197
- ### Major Changes
198
-
199
- - abffa53: Major version bump for Fusion Framework React 19 release.
200
-
201
- All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
202
-
203
- **Breaking changes:**
204
- - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
205
- - React Router upgraded from v6 to v7
206
- - Navigation module refactored with new history API
207
- - `renderComponent` and `renderApp` now use `createRoot` API
208
-
209
- **Migration:**
210
- - Update your React version to 18.0.0 or higher before upgrading
211
- - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
212
- - See individual package changelogs for package-specific migration steps
213
-
214
- ### Patch Changes
215
-
216
- - 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
217
-
218
- Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
219
- No breaking API changes affect this codebase. The `dev-server` peerDependency
220
- is widened to accept both Vite 7 and Vite 8.
221
-
222
- - Updated dependencies [abffa53]
223
- - Updated dependencies [abffa53]
224
- - Updated dependencies [abffa53]
225
- - Updated dependencies [8f30948]
226
- - Updated dependencies [abffa53]
227
- - @equinor/fusion-framework-module@6.0.0
228
- - @equinor/fusion-framework-module-http@8.0.0
229
- - @equinor/fusion-framework-module-msal@8.0.0
230
- - @equinor/fusion-framework-module-service-discovery@10.0.0
231
- - @equinor/fusion-framework-module-telemetry@5.0.0
232
-
233
- ## 3.1.11
234
-
235
- ### Patch Changes
236
-
237
- - [#4100](https://github.com/equinor/fusion-framework/pull/4100) [`9d4d520`](https://github.com/equinor/fusion-framework/commit/9d4d520e9d3c3a3c4ef68a96952fbbc6f6d34720) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: rebuild the CLI, dev portal, and SPA plugin with Rollup 4.59.0 to address a security advisory affecting packaged build output. No public API changes.
238
-
239
- - [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
240
-
241
- - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581), [`db8fa81`](https://github.com/equinor/fusion-framework/commit/db8fa8134b77a628b15e06f7f72b50f04ef97458)]:
242
- - @equinor/fusion-framework-module-http@7.0.8
243
- - @equinor/fusion-framework-module@5.0.6
244
- - @equinor/fusion-framework-module-msal@7.3.1
245
- - @equinor/fusion-framework-module-service-discovery@9.1.1
246
- - @equinor/fusion-framework-module-telemetry@4.6.4
247
-
248
- ## 3.1.10
249
-
250
- ### Patch Changes
251
-
252
- - Updated dependencies [[`ec7d2ce`](https://github.com/equinor/fusion-framework/commit/ec7d2ce0ed3f1d447b8cf410d2ef94fb1b557bbb)]:
253
- - @equinor/fusion-framework-module-msal@7.3.0
254
-
255
- ## 3.1.9
256
-
257
- ### Patch Changes
258
-
259
- - Updated dependencies [[`c8e27eb`](https://github.com/equinor/fusion-framework/commit/c8e27eb3a119b4077effe20a10dfb2dfd3dc865e)]:
260
- - @equinor/fusion-framework-module-msal@7.2.2
261
-
262
- ## 3.1.8
263
-
264
- ### Patch Changes
265
-
266
- - Updated dependencies [[`1594ed8`](https://github.com/equinor/fusion-framework/commit/1594ed879579d0db6e42c5052a33174f7bf9346c), [`1594ed8`](https://github.com/equinor/fusion-framework/commit/1594ed879579d0db6e42c5052a33174f7bf9346c)]:
267
- - @equinor/fusion-framework-module-msal@7.2.1
268
-
269
- ## 3.1.7
270
-
271
- ### Patch Changes
272
-
273
- - Updated dependencies [[`dcf51aa`](https://github.com/equinor/fusion-framework/commit/dcf51aa87ac79200893ec4909632554464e75055)]:
274
- - @equinor/fusion-framework-module-msal@7.2.0
275
-
276
- ## 3.1.6
277
-
278
- ### Patch Changes
279
-
280
- - Updated dependencies [[`0b34d5d`](https://github.com/equinor/fusion-framework/commit/0b34d5d895c740a77fc995abeca910fdca1cf633)]:
281
- - @equinor/fusion-framework-module-msal@7.1.0
282
-
283
- ## 3.1.5
284
-
285
- ### Patch Changes
286
-
287
- - Updated dependencies [[`21458e5`](https://github.com/equinor/fusion-framework/commit/21458e5e7585f0bf266c66d6f4135396fd7c1529)]:
288
- - @equinor/fusion-framework-module-telemetry@4.6.3
289
-
290
- ## 3.1.4
291
-
292
- ### Patch Changes
293
-
294
- - Updated dependencies [[`434ce70`](https://github.com/equinor/fusion-framework/commit/434ce707d237b399f8438eebe742641b2a81b11f)]:
295
- - @equinor/fusion-framework-module-service-discovery@9.1.0
296
-
297
- ## 3.1.3
298
-
299
- ### Patch Changes
300
-
301
- - Updated dependencies []:
302
- - @equinor/fusion-framework-module-telemetry@4.6.2
303
-
304
- ## 3.1.2
305
-
306
- ### Patch Changes
307
-
308
- - Updated dependencies [[`cb37cae`](https://github.com/equinor/fusion-framework/commit/cb37cae45e06778e8d1ea20faed31b582e49fcae)]:
309
- - @equinor/fusion-framework-module-msal@7.0.0
310
- - @equinor/fusion-framework-module-http@7.0.7
311
-
312
- ## 3.1.1
313
-
314
- ### Patch Changes
315
-
316
- - [#3963](https://github.com/equinor/fusion-framework/pull/3963) [`122752b`](https://github.com/equinor/fusion-framework/commit/122752b075113b206583ec2c46240997162329b8) Thanks [@odinr](https://github.com/odinr)! - Remove `lodash.mergewith` from the SPA Vite plugin by switching environment merging to a simple object merge where loaded environment values override plugin defaults.
317
-
318
- Resolves: https://github.com/equinor/fusion-framework/security/dependabot/188
319
- Resolves: https://github.com/equinor/fusion-framework/security/dependabot/189
320
-
321
- ## 3.1.0
322
-
323
- ### Minor Changes
324
-
325
- - [#3922](https://github.com/equinor/fusion-framework/pull/3922) [`d34ebd8`](https://github.com/equinor/fusion-framework/commit/d34ebd82c93acabc88f88e44a725f084af3af5ec) Thanks [@odinr](https://github.com/odinr)! - Enable AG Grid Enterprise license injection for the dev-portal by setting a global window key produced from the SPA template environment. The portal reads `window.FUSION_AG_GRID_KEY` to configure the AG Grid module and silence license warnings when a valid key is present. CLI docs now mention the license key setup.
326
-
327
- **Usage:**
328
- - In your SPA environment file, set `FUSION_SPA_AG_GRID_KEY=your-license-key-here`.
329
- - The SPA HTML template injects `window.FUSION_AG_GRID_KEY` before bootstrap runs, and the dev-portal picks it up automatically.
330
-
331
- Closes: https://github.com/equinor/fusion-core-tasks/issues/93
332
- Resolves: https://github.com/equinor/fusion-core-tasks/issues/92
333
- Solves: https://github.com/equinor/fusion/issues/732
334
-
335
- ### Patch Changes
336
-
337
- - Updated dependencies [[`f70d66f`](https://github.com/equinor/fusion-framework/commit/f70d66f1bc826e614140adb2c6ee052f98e3b3da)]:
338
- - @equinor/fusion-framework-module-http@7.0.6
339
- - @equinor/fusion-framework-module-msal@6.0.5
340
- - @equinor/fusion-framework-module-service-discovery@9.0.5
341
- - @equinor/fusion-framework-module-telemetry@4.6.1
342
-
343
- ## 3.0.7
344
-
345
- ### Patch Changes
346
-
347
- - [#3932](https://github.com/equinor/fusion-framework/pull/3932) [`15aaa87`](https://github.com/equinor/fusion-framework/commit/15aaa87e6a8b391c0672db0dcdca4c1cac3b50a7) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: update rollup build dependency from 4.52.5 to 4.55.2.
348
-
349
- This update includes:
350
- - Improved circular dependency handling for manual chunks
351
- - Enhanced tree-shaking for Symbol properties
352
- - Performance improvements via variable name caching
353
- - Multiple bug fixes for build edge cases
354
-
355
- No changes to CLI or plugin functionality or public APIs.
356
-
357
- ## 3.0.6
358
-
359
- ### Patch Changes
360
-
361
- - Updated dependencies [[`244d615`](https://github.com/equinor/fusion-framework/commit/244d615195721541870c98754ee37baca96b8584)]:
362
- - @equinor/fusion-framework-module-msal@6.0.4
363
-
364
- ## 3.0.5
365
-
366
- ### Patch Changes
367
-
368
- - Updated dependencies [[`655ab0e`](https://github.com/equinor/fusion-framework/commit/655ab0ea9568090271225cb51285e78c2d08941e)]:
369
- - @equinor/fusion-framework-module-msal@6.0.3
370
-
371
- ## 3.0.4
372
-
373
- ### Patch Changes
374
-
375
- - Updated dependencies [[`b8c8149`](https://github.com/equinor/fusion-framework/commit/b8c814938be4543d2522566ece10ebc6feefee75)]:
376
- - @equinor/fusion-framework-module-msal@6.0.2
377
-
378
- ## 3.0.3
379
-
380
- ### Patch Changes
381
-
382
- - [#3779](https://github.com/equinor/fusion-framework/pull/3779) [`ee6aa77`](https://github.com/equinor/fusion-framework/commit/ee6aa7764776000edab9233ad9a4716b2d85c4eb) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump vite from 7.1.12 to 7.2.4
383
-
384
- - Updated dependencies [[`e8d6784`](https://github.com/equinor/fusion-framework/commit/e8d67848d53b8e733ddb60335fedeae637131c8d)]:
385
- - @equinor/fusion-framework-module-msal@6.0.1
386
-
387
- ## 3.0.2
388
-
389
- ### Patch Changes
390
-
391
- - Updated dependencies [[`78f3679`](https://github.com/equinor/fusion-framework/commit/78f3679b09716f69b3093edcff9f06ad605092c3)]:
392
- - @equinor/fusion-framework-module-telemetry@4.6.0
393
-
394
- ## 3.0.1
395
-
396
- ### Patch Changes
397
-
398
- - Updated dependencies [[`1827381`](https://github.com/equinor/fusion-framework/commit/182738177dbbf5baaf9732ef3b540b4df80932f6)]:
399
- - @equinor/fusion-framework-module-telemetry@4.5.0
400
-
401
- ## 3.0.0
402
-
403
- ### Patch Changes
404
-
405
- - [#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.
406
- - Update MSAL client configuration to use nested auth object structure
407
- - Replace deprecated defaultAccount with account property
408
- - Update acquireToken calls to use MSAL v4 request structure
409
-
410
- These changes ensure the SPA plugin works correctly with MSAL v4 while maintaining backward compatibility.
411
-
412
- - Updated dependencies [[`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8), [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8), [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8), [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8)]:
413
- - @equinor/fusion-framework-module-http@7.0.5
414
- - @equinor/fusion-framework-module-telemetry@4.4.0
415
- - @equinor/fusion-framework-module-msal@6.0.0
416
-
417
- ## 2.0.2
418
-
419
- ### Patch Changes
420
-
421
- - [#3637](https://github.com/equinor/fusion-framework/pull/3637) [`f5b88e7`](https://github.com/equinor/fusion-framework/commit/f5b88e7ff8e896624de67bdf29091ba44bf8a628) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: bump rollup from 4.52.4 to 4.52.5 to fix sourcemap debugId generation; no public API changes.
422
-
423
- - [#3679](https://github.com/equinor/fusion-framework/pull/3679) [`1706e4c`](https://github.com/equinor/fusion-framework/commit/1706e4c503d8ef4db46a9572392d23e9c081c82c) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update @rollup/plugin-commonjs from 28.0.6 to 29.0.0, which reverts previous Node.js builtins handling changes and adds requireNodeBuiltins option.
424
-
425
- - [#3646](https://github.com/equinor/fusion-framework/pull/3646) [`581306b`](https://github.com/equinor/fusion-framework/commit/581306bb7ace1646548865ea1711255065e90570) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update @rollup/plugin-typescript from 12.1.4 to 12.3.0 for improved TypeScript processing in watch mode and allowJs support.
426
-
427
- - Updated dependencies [[`7ef76e3`](https://github.com/equinor/fusion-framework/commit/7ef76e36a854f01d1cd7bc1c40b1ca0172a01fc3), [`cd06a8a`](https://github.com/equinor/fusion-framework/commit/cd06a8a8de86a44edf349103fb9da6c8615a1d59), [`443414f`](https://github.com/equinor/fusion-framework/commit/443414fe0351b529cecf0a667383640567d05e74)]:
428
- - @equinor/fusion-framework-module-telemetry@4.3.1
429
- - @equinor/fusion-framework-module@5.0.5
430
- - @equinor/fusion-framework-module-msal@5.1.2
431
- - @equinor/fusion-framework-module-http@7.0.4
432
- - @equinor/fusion-framework-module-service-discovery@9.0.4
433
-
434
- ## 2.0.1
435
-
436
- ### Patch Changes
437
-
438
- - [#3652](https://github.com/equinor/fusion-framework/pull/3652) [`8d50adc`](https://github.com/equinor/fusion-framework/commit/8d50adc17e81fc46da81795125832af8add5f678) Thanks [@dependabot](https://github.com/apps/dependabot)! - **Security:** Update Vite to v7.1.12
439
-
440
- 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.
441
-
442
- **Changes:**
443
- - Updated Vite from v7.1.10 to v7.1.12
444
- - Includes security fix for development server file system checks
445
- - Includes compatibility fix for CommonJS plugin
446
- - No breaking changes or API modifications
447
-
448
- **Security Fix (v7.1.11):**
449
- - **dev**: trim trailing slash before `server.fs.deny` check ([#20968](https://github.com/vitejs/vite/issues/20968))
450
- - Prevents potential path traversal vulnerability in development server
451
- - Only affects development environment, not production builds
452
-
453
- **Bug Fix (v7.1.12):**
454
- - **deps**: downgrade commonjs plugin to 28.0.6 to avoid rollup/plugins issues ([#20990](https://github.com/vitejs/vite/issues/20990))
455
- - Improves compatibility with Rollup plugin ecosystem
456
- - Prevents potential build issues
457
-
458
- All packages using Vite as a development dependency are updated to the latest secure version. This is a patch-level security and bug fix update that maintains full compatibility with existing functionality.
459
-
460
- closes: https://github.com/equinor/fusion/issues/723
461
-
462
- ## 2.0.0
463
-
464
- ### Patch Changes
465
-
466
- - [#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
467
-
468
- Bug fixes:
469
- - fix: resolve bare targets of package "imports" using export maps; avoid fileURLToPath(null)
470
- - fix: error thrown with empty entry
471
-
472
- - [#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.
473
-
474
- **Changes:**
475
- - Refactor console adapter setup for cleaner conditional logic
476
- - Update setAdapter calls to include required identifier parameter
477
-
478
- **Migration:**
479
- - No breaking changes for SPA consumers - internal implementation update only
480
-
481
- - 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)]:
482
- - @equinor/fusion-framework-module-http@7.0.3
483
- - @equinor/fusion-framework-module@5.0.4
484
- - @equinor/fusion-framework-module-msal@5.1.1
485
- - @equinor/fusion-framework-module-telemetry@4.3.0
486
- - @equinor/fusion-framework-module-service-discovery@9.0.3
487
-
488
- ## 1.2.2
489
-
490
- ### Patch Changes
491
-
492
- - [#3578](https://github.com/equinor/fusion-framework/pull/3578) [`dd560e7`](https://github.com/equinor/fusion-framework/commit/dd560e75683788c875c6ba1e78463ae18d57fce2) Thanks [@Noggling](https://github.com/Noggling)! - Fix Windows compatibility issue in SPA Vite plugin
493
-
494
- 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.
495
-
496
- **Changes:**
497
- - Import `normalizePath` from Vite for consistent path normalization
498
- - Use `fileURLToPath()` to properly convert file URLs to paths
499
- - Apply `normalizePath()` to ensure consistent path separators across platforms
500
-
501
- This fix ensures the CLI and development server work correctly on Windows systems.
502
-
503
- ## 1.2.1
504
-
505
- ### Patch Changes
506
-
507
- - [#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
508
-
509
- 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:
510
- - `@equinor/fusion-framework-module`
511
- - `@equinor/fusion-framework-module-http`
512
- - `@equinor/fusion-framework-module-msal`
513
- - `@equinor/fusion-framework-module-service-discovery`
514
- - `@equinor/fusion-framework-module-telemetry`
515
-
516
- This ensures that consumers are aware of the required dependencies and helps prevent runtime errors due to missing modules.
517
-
518
- ## 1.2.0
519
-
520
- ### Minor Changes
521
-
522
- - [#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)).
523
- - Added `proxy` option to portal configuration to enable `/portal-proxy` routing
524
- - Added `FUSION_SPA_PORTAL_PROXY` environment variable support
525
- - Updated TypeScript types to include portal proxy configuration
526
- - Updated documentation with portal proxy usage examples
527
-
528
- This feature enables developers to load real portal implementations instead of the default developer portal, supporting configuration of portal ID and version tags for targeted testing scenarios.
529
-
530
- **Migration:**
531
- No migration required - the `proxy` option defaults to `false`, maintaining existing behavior.
532
-
533
- **Example usage:**
534
-
535
- ```ts
536
- portal: {
537
- id: 'my-portal',
538
- tag: 'latest',
539
- proxy: true, // Routes through /portal-proxy/
540
- }
541
- ```
542
-
543
- ## 1.1.4
544
-
545
- ### Patch Changes
546
-
547
- - [#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.
548
- - Removed `configurator.logger.level` assignment from `bootstrap.ts`
549
- - Logger level configuration should be handled elsewhere or is no longer needed
550
-
551
- This cleans up the bootstrap template by removing unused logger configuration.
552
-
553
- - [#3532](https://github.com/equinor/fusion-framework/pull/3532) [`63ecde5`](https://github.com/equinor/fusion-framework/commit/63ecde5c29e775b341c3fac0c1eeb7123db5e2db) Thanks [@dependabot](https://github.com/apps/dependabot)! - Bump vite from 7.1.8 to 7.1.9 across development tools and plugins.
554
-
555
- This patch update fixes bugs and improves stability in the vite dependency.
556
-
557
- - [#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.
558
- - Enable telemetry in SPA bootstrap with ConsoleAdapter
559
- - Add configurable console logging levels via FUSION_SPA_TELEMETRY_CONSOLE_LEVEL environment variable
560
- - Track bootstrap performance for portal loading operations
561
- - Monitor service worker registration and token acquisition
562
- - Include user metadata and portal configuration in telemetry
563
- - Track exceptions and errors throughout SPA lifecycle
564
- - Fix console level filtering logic to properly respect environment variable settings
565
-
566
- **Implementation Notes:**
567
- - Console level filtering defaults to `TelemetryLevel.Information` (1) when env var not set
568
- - Invalid env var values fallback to logging all telemetry (robust error handling)
569
- - Backward compatible: existing behavior unchanged when no FUSION_SPA_TELEMETRY_CONSOLE_LEVEL specified
570
- - Telemetry level mapping: 0=Debug, 1=Information, 2=Warning, 3=Error, 4=Critical
571
-
572
- resolves: [#3487](https://github.com/equinor/fusion-framework/issues/3487)
573
-
574
- ## 1.1.3
575
-
576
- ### Patch Changes
577
-
578
- - [`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.
579
- - Changed workspace dependencies from `workspace:^` to `workspace:*` across CLI, dev-server, and SPA vite plugin packages
580
- - Ensures exact version resolution within the monorepo for predictable builds and releases
581
- - Affects both dependencies and devDependencies where applicable
582
-
583
- ## 1.1.2
584
-
585
- ### Patch Changes
586
-
587
- - [#3470](https://github.com/equinor/fusion-framework/pull/3470) [`0734026`](https://github.com/equinor/fusion-framework/commit/073402682cacae75d82e69068e18b3061228972b) Thanks [@eikeland](https://github.com/eikeland)! - Fixed service worker not intercepting requests during hard refresh in development mode.
588
-
589
- **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`).
590
-
591
- **Root Cause**: Two related issues in the service worker lifecycle during hard refresh:
592
- 1. **Waiting state**: When code changes, the new service worker enters "waiting" state, but `skipWaiting()` only runs in the `install` event (which already fired)
593
- 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
594
-
595
- **Solution**:
596
- - **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
597
- - **Wait for controller**: Registration now waits for `navigator.serviceWorker.controller` to be set before proceeding, ensuring fetch interception is ready
598
- - **Disable service worker caching**: Added `updateViaCache: 'none'` to always fetch fresh service worker code during development
599
- - **Comprehensive state handling**: Handle service workers in installing, waiting, and active states
600
-
601
- **Changes**:
602
- 1. **sw.ts**: Call `skipWaiting()` and `clients.claim()` when receiving `INIT_CONFIG` message
603
- 2. **register-service-worker.ts**: Wait for controller with polling and timeout fallback; disable service worker HTTP caching
604
-
605
- This ensures service workers always activate and take control during hard refresh, properly intercepting and authenticating requests in development mode.
606
-
607
- reporter: [v3gard](https://github.com/v3gard)
608
-
609
- resolves: [Force refresh (CTRL+Shift+R) causes app to throw #679
610
- ](https://github.com/equinor/fusion/issues/679)
611
-
612
- ## 1.1.1
613
-
614
- ### Patch Changes
615
-
616
- - [#3432](https://github.com/equinor/fusion-framework/pull/3432) [`528d72c`](https://github.com/equinor/fusion-framework/commit/528d72c04066f93fca1fa6469f33ec8d5383dcdc) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updated vite from 7.1.5 to 7.1.7, including bug fixes for HMR, build system, and glob imports.
617
-
618
- ## 1.1.0
619
-
620
- ### Minor Changes
621
-
622
- - [#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
623
-
624
- Major version update of Vite build tool across all packages. This update includes:
625
- - Enhanced build performance and caching
626
- - Better error reporting with code frames
627
- - Improved TypeScript integration
628
- - Updated plugin ecosystem compatibility
629
- - New development server features
630
-
631
- ### Links
632
- - [Vite 7.1.5 Release Notes](https://github.com/vitejs/vite/releases/tag/v7.1.5)
633
- - [Vite 7.x Migration Guide](https://vitejs.dev/guide/migration)
634
-
635
- ## 1.0.1
636
-
637
- ### Patch Changes
638
-
639
- - [#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
640
- - Updated rollup dependency via vite transitive dependency
641
- - Includes bug fixes for tree-shaking array destructuring patterns
642
- - Performance improvements and platform support updates
643
- - No breaking changes - backward compatible update
644
-
645
- - [#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.
646
-
647
- ## Breaking Changes
648
- - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
649
- - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
650
- - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
651
- - **Coverage API**: New coverage methods `enableCoverage()` and `disableCoverage()`
652
- - **TypeScript Support**: Enhanced TypeScript integration and type definitions
653
-
654
- ## Security Updates
655
- - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
656
- - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
657
-
658
- ## Migration Notes
659
- - Test snapshots may need regeneration due to quote format changes
660
- - Some test configurations might need updates for new TypeScript support
661
- - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
662
-
663
- ## Links
664
- - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
665
- - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
666
-
667
- ## 1.0.0
668
-
669
- ### Major Changes
670
-
671
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - Introducing a powerful new Vite plugin for building Single Page Applications (SPAs) with the Fusion Framework and Vite. This plugin significantly streamlines the development workflow by automating HTML template generation, bootstrapping authentication and service discovery, and enabling seamless portal loading and API proxying.
672
-
673
- **Purpose**:
674
-
675
- 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.
676
-
677
- **Key Features**:
678
- - **Fusion Framework Bootstrap**: Automatically initializes core modules and renders configured portals
679
- - **Service Discovery**: Enables dynamic service routing and eliminates hardcoded service endpoints
680
- - **MSAL Authentication**: Provides seamless Azure AD integration with configurable authentication flows
681
- - **Service Worker**: Intercepts network requests to add authentication tokens and rewrite URLs for proxying
682
- - **Portal Integration**: Loads and renders any portal by ID from local packages or the Fusion Portal Service
683
- - **Environment Configuration**: Supports flexible configuration through code or `.env` files with proper naming conventions
684
- - **Custom Templates**: Allows full control over HTML document structure while maintaining environment variable injection
685
- - **Custom Bootstrap**: Supports advanced customization of the application initialization process
686
- - **API Service Integration**: Works with `@equinor/fusion-framework-vite-plugin-api-service` for enhanced development capabilities
687
-
688
- This plugin is designed for seamless integration with the Fusion Framework CLI and provides flexible configuration for both standard and advanced SPA scenarios.
689
-
690
- > Note: This plugin is intended for use in non-production environments only, primarily as a development and testing tool.
691
-
692
- ## 1.0.0-next.9
693
-
694
- ### Patch Changes
695
-
696
- - [#3137](https://github.com/equinor/fusion-framework/pull/3137) [`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461) Thanks [@odinr](https://github.com/odinr)! - updates from main
697
-
698
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128) Thanks [@odinr](https://github.com/odinr)! - merge with main
699
-
700
- ## 1.0.0-next.8
701
-
702
- ### Patch Changes
703
-
704
- - [#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:
705
- - Change dev server API route for portal manifest/config from `/portals/portals/...` to `/portal-config/portals/...` for alignment with client usage.
706
- - Make portal config optional in dev server route and type definitions.
707
- - Update SPA bootstrap to use `portal-config` as the service discovery client key.
708
- - Refactor portal manifest/config loading and merging to use `RecursivePartial` and `lodash.mergewith` for deep merge support.
709
- - Remove unused zod import from portal config type.
710
-
711
- These changes improve consistency, flexibility, and correctness in portal manifest/config handling across CLI and SPA plugin.
712
-
713
- ## 1.0.0-next.7
714
-
715
- ### Patch Changes
716
-
717
- - [#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:
718
- - Move "lodash.mergewith" to dependencies and ensure correct version for @types/lodash.mergewith in devDependencies.
719
- - Remove duplicate and misplaced entries for lodash.mergewith and its types.
720
- - Remove unused @equinor/fusion-framework-vite-plugin-api-service from devDependencies.
721
- - Update lockfile to match package.json changes.
722
-
723
- This ensures correct dependency management and resolves potential issues with type resolution and package installation.
724
-
725
- ## 1.0.0-next.6
726
-
727
- ### Patch Changes
728
-
729
- - [#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:
730
- - Made `resolveId` and `config` hooks async to support dynamic import resolution for virtual modules.
731
- - Improved resource alias resolution for `/@fusion-spa-bootstrap.js` and `/@fusion-spa-sw.js` using `import.meta.resolve` and `fileURLToPath`.
732
- - Enhanced environment variable handling by merging plugin and loaded environments, and defining them on `config.define`.
733
- - Ensured the Vite dev server allows access to the correct `../html` directory for SPA templates.
734
- - Added more robust logging for environment configuration and plugin setup.
735
-
736
- ## 1.0.0-next.5
737
-
738
- ### Minor Changes
739
-
740
- - [#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:
741
- - Change main export entrypoint to `./dist/bin/index.js` (was `./dist/esm/index.js`).
742
- - Remove the `./html` export subpath.
743
- - Update Rollup config to bundle from `dist/esm` to `dist/bin` and adjust input/output accordingly.
744
- - Remove `postbuild` script and add `prebuild` script for TypeScript project references build.
745
- - Minor formatting improvements in `package.json`.
746
-
747
- These changes improve the build pipeline and clarify the published entrypoints for consumers.
748
-
749
- ## 1.0.0-next.4
750
-
751
- ### Patch Changes
752
-
753
- - [#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:
754
- - Switch build script to use Rollup with a new `rollup.config.js` for ESM output
755
- - Add postbuild script to emit TypeScript declarations
756
- - Move all dependencies to devDependencies for clarity
757
- - Add and update Rollup-related devDependencies (including plugins and types)
758
- - Update `pnpm-lock.yaml` to reflect new and updated dependencies
759
- - Minor formatting and consistency improvements in `package.json` and `tsconfig.json`
760
-
761
- These changes modernize the build process and improve maintainability for the SPA Vite plugin package.
762
-
763
- ## 1.0.0-next.3
764
-
765
- ### Patch Changes
766
-
767
- - Updated dependencies [[`bbda62d`](https://github.com/equinor/fusion-framework/commit/bbda62def35c8e8b742d90459680f7199c4ece0f)]:
768
- - @equinor/fusion-framework-module@4.4.3-next.1
769
- - @equinor/fusion-framework-module-http@6.3.3-next.2
770
- - @equinor/fusion-framework-module-msal@4.0.7-next.1
771
- - @equinor/fusion-framework-module-service-discovery@8.0.15-next.2
772
-
773
- ## 1.0.0-next.2
774
-
775
- ### Patch Changes
776
-
777
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`ca8d6c8`](https://github.com/equinor/fusion-framework/commit/ca8d6c834f9df35041ce8c7e2563c452d8b19276) Thanks [@odinr](https://github.com/odinr)! - Allow the plugin to access the template file by updating the Vite server file system allow list. This ensures the template can be served correctly during development.
778
-
779
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`7878f59`](https://github.com/equinor/fusion-framework/commit/7878f591c528d463bfbe558094c2c31004db8586) Thanks [@odinr](https://github.com/odinr)! - Update bootstrap logic to improve service discovery, authentication, and portal manifest loading. Refactored the initialization sequence and clarified environment variable usage in `bootstrap.ts`. No breaking changes expected.
780
-
781
- - Updated dependencies [[`53ef326`](https://github.com/equinor/fusion-framework/commit/53ef32633ce1c050e20614f1343148327a40b2e6)]:
782
- - @equinor/fusion-framework-module@4.4.3-next.0
783
- - @equinor/fusion-framework-module-http@6.3.3-next.1
784
- - @equinor/fusion-framework-module-msal@4.0.7-next.0
785
- - @equinor/fusion-framework-module-service-discovery@8.0.15-next.1
786
-
787
- ## 1.0.0-next.1
788
-
789
- ### Patch Changes
790
-
791
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`96ad5d3`](https://github.com/equinor/fusion-framework/commit/96ad5d3a3aafe7adf5bd7f8e48e58bb19aa95ba8) Thanks [@odinr](https://github.com/odinr)! - Add prepack script to run build before packaging
792
-
793
- A `prepack` script was added to both the SPA and API service Vite plugin packages. This ensures the build step runs automatically before packaging, improving reliability of published artifacts.
794
-
795
- - Updated dependencies [[`96ad5d3`](https://github.com/equinor/fusion-framework/commit/96ad5d3a3aafe7adf5bd7f8e48e58bb19aa95ba8)]:
796
- - @equinor/fusion-framework-vite-plugin-api-service@1.0.0-next.1
797
-
798
- ## 1.0.0-next.0
799
-
800
- ### Major Changes
801
-
802
- - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - ---
803
-
804
- **New Package: Fusion Framework Vite SPA Plugin**
805
-
806
- This plugin enables building single-page applications (SPAs) with Vite. It provides features such as service discovery, MSAL authentication, and service worker configuration.
807
-
808
- **Features**:
809
- - **Service Discovery**: Fetch service discovery configurations and authenticate requests.
810
- - **MSAL Authentication**: Authenticate users with Azure AD.
811
- - **Service Worker**: Intercept fetch requests, apply authentication headers, and rewrite URLs.
812
- - **Custom Templates**: Define custom HTML templates for SPAs.
813
- - **Environment Configuration**: Configure the plugin using `.env` files or programmatically.
814
-
815
- **Usage**:
816
-
817
- ```ts
818
- import { defineConfig } from "vite";
819
- import { plugin as fusionSpaPlugin } from "@equinor/fusion-framework-vite-plugin-spa";
820
-
821
- export default defineConfig({
822
- plugins: [fusionSpaPlugin()],
823
- });
824
- ```
825
-
826
- ```ts
827
- fusionSpaPlugin({
828
- generateTemplateEnv: () => ({
829
- title: "My App",
830
- portal: {
831
- id: "my-portal",
832
- },
833
- serviceDiscovery: {
834
- url: "https://my-server.com/service-discovery",
835
- scopes: ["api://my-app/scope"],
836
- },
837
- msal: {
838
- tenantId: "my-tenant-id",
839
- clientId: "my-client-id",
840
- redirectUri: "https://my-app.com/auth-callback",
841
- requiresAuth: "true",
842
- },
843
- serviceWorker: {
844
- resources: [
845
- {
846
- url: "/app-proxy",
847
- rewrite: "/@fusion-api/app",
848
- scopes: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/.default"],
849
- },
850
- ],
851
- },
852
- }),
853
- });
854
- ```
855
-
856
- **Additional Details**:
857
- - **Custom Bootstrap**: Allows defining custom bootloader scripts.
858
- - **Dynamic Proxy**: Supports dynamic proxy services using `@equinor/fusion-framework-vite-plugin-api-service`.
859
- - **Environment Variables**: Automatically maps `.env` variables to `import.meta.env`.
860
-
861
- Refer to the README for detailed documentation.
862
-
863
- ### Patch Changes
864
-
865
- - [#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
866
- - 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.
867
- - This enables portals to receive their runtime configuration directly at startup.
868
-
869
- - [#3074](https://github.com/equinor/fusion-framework/pull/3074) [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13) Thanks [@odinr](https://github.com/odinr)! - update Vite to 6.3.5
870
-
871
- - Updated dependencies [[`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13), [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13), [`6b034e5`](https://github.com/equinor/fusion-framework/commit/6b034e5459094cea0c0f2490335eef3092390a13)]:
872
- - @equinor/fusion-framework-vite-plugin-api-service@1.0.0-next.0
873
- - @equinor/fusion-framework-module-http@6.3.3-next.0
874
- - @equinor/fusion-framework-module-service-discovery@8.0.15-next.0