@equinor/fusion-framework-dev-server 1.1.32-next.0 → 2.0.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,15 +1,38 @@
1
1
  # @equinor/fusion-framework-dev-server
2
2
 
3
- ## 1.1.32-next.0
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - abffa53: Major version bump for Fusion Framework React 19 release.
8
+
9
+ 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.
10
+
11
+ **Breaking changes:**
12
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
13
+ - React Router upgraded from v6 to v7
14
+ - Navigation module refactored with new history API
15
+ - `renderComponent` and `renderApp` now use `createRoot` API
16
+
17
+ **Migration:**
18
+ - Update your React version to 18.0.0 or higher before upgrading
19
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
20
+ - See individual package changelogs for package-specific migration steps
4
21
 
5
22
  ### Patch Changes
6
23
 
7
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78) Thanks [@odinr](https://github.com/odinr)! - relase next
24
+ - aa35c46: chore: bump @vitejs/plugin-react from 5.1.4 to 6.0.1
25
+ - 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
26
+
27
+ Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
28
+ No breaking API changes affect this codebase. The `dev-server` peerDependency
29
+ is widened to accept both Vite 7 and Vite 8.
8
30
 
9
- - Updated dependencies [[`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78)]:
10
- - @equinor/fusion-framework-vite-plugin-api-service@1.2.6-next.0
11
- - @equinor/fusion-log@1.1.9-next.0
12
- - @equinor/fusion-framework-vite-plugin-spa@3.1.12-next.0
31
+ - Updated dependencies [abffa53]
32
+ - Updated dependencies [32bcf83]
33
+ - @equinor/fusion-framework-vite-plugin-api-service@2.0.0
34
+ - @equinor/fusion-framework-vite-plugin-spa@4.0.0
35
+ - @equinor/fusion-log@2.0.0
13
36
 
14
37
  ## 1.1.31
15
38
 
package/README.md CHANGED
@@ -46,6 +46,8 @@ await devServer.listen();
46
46
  devServer.printUrls();
47
47
  ```
48
48
 
49
+ If you only need the Vite configuration object without starting the server, use `createDevServerConfig(options, overrides?)` instead. This returns a `UserConfig` that you can pass to Vite directly or merge with other configurations.
50
+
49
51
  ## Configuration
50
52
 
51
53
  The dev server accepts a configuration object with the following structure:
@@ -66,7 +68,10 @@ Configure the Single Page Application environment and template generation:
66
68
  // Application title
67
69
  title: 'My Application',
68
70
 
69
- // Service discovery settings
71
+ // Service discovery settings (SPA-side — tells the browser where to find services)
72
+ // The API-side counterpart is `api.serviceDiscoveryUrl` which sets up server-side proxying.
73
+ // During development you can redirect individual services to local URLs by storing
74
+ // overrides in sessionStorage under the key "overriddenServiceDiscoveryUrls".
70
75
  serviceDiscovery: {
71
76
  url: 'https://service-discovery.example.com',
72
77
  scopes: ['scope1', 'scope2'],
@@ -111,6 +116,8 @@ Configure API proxying and service discovery:
111
116
  serviceDiscoveryUrl: 'https://service-discovery.example.com',
112
117
 
113
118
  // Optional: Custom service processing
119
+ // Takes an array of FusionService objects ({ key, uri, name }) from discovery
120
+ // and returns { data: FusionService[], routes: ApiRoute[] } with proxy routes.
114
121
  processServices: (services, route) => {
115
122
  // Process and return services with routes
116
123
  return processServices(services, route);
@@ -4,39 +4,62 @@ import apiServicePlugin, { createProxyHandler, } from '@equinor/fusion-framework
4
4
  import fusionSpaPlugin from '@equinor/fusion-framework-vite-plugin-spa';
5
5
  import { ConsoleLogger, LogLevel } from '@equinor/fusion-log';
6
6
  import { processServices as defaultProcessServices } from './process-services.js';
7
+ /**
8
+ * Create a default {@link ConsoleLogger} instance for the dev server.
9
+ *
10
+ * @param lvl - Log verbosity level; defaults to {@link LogLevel.Info}.
11
+ * @param title - Logger title printed as a prefix in console output; defaults to `'dev-server'`.
12
+ * @returns A configured {@link ConsoleLogger} instance.
13
+ */
7
14
  const createDefaultLogger = (lvl = LogLevel.Info, title = 'dev-server') => {
8
15
  const logger = new ConsoleLogger(title);
9
16
  logger.level = lvl;
10
17
  return logger;
11
18
  };
12
19
  /**
13
- * Creates a development server configuration for a Fusion Framework application.
20
+ * Build a Vite {@link import('vite').UserConfig | UserConfig} for a Fusion Framework dev server
21
+ * without starting the server.
22
+ *
23
+ * Use this function when you need control over the server lifecycle (e.g. to pass the config
24
+ * to another Vite tool). For a simpler create-and-listen workflow, use {@link createDevServer}.
14
25
  *
15
- * @template TEnv - A type extending `Partial<TemplateEnv>` that represents the environment variables for the template.
16
- * @param options - The options for configuring the development server.
17
- * @param options.spa - Optional configuration for the Single Page Application (SPA), including template environment settings.
18
- * @param options.api - Configuration for the API, including service discovery URL, routes, and service processing logic.
26
+ * The generated config includes:
27
+ * - `@vitejs/plugin-react` for React Fast Refresh / HMR
28
+ * - `@equinor/fusion-framework-vite-plugin-api-service` for service discovery proxying
29
+ * - `@equinor/fusion-framework-vite-plugin-spa` for template environment injection
30
+ * - CORS disabled so backend services handle OPTIONS with proper headers
19
31
  *
20
- * @returns A `UserConfig` object that defines the Vite development server configuration.
32
+ * @template TEnv - Environment variable shape extending `Partial<TemplateEnv>`, used to type-check
33
+ * the SPA template environment object or factory function.
34
+ * @param options - Development server options containing SPA, API, and logging settings.
35
+ * @param overrides - Optional Vite config merged on top of the generated base config via
36
+ * {@link import('vite').mergeConfig | mergeConfig}.
37
+ * @returns A fully resolved Vite `UserConfig` ready for {@link import('vite').createServer | createServer}.
21
38
  *
22
39
  * @remarks
23
- * - The `spa.templateEnv` can either be a function or a partial object of type `TEnv`.
24
- * - The `api.processServices` defaults to `defaultProcessServices` if not provided.
25
- * - The server is configured to run on port 3000.
26
- * - Includes plugins for API service handling and SPA template environment generation.
27
- * - CORS is disabled to allow backend services to handle OPTIONS requests with proper headers.
40
+ * - `spa.templateEnv` accepts either a static object or a factory function returning the environment.
41
+ * - `api.processServices` defaults to the built-in {@link processServices} when omitted.
42
+ * - The default log level is `Info`; set `log.level` to `4` for debug output.
28
43
  *
29
44
  * @example
30
45
  * ```typescript
46
+ * import { createDevServerConfig } from '@equinor/fusion-framework-dev-server';
47
+ * import { createServer } from 'vite';
48
+ *
31
49
  * const config = createDevServerConfig({
32
50
  * spa: {
33
- * templateEnv: { API_URL: 'https://api.example.com' },
34
- * },
35
- * api: {
36
- * serviceDiscoveryUrl: 'https://discovery.example.com',
37
- * routes: ['/api'],
51
+ * templateEnv: {
52
+ * portal: { id: 'my-portal' },
53
+ * title: 'My App',
54
+ * serviceDiscovery: { url: 'https://discovery.example.com', scopes: [] },
55
+ * msal: { clientId: 'cid', tenantId: 'tid', redirectUri: '/auth/cb', requiresAuth: 'true' },
56
+ * },
38
57
  * },
58
+ * api: { serviceDiscoveryUrl: 'https://discovery.example.com' },
39
59
  * });
60
+ *
61
+ * const server = await createServer(config);
62
+ * await server.listen();
40
63
  * ```
41
64
  */
42
65
  export const createDevServerConfig = (options, overrides) => {
@@ -1 +1 @@
1
- {"version":3,"file":"create-dev-server-config.js","sourceRoot":"","sources":["../../src/create-dev-server-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAmB,MAAM,MAAM,CAAC;AAElE,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAE/C,OAAO,gBAAgB,EAAE,EACvB,kBAAkB,GACnB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,eAAe,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAIlF,MAAM,mBAAmB,GAAG,CAAC,MAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAA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,EAAE;oBACzE,MAAM,EAAE,gBAAgB;iBACzB,CAAC;gBACF,MAAM,EAAE,GAAG,CAAC,MAAM;aACnB,EACD;gBACE,MAAM,EAAE,gBAAgB;aACzB,CACF;YACD,eAAe,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;SAC5D;KACF,CAAC,CAAC;IACH,OAAO,WAAW,CAAC,UAAU,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"create-dev-server-config.js","sourceRoot":"","sources":["../../src/create-dev-server-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAmB,MAAM,MAAM,CAAC;AAElE,OAAO,WAAW,MAAM,sBAAsB,CAAC;AAE/C,OAAO,gBAAgB,EAAE,EACvB,kBAAkB,GACnB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,eAAe,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAIlF;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG,CAAC,MAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,YAAY,EAAE,EAAE;IAClF,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAA+B,EAC/B,SAAsB,EACV,EAAE;IACd,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAClC,MA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} from 'vite';
2
2
  import { createDevServerConfig } from './create-dev-server-config.js';
3
3
  /**
4
- * Asynchronously creates and configures a development server instance.
4
+ * Create and return a fully configured Vite development server for a Fusion Framework application.
5
5
  *
6
- * @param options - The options used to configure the development server.
7
- * @returns A promise that resolves to the created development server instance.
6
+ * Combines SPA template environment injection, service discovery proxying, and React HMR into
7
+ * a single ready-to-listen server instance. Use this function when you want the default
8
+ * development workflow; use {@link createDevServerConfig} instead if you only need the Vite
9
+ * configuration object without starting the server.
10
+ *
11
+ * @param options - Development server configuration including SPA template environment,
12
+ * API proxy settings, and optional logging overrides.
13
+ * @param overrides - Optional Vite {@link import('vite').UserConfig | UserConfig} merged on top
14
+ * of the generated configuration (e.g. custom port, extra plugins).
15
+ * @returns A promise that resolves to a Vite {@link import('vite').ViteDevServer | ViteDevServer}
16
+ * ready for {@link import('vite').ViteDevServer.listen | listen()} and
17
+ * {@link import('vite').ViteDevServer.printUrls | printUrls()}.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * import { createDevServer } from '@equinor/fusion-framework-dev-server';
22
+ *
23
+ * const server = await createDevServer({
24
+ * spa: {
25
+ * templateEnv: {
26
+ * portal: { id: 'my-portal' },
27
+ * title: 'My App',
28
+ * serviceDiscovery: { url: 'https://discovery.example.com', scopes: [] },
29
+ * msal: { clientId: 'id', tenantId: 'tid', redirectUri: '/auth/callback', requiresAuth: 'true' },
30
+ * },
31
+ * },
32
+ * api: { serviceDiscoveryUrl: 'https://discovery.example.com' },
33
+ * });
34
+ *
35
+ * await server.listen();
36
+ * server.printUrls();
37
+ * ```
8
38
  */
9
39
  export const createDevServer = async (options, overrides) => {
10
40
  const config = createDevServerConfig(options, overrides);
@@ -1 +1 @@
1
- {"version":3,"file":"create-dev-server.js","sourceRoot":"","sources":["../../src/create-dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAmB,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,OAAyB,EAAE,SAAsB,EAAE,EAAE;IACzF,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"create-dev-server.js","sourceRoot":"","sources":["../../src/create-dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAmB,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,OAAyB,EAAE,SAAsB,EAAE,EAAE;IACzF,MAAM,MAAM,GAAG,qBAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,29 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * Development server for Fusion Framework applications.
5
+ *
6
+ * Provides a pre-configured Vite dev server with integrated service discovery proxying,
7
+ * SPA template environment injection, and React HMR support. Use this package when you
8
+ * need a local development environment that mirrors production Fusion portal behaviour.
9
+ *
10
+ * @remarks
11
+ * Main entry points:
12
+ * - {@link createDevServer} — create and start a fully configured Vite dev server
13
+ * - {@link createDevServerConfig} — build a Vite `UserConfig` without starting the server
14
+ * - {@link processServices} — remap Fusion service URIs to local proxy routes
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { createDevServer } from '@equinor/fusion-framework-dev-server';
19
+ *
20
+ * const server = await createDevServer({
21
+ * api: { serviceDiscoveryUrl: 'https://discovery.example.com' },
22
+ * });
23
+ * await server.listen();
24
+ * server.printUrls();
25
+ * ```
26
+ */
1
27
  export { processServices } from './process-services.js';
2
28
  export { default, createDevServer } from './create-dev-server.js';
3
29
  export { createDevServerConfig } from './create-dev-server-config.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAItE,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAKtE,cAAc,YAAY,CAAC"}
@@ -1,14 +1,17 @@
1
1
  /**
2
- * Processes an array of Fusion services, remapping their URIs to proxy through the development server
3
- * and generating corresponding proxy routes.
2
+ * Remap Fusion service discovery entries so their URIs point through the local dev server proxy,
3
+ * and generate matching Vite proxy routes for each service.
4
4
  *
5
- * @template T - The type of the input data, expected to be an array of `FusionService`.
6
- * @param data - The input array of Fusion services to process.
7
- * @param args - Additional arguments containing the route and request information.
8
- * @param args.route - The base route used to construct the proxy paths.
9
- * @param args.request - The HTTP request object, used to extract the referer header.
10
- * @returns An object containing the processed services and the generated proxy routes.
11
- * @throws {Error} If the input data is not an array.
5
+ * Use this as the default `api.processServices` handler in {@link DevServerOptions}, or call it
6
+ * inside a custom handler to get the base mapping before applying additional transformations
7
+ * (e.g. adding mock services or filtering environments).
8
+ *
9
+ * @param data - Array of {@link FusionService} entries returned by the service discovery endpoint.
10
+ * @param args - Context provided by the API service plugin.
11
+ * @param args.route - Base route path used to construct local proxy URLs (e.g. `'/services-proxy'`).
12
+ * @param args.request - Incoming HTTP request; the `referer` header is used to resolve the local origin.
13
+ * @returns An object with `data` (services with rewritten URIs) and `routes` (Vite proxy route configs).
14
+ * @throws {Error} When `data` is not an array, indicating an unexpected service discovery response.
12
15
  *
13
16
  * @example
14
17
  * ```typescript
@@ -1 +1 @@
1
- {"version":3,"file":"process-services.js","sourceRoot":"","sources":["../../src/process-services.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IAC/E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,SAAS,GAAG,EAAgB,CAAC;IACnC,MAAM,WAAW,GAAG,EAAqB,CAAC;IAE1C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,oDAAoD;IACpD,gCAAgC;IAChC,KAAK,MAAM,OAAO,IAAI,IAAuB,EAAE,CAAC;QAC9C,oDAAoD;QACpD,iDAAiD;QACjD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/E,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAE1D,sBAAsB;QACtB,MAAM,GAAG,GAAG,IA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E,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAE1D,sBAAsB;QACtB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,SAAS,CAAC,IAAI,CAAC;YACb,KAAK,EAAE,IAAI,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,QAAQ,MAAM;YAC3C,KAAK,EAAE;gBACL,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC;aACvD;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAClD,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '1.1.32-next.0';
2
+ export const version = '2.0.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,eAAe,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}