@equinor/fusion-framework-vite-plugin-spa 1.1.3 → 1.2.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,65 @@
1
1
  # @equinor/fusion-framework-vite-plugin-spa
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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)).
8
+
9
+ - Added `proxy` option to portal configuration to enable `/portal-proxy` routing
10
+ - Added `FUSION_SPA_PORTAL_PROXY` environment variable support
11
+ - Updated TypeScript types to include portal proxy configuration
12
+ - Updated documentation with portal proxy usage examples
13
+
14
+ 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.
15
+
16
+ **Migration:**
17
+ No migration required - the `proxy` option defaults to `false`, maintaining existing behavior.
18
+
19
+ **Example usage:**
20
+
21
+ ```ts
22
+ portal: {
23
+ id: 'my-portal',
24
+ tag: 'latest',
25
+ proxy: true, // Routes through /portal-proxy/
26
+ }
27
+ ```
28
+
29
+ ## 1.1.4
30
+
31
+ ### Patch Changes
32
+
33
+ - [#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.
34
+
35
+ - Removed `configurator.logger.level` assignment from `bootstrap.ts`
36
+ - Logger level configuration should be handled elsewhere or is no longer needed
37
+
38
+ This cleans up the bootstrap template by removing unused logger configuration.
39
+
40
+ - [#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.
41
+
42
+ This patch update fixes bugs and improves stability in the vite dependency.
43
+
44
+ - [#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.
45
+
46
+ - Enable telemetry in SPA bootstrap with ConsoleAdapter
47
+ - Add configurable console logging levels via FUSION_SPA_TELEMETRY_CONSOLE_LEVEL environment variable
48
+ - Track bootstrap performance for portal loading operations
49
+ - Monitor service worker registration and token acquisition
50
+ - Include user metadata and portal configuration in telemetry
51
+ - Track exceptions and errors throughout SPA lifecycle
52
+ - Fix console level filtering logic to properly respect environment variable settings
53
+
54
+ **Implementation Notes:**
55
+
56
+ - Console level filtering defaults to `TelemetryLevel.Information` (1) when env var not set
57
+ - Invalid env var values fallback to logging all telemetry (robust error handling)
58
+ - Backward compatible: existing behavior unchanged when no FUSION_SPA_TELEMETRY_CONSOLE_LEVEL specified
59
+ - Telemetry level mapping: 0=Debug, 1=Information, 2=Warning, 3=Error, 4=Critical
60
+
61
+ resolves: [#3487](https://github.com/equinor/fusion-framework/issues/3487)
62
+
3
63
  ## 1.1.3
4
64
 
5
65
  ### Patch Changes
package/README.md CHANGED
@@ -40,36 +40,6 @@ A powerful Vite plugin for building Single Page Applications (SPAs) with the Fus
40
40
  >
41
41
  > The plugin is written in a modular fashion, allowing for easy customization and extension __IF__ the developer has a deep understanding of the Fusion Framework and its internals.
42
42
 
43
- ## Table of Contents
44
-
45
- - [Fusion Framework Vite SPA Plugin](#fusion-framework-vite-spa-plugin)
46
- - [Table of Contents](#table-of-contents)
47
- - [What It Does](#what-it-does)
48
- - [How the Plugin Works](#how-the-plugin-works)
49
- - [Getting Started](#getting-started)
50
- - [Configuration Options](#configuration-options)
51
- - [Basic Configuration](#basic-configuration)
52
- - [Service Discovery](#service-discovery)
53
- - [MSAL](#msal)
54
- - [Service Worker](#service-worker)
55
- - [Configuring through `.env` File](#configuring-through-env-file)
56
- - [How Environment Variables Work](#how-environment-variables-work)
57
- - [Naming Convention](#naming-convention)
58
- - [Example Conversion](#example-conversion)
59
- - [Complete `.env` Example](#complete-env-example)
60
- - [Advanced Customization](#advanced-customization)
61
- - [Providing a Custom Template](#providing-a-custom-template)
62
- - [Providing Custom Bootstrap](#providing-custom-bootstrap)
63
- - [Examples](#examples)
64
- - [Basic SPA Configuration](#basic-spa-configuration)
65
- - [Using with API Service Plugin](#using-with-api-service-plugin)
66
- - [Troubleshooting \& FAQ](#troubleshooting--faq)
67
- - [Common Issues](#common-issues)
68
- - [Known Issues](#known-issues)
69
- - [Best Practices \& FAQ](#best-practices--faq)
70
- - [Contributing](#contributing)
71
-
72
-
73
43
  ## What It Does
74
44
 
75
45
  The plugin:
@@ -146,6 +116,7 @@ fusionSpaPlugin({
146
116
  // 2. An ID from the Fusion Portal Service
147
117
  // 3. Any other configured portal ID
148
118
  tag: 'latest', // (Optional) Version tag (defaults to 'latest')
119
+ proxy: false, // (Optional) Whether to proxy portal requests through /portal-proxy (defaults to false)
149
120
  },
150
121
 
151
122
  // Service Discovery configuration
@@ -175,6 +146,36 @@ fusionSpaPlugin({
175
146
  })
176
147
  });
177
148
  ```
149
+
150
+ ### Portal Proxy
151
+
152
+ The portal proxy feature allows you to route portal entry point requests through a `/portal-proxy` path prefix. When enabled, the plugin will attempt to load portal code from URLs prefixed with `/portal-proxy/`, which can be useful when working with proxy servers or development environments that need to intercept and route portal requests.
153
+
154
+ **Behavior:**
155
+
156
+ - `proxy: true` → Portal loads from `/portal-proxy/{assetPath}/{templateEntry}` (allows proxy interception)
157
+ - `proxy: false` → Portal loads from `{assetPath}/{templateEntry}` (direct loading)
158
+
159
+ **Configuration Options:**
160
+
161
+ - `proxy`: When set to `true`, portal entry points will be prefixed with `/portal-proxy`
162
+
163
+ **When to Use Portal Proxy:**
164
+
165
+ - Development environments where portal assets need to be served through a proxy
166
+ - Deployment scenarios requiring portal routing through specific paths
167
+ - When working with the API Service Plugin for advanced portal loading
168
+
169
+ **Example:**
170
+
171
+ ```ts
172
+ portal: {
173
+ id: 'my-portal',
174
+ tag: 'latest',
175
+ proxy: true, // Portal will be loaded from /portal-proxy/{assetPath}/{templateEntry}
176
+ }
177
+ ```
178
+
178
179
  See [@equinor/fusion-framework-vite-plugin-api-service](https://github.com/equinor/fusion-framework/tree/main/packages/vite-plugins/api-service) for advanced API proxying.
179
180
 
180
181
  ### Service Discovery
@@ -280,7 +281,41 @@ When the above `fetch` request is made, the following happens:
280
281
  > The `url` path doesn't need to correspond to an actual endpoint—it's simply a pattern used for matching requests. This allows you to emulate proxy services in production environments without changing your application code.
281
282
 
282
283
  > [!TIP]
283
- > For enhanced development capabilities, consider using the `@equinor/fusion-framework-vite-plugin-api-service` plugin. This plugin creates a dynamic proxy service that can handle requests to the `/@fusion-api/app` path by intercepting them in the dev-server and routing them based on service discovery configuration.
284
+ > For enhanced development capabilities, consider using the `@equinor/fusion-framework-vite-plugin-api-service` plugin. This plugin creates a dynamic proxy service that can handle requests to the `/@fusion-api/app` path by intercepting them in the dev-server and routing them based on service discovery configuration.
285
+
286
+ ## Telemetry
287
+
288
+ The Fusion Framework SPA plugin includes built-in telemetry configuration that automatically sets up console logging for development and debugging purposes. The plugin uses the `@equinor/fusion-framework-module-telemetry` module to provide structured logging with different severity levels.
289
+
290
+ ### Telemetry Levels
291
+
292
+ The telemetry system supports the following severity levels (ordered from lowest to highest):
293
+
294
+ - **Debug** (0): Debugging information useful during development
295
+ - **Information** (1): General information about the system's operation
296
+ - **Warning** (2): Indicates a potential issue that is not critical
297
+ - **Error** (3): Represents an error that has occurred, but the system can continue running
298
+ - **Critical** (4): A severe error that may cause the system to stop functioning
299
+
300
+ ### Console Logging
301
+
302
+ By default, the plugin enables console logging for all telemetry events. You can control the minimum log level displayed in the console using the `FUSION_SPA_TELEMETRY_CONSOLE_LEVEL` environment variable.
303
+
304
+ ```typescript
305
+ // Environment variable configuration
306
+ FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=2 // Only show Warning, Error, and Critical events
307
+ ```
308
+
309
+ When set to a valid number, only telemetry items with a level **greater than or equal to** the specified value will be logged to the console. For example:
310
+ - `FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=0` → Shows all telemetry events (Debug, Information, Warning, Error, Critical)
311
+ - `FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=1` → Shows Information, Warning, Error, and Critical events
312
+ - `FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=2` → Shows Warning, Error, and Critical events
313
+
314
+ If the environment variable is not set, the default is `FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=1` (Information level and above). If the environment variable contains an invalid value, all telemetry events will be logged to the console.
315
+
316
+ ### Custom Telemetry Configuration
317
+
318
+ For advanced telemetry setup (such as Application Insights integration), you can customize the telemetry configuration by providing a custom bootstrap file. See the [Providing Custom Bootstrap](#providing-custom-bootstrap) section for details.
284
319
 
285
320
  ## Configuring through `.env` File
286
321
 
@@ -326,6 +361,8 @@ import.meta.env.FUSION_SPA_SERVICE_WORKER_RESOURCES
326
361
  # Application basics
327
362
  FUSION_SPA_TITLE=My App
328
363
  FUSION_SPA_PORTAL_ID=my-portal # Can be a package name, Fusion Portal Service ID, or any configured portal ID
364
+ FUSION_SPA_PORTAL_TAG=latest # (Optional) Version tag (defaults to 'latest')
365
+ FUSION_SPA_PORTAL_PROXY=false # (Optional) Whether to proxy portal requests through /portal-proxy (defaults to false)
329
366
 
330
367
  # Service Discovery configuration
331
368
  FUSION_SPA_SERVICE_DISCOVERY_URL=https://my-server.com/service-discovery
@@ -337,6 +374,9 @@ FUSION_SPA_MSAL_CLIENT_ID=my-client-id
337
374
  FUSION_SPA_MSAL_REDIRECT_URI=https://my-app.com/auth-callback
338
375
  FUSION_SPA_MSAL_REQUIRES_AUTH=true
339
376
 
377
+ # Telemetry configuration
378
+ FUSION_SPA_TELEMETRY_CONSOLE_LEVEL=2 # Only log Warning, Error, and Critical events to console
379
+
340
380
  # Service Worker configuration (as JSON string)
341
381
  FUSION_SPA_SERVICE_WORKER_RESOURCES=[{"url":"/app-proxy","rewrite":"/@fusion-api/app","scopes":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/.default"]}]
342
382
  ```
@@ -466,6 +506,9 @@ export default defineConfig({
466
506
  redirectUri: 'http://localhost:3000/auth-callback',
467
507
  requiresAuth: 'true',
468
508
  },
509
+ telemetry: {
510
+ consoleLevel: 2, // Show Warning, Error, and Critical events
511
+ },
469
512
  }),
470
513
  }),
471
514
  ],
@@ -2,12 +2,14 @@ import { ModulesConfigurator } from '@equinor/fusion-framework-module';
2
2
  import { configureHttpClient } from '@equinor/fusion-framework-module-http';
3
3
  import { enableMSAL } from '@equinor/fusion-framework-module-msal';
4
4
  import { enableServiceDiscovery, } from '@equinor/fusion-framework-module-service-discovery';
5
+ import { enableTelemetry, TelemetryLevel, } from '@equinor/fusion-framework-module-telemetry';
6
+ import { ConsoleAdapter } from '@equinor/fusion-framework-module-telemetry/console-adapter';
5
7
  import { registerServiceWorker } from './register-service-worker.js';
8
+ import { version } from '../version.js';
6
9
  // Allow dynamic import without vite
7
10
  const importWithoutVite = (path) => import(/* @vite-ignore */ path);
8
11
  // Create Fusion Framework configurator
9
12
  const configurator = new ModulesConfigurator();
10
- configurator.logger.level = import.meta.env.FUSION_SPA_LOG_LEVEL ?? 1;
11
13
  const serviceDiscoveryUrl = new URL(import.meta.env.FUSION_SPA_SERVICE_DISCOVERY_URL, import.meta.env.FUSION_SPA_SERVICE_DISCOVERY_URL.startsWith('http')
12
14
  ? undefined
13
15
  : window.location.origin);
@@ -29,28 +31,113 @@ enableMSAL(configurator, (builder) => {
29
31
  });
30
32
  builder.setRequiresAuth(Boolean(import.meta.env.FUSION_SPA_MSAL_REQUIRES_AUTH));
31
33
  });
34
+ enableTelemetry(configurator, {
35
+ attachConfiguratorEvents: true,
36
+ configure: (builder) => {
37
+ const consoleLevel = Number(import.meta.env.FUSION_SPA_TELEMETRY_CONSOLE_LEVEL ?? TelemetryLevel.Information);
38
+ if (Number.isNaN(consoleLevel)) {
39
+ // If environment variable is set but invalid, log all telemetry
40
+ builder.setAdapter(new ConsoleAdapter());
41
+ }
42
+ else {
43
+ builder.setAdapter(new ConsoleAdapter({
44
+ filter: (item) => item.level >= consoleLevel,
45
+ }));
46
+ }
47
+ builder.setMetadata(({ modules }) => {
48
+ const metadata = {
49
+ fusion: {
50
+ spa: {
51
+ version,
52
+ },
53
+ },
54
+ // biome-ignore lint/suspicious/noExplicitAny: we need to use any here to allow dynamic properties
55
+ };
56
+ if (modules?.auth) {
57
+ metadata.fusion.user = {
58
+ id: modules.auth.defaultAccount?.homeAccountId,
59
+ name: modules.auth.defaultAccount?.name,
60
+ email: modules.auth.defaultAccount?.username,
61
+ };
62
+ }
63
+ return metadata;
64
+ });
65
+ },
66
+ });
32
67
  (async () => {
33
68
  // initialize the framework - this will create the framework instance and configure the modules
34
69
  const ref = await configurator.initialize();
70
+ const telemetry = ref.telemetry;
35
71
  // attach service discovery to the framework - append auth token to configured endpoints
36
- await registerServiceWorker(ref);
72
+ using measurement = telemetry.measure({
73
+ name: 'bootstrap',
74
+ level: TelemetryLevel.Information,
75
+ });
76
+ await measurement.clone().resolve(registerServiceWorker(ref), {
77
+ data: {
78
+ level: TelemetryLevel.Debug,
79
+ name: 'bootstrap::registerServiceWorker',
80
+ },
81
+ });
37
82
  // create a client for the portal service - this is used to fetch the portal manifest
38
83
  const portalClient = await ref.serviceDiscovery.createClient('portal-config');
39
84
  // fetch the portal manifest - this is used to load the portal template
40
85
  const portalId = import.meta.env.FUSION_SPA_PORTAL_ID;
41
86
  const portalTag = import.meta.env.FUSION_SPA_PORTAL_TAG ?? 'latest';
42
- const portal_manifest = await portalClient.json(`/portals/${portalId}@${portalTag}`);
43
- const portal_config = await portalClient.json(`/portals/${portalId}@${portalTag}/config`);
87
+ const portalProxy = import.meta.env.FUSION_SPA_PORTAL_PROXY ?? false;
88
+ const portal_manifest = await measurement
89
+ .clone()
90
+ .resolve(portalClient.json(`/portals/${portalId}@${portalTag}`), {
91
+ data: (manifest) => ({
92
+ name: 'bootstrap::loadPortalManifest',
93
+ level: TelemetryLevel.Debug,
94
+ properties: {
95
+ portalId,
96
+ portalTag,
97
+ templateEntry: manifest.build.templateEntry,
98
+ manifestVersion: manifest.build.config?.version,
99
+ assetPath: manifest.build.assetPath,
100
+ },
101
+ }),
102
+ });
103
+ const portal_config = await measurement
104
+ .clone()
105
+ .resolve(portalClient.json(`/portals/${portalId}@${portalTag}/config`), {
106
+ data: {
107
+ name: 'bootstrap::loadPortalConfig',
108
+ level: TelemetryLevel.Debug,
109
+ properties: {
110
+ portalId,
111
+ portalTag,
112
+ },
113
+ },
114
+ });
44
115
  // create a entrypoint for the portal - this is used to render the portal
45
116
  const el = document.createElement('div');
46
117
  document.body.innerHTML = '';
47
118
  document.body.appendChild(el);
48
- const portalEntryPoint = [portal_manifest.build.assetPath, portal_manifest.build.templateEntry]
119
+ const portalEntryPoint = [
120
+ portalProxy ? '/portal-proxy' : '',
121
+ portal_manifest.build.assetPath,
122
+ portal_manifest.build.templateEntry,
123
+ ]
49
124
  .filter(Boolean)
50
125
  .join('/');
51
126
  // @todo: should test if the entrypoint is external or internal
52
127
  // @todo: add proper return type
53
- const { render } = await importWithoutVite(portalEntryPoint);
128
+ const { render } = await measurement
129
+ .clone()
130
+ .resolve(importWithoutVite(portalEntryPoint), {
131
+ data: {
132
+ name: 'bootstrap::loadPortalSourceCode',
133
+ level: TelemetryLevel.Debug,
134
+ properties: {
135
+ portalId,
136
+ portalTag,
137
+ entryPoint: portalEntryPoint,
138
+ },
139
+ },
140
+ });
54
141
  // render the portal - this will load the portal template and render it
55
142
  render(el, { ref, manifest: portal_manifest, config: portal_config });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KAAK;YAC3B,UAAU,EAAE;gBACV,QAAQ;gBACR,SAAS;aACV;SACF;KACF,CAAC,CAAC;IAEL,yEAAyE;IACzE,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAE9B,MAAM,gBAAgB,GAAG;QACvB,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE;QAClC,eAAe,CAAC,KAAK,CAAC,SAAS;QAC/B,eAAe,CAAC,KAAK,CAAC,aAAa;KACpC;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,+DAA+D;IAC/D,gCAAgC;IAChC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,WAAW;SACjC,KAAK,EAAE;SACP,OAAO,CACN,iBAAiB,CAAoD,gBAAgB,CAAC,EACtF;QACE,IAAI,EAAE;YACJ,IAAI,EAAE,iCAAiC;YACvC,KAAK,EAAE,cAAc,CAAC,KAAK;YAC3B,UAAU,EAAE;gBACV,QAAQ;gBACR,SAAS;gBACT,UAAU,EAAE,gBAAgB;aAC7B;SACF;KACF,CACF,CAAC;IAEJ,uEAAuE;IACvE,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC,EAAE,CAAC"}
@@ -1,12 +1,24 @@
1
+ import { TelemetryLevel } from '@equinor/fusion-framework-module-telemetry';
1
2
  export async function registerServiceWorker(framework) {
3
+ const telemetry = framework.telemetry;
2
4
  if ('serviceWorker' in navigator === false) {
3
- console.warn('Service workers are not supported in this browser.');
4
- return;
5
+ const exception = new Error('Service workers are not supported in this browser.');
6
+ exception.name = 'ServiceWorkerNotSupported';
7
+ telemetry.trackException({
8
+ name: `registerServiceWorker.${exception.name}`,
9
+ exception,
10
+ });
11
+ throw exception;
5
12
  }
6
13
  const resourceConfigs = import.meta.env.FUSION_SPA_SERVICE_WORKER_RESOURCES;
7
14
  if (!resourceConfigs) {
8
- console.warn('Service worker config is not defined.');
9
- return;
15
+ const exception = new Error('Service worker config is not defined.');
16
+ exception.name = 'ServiceWorkerConfigNotDefined';
17
+ telemetry.trackException({
18
+ name: `registerServiceWorker.${exception.name}`,
19
+ exception,
20
+ });
21
+ throw exception;
10
22
  }
11
23
  /**
12
24
  * Helper function to send configuration to the service worker
@@ -27,12 +39,16 @@ export async function registerServiceWorker(framework) {
27
39
  // extract scopes from the event data
28
40
  const scopes = event.data.scopes;
29
41
  if (!scopes || !Array.isArray(scopes)) {
30
- throw new Error('Invalid scopes provided');
42
+ const error = new Error('Invalid scopes provided');
43
+ error.name = 'InvalidScopesProvided';
44
+ throw error;
31
45
  }
32
46
  // request a token from the MSAL module
33
47
  const token = await framework.auth.acquireToken({ scopes });
34
48
  if (!token) {
35
- throw new Error('Failed to acquire token');
49
+ const error = new Error('Failed to acquire token');
50
+ error.name = 'FailedToAcquireToken';
51
+ throw error;
36
52
  }
37
53
  // send the token back to the service worker
38
54
  event.ports[0].postMessage({
@@ -41,19 +57,33 @@ export async function registerServiceWorker(framework) {
41
57
  });
42
58
  }
43
59
  catch (error) {
60
+ const exception = error;
61
+ telemetry.trackException({
62
+ name: `serviceWorker.onMessage.${exception.name}`,
63
+ exception,
64
+ });
44
65
  event.ports[0].postMessage({
45
66
  error: error.message,
46
67
  });
47
68
  }
48
69
  }
49
70
  });
50
- // register the service worker
71
+ // register the service worker with telemetry
51
72
  // updateViaCache: 'none' ensures the service worker script is always fetched fresh
52
73
  // This is important during development to pick up code changes
53
- const registration = await navigator.serviceWorker.register('/@fusion-spa-sw.js', {
74
+ using measurement = telemetry.measure({
75
+ name: 'registerServiceWorker',
76
+ level: TelemetryLevel.Information,
77
+ });
78
+ const registration = await measurement.clone().resolve(navigator.serviceWorker.register('/@fusion-spa-sw.js', {
54
79
  type: 'module',
55
80
  scope: '/',
56
81
  updateViaCache: 'none',
82
+ }), {
83
+ data: {
84
+ name: 'registerServiceWorker.register',
85
+ level: TelemetryLevel.Debug,
86
+ },
57
87
  });
58
88
  // Handle service worker updates/installations
59
89
  // If there's a service worker waiting or installing, send config when it activates
@@ -75,7 +105,12 @@ export async function registerServiceWorker(framework) {
75
105
  }
76
106
  });
77
107
  // wait for the service worker to be ready
78
- const readyRegistration = await navigator.serviceWorker.ready;
108
+ const readyRegistration = await measurement.clone().resolve(navigator.serviceWorker.ready, {
109
+ data: {
110
+ name: 'registerServiceWorker.ready',
111
+ level: TelemetryLevel.Debug,
112
+ },
113
+ });
79
114
  // ensure we have an active service worker before sending config
80
115
  const activeWorker = readyRegistration.active;
81
116
  if (!activeWorker) {
@@ -85,7 +120,7 @@ export async function registerServiceWorker(framework) {
85
120
  // CRITICAL: Wait for the service worker to become the controller
86
121
  // This ensures the service worker can intercept fetch requests
87
122
  if (!navigator.serviceWorker.controller) {
88
- await new Promise((resolve) => {
123
+ await measurement.clone().resolve(new Promise((resolve) => {
89
124
  let checkInterval;
90
125
  const finish = () => {
91
126
  clearInterval(checkInterval);
@@ -101,6 +136,11 @@ export async function registerServiceWorker(framework) {
101
136
  finish();
102
137
  }, 200);
103
138
  setTimeout(finish, 5000);
139
+ }), {
140
+ data: {
141
+ name: 'registerServiceWorker.controllerWait',
142
+ level: TelemetryLevel.Debug,
143
+ },
104
144
  });
105
145
  }
106
146
  // send the config to the active service worker
@@ -111,7 +151,10 @@ export async function registerServiceWorker(framework) {
111
151
  }
112
152
  }
113
153
  catch (error) {
114
- console.error('Service Worker registration failed:', error);
154
+ telemetry.trackException({
155
+ name: `registerServiceWorker.${error.name}`,
156
+ exception: error,
157
+ });
115
158
  }
116
159
  }
117
160
  //# sourceMappingURL=register-service-worker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-service-worker.js","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AC,CAAC;QAExC,wEAAwE;QACxE,IAAI,SAAS,CAAC,aAAa,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,CAAC,UAAU,KAAK,YAAY,EAAE,CAAC;YAC9F,yBAAyB,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"register-service-worker.js","sourceRoot":"","sources":["../../../src/html/register-service-worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAwB,MAAM,4CAA4C,CAAC;AAElG,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,SAAyD;IAEzD,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IACtC,IAAI,eAAe,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAClF,SAAS,CAAC,IAAI,GAAG,2BAA2B,CAAC;QAC7C,SAAS,CAAC,cAAc,CAAC;YACvB,IAAI,EAAE,yBAAyB,SAAS,CAAC,IAAI,EAAE;YAC/C,SAAS;SACV,CAAC,CAAC;QACH,MAAM,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,mCAAmC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACrE,SAAS,CAAC,IAAI,GAAG,+BAA+B,CAAC;QACjD,SAAS,CAAC,cAAc,CAAC;YACvB,IAAI,EAAE,yBAAyB,SAAS,CAAC,IAAI,EAAE;YAC/C,SAAS;SACV,CAAC,CAAC;QACH,MAAM,SAAS,CAAC;IAClB,CAA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