-
Notifications
You must be signed in to change notification settings - Fork 8
Next #3075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* fix(package): update @equinor/fusion-wc-person dependency to version 3.1.8 * feat(dev-server): add initial implementation of Fusion Framework Dev Server * feat(api-service): Add plugin for API services Add a new Vite plugin to handle API services. This includes: - Proxy handler creation - Response interception - Route matching and validation - Utility functions for processing routes Also includes tests and configuration updates for the new plugin. * feat(api-service): enhance logging and improve request handling in proxy server * test(api-service-plugin): remove obsolete test file for API service plugin * feat(spa-plugin): add initial implementation of Fusion Framework Vite SPA Plugin (#2939) * feat(spa-plugin): add initial implementation of Fusion Framework Vite SPA Plugin * style: update line endings * feat(api-service): enhance proxy logging and improve error handling * feat(spa-plugin): update portal service client and enhance portal manifest handling * feat(api-service): refactor proxy response handling and enhance data processing arguments * feat(api-service): add README documentation for Fusion Vite API Plugin * Add Development Server Package for Fusion Framework Applications (#2961) * feat(spa-plugin): update portal service client and enhance portal manifest handling * feat(api-service): refactor proxy response handling and enhance data processing arguments * feat(api-service): add README documentation for Fusion Vite API Plugin * feat(dev-server): introduce Fusion Framework development server package - Added `@equinor/fusion-framework-dev-server` package for creating a development server tailored for Fusion Framework applications. - Implemented `createDevServer` and `createDevServerConfig` functions for simplified server setup. - Added support for SPA configuration, API service discovery, and dynamic proxy routes. - Integrated logging with `@equinor/fusion-log`. - Updated dependencies and TypeScript configuration for the new package. - Provided detailed examples and documentation in the README. * chore: update lock * Empty-Commit * style: fix linting * feat(dev-server): allow providing vite overrides when creating dev server * feat(api-service): update vite dependency and improve request parameter typing * feat(dev-server): allow custom server port configuration in dev server setup * fix(spa): allow empty string for rewrite * refactor: remove @equinor/fusion-framework-react-widget package and its dependencies - Deleted the @equinor/fusion-framework-react-widget package and its associated files, including components, hooks, and utility functions. - Removed references to the widget module in package.json and tsconfig.json files. - Updated useCurrentBookmark hook to return the correct type. - Cleaned up package.json dependencies in the main app to reflect the removal of the widget module. * feat(spa): update portalId to portal object in template environment configuration * fix: update changeset * Introduce `@equinor/fusion-framework-dev-portal` package (#2981) * feat: initial package dev-portal * Update packages/dev-portal/src/Header.tsx Co-authored-by: Copilot <[email protected]> * Update .changeset/tasty-cities-relate.md Co-authored-by: Copilot <[email protected]> * Update packages/dev-portal/src/PersonSideSheet/sheets/Styled.tsx Co-authored-by: Copilot <[email protected]> * Update packages/dev-portal/src/PersonSideSheet/index.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * chore: remove console.log from dev-server and add vite dependency * fix: change log level from info to debug for plugin environment logging * feat: replace esbuild with rollup for build process and add rollup configuration * fix: update plugin to use lodash.mergewith for environment merging * feat(dev-server): add initial implementation of Fusion Framework Dev Server * feat(api-service): Add plugin for API services Add a new Vite plugin to handle API services. This includes: - Proxy handler creation - Response interception - Route matching and validation - Utility functions for processing routes Also includes tests and configuration updates for the new plugin. * feat(api-service): enhance logging and improve request handling in proxy server * test(api-service-plugin): remove obsolete test file for API service plugin * feat(spa-plugin): add initial implementation of Fusion Framework Vite SPA Plugin (#2939) * feat(spa-plugin): add initial implementation of Fusion Framework Vite SPA Plugin * style: update line endings * feat(api-service): enhance proxy logging and improve error handling * feat(api-service): refactor proxy response handling and enhance data processing arguments * Add Development Server Package for Fusion Framework Applications (#2961) * feat(spa-plugin): update portal service client and enhance portal manifest handling * feat(api-service): refactor proxy response handling and enhance data processing arguments * feat(api-service): add README documentation for Fusion Vite API Plugin * feat(dev-server): introduce Fusion Framework development server package - Added `@equinor/fusion-framework-dev-server` package for creating a development server tailored for Fusion Framework applications. - Implemented `createDevServer` and `createDevServerConfig` functions for simplified server setup. - Added support for SPA configuration, API service discovery, and dynamic proxy routes. - Integrated logging with `@equinor/fusion-log`. - Updated dependencies and TypeScript configuration for the new package. - Provided detailed examples and documentation in the README. * chore: update lock * Empty-Commit * style: fix linting * feat(api-service): update vite dependency and improve request parameter typing * fix(http): update token retrieval method to acquireAccessToken * feat(spa): fetch and pass portal config to render function in bootstrap * fix(biome): update linter rule for noConfusingVoidType to info level * Implement Fusion Framework Dev Server and API Service Plugin (#3069) * feat(cli)!: rewrite CLI to use Fusion Framework, separate dev portal, and improve modularity - Rewrite CLI to use Fusion Framework internally for better performance and maintainability - Move dev portal to `@equinor/fusion-framework-dev-server` for modular architecture - Add support for `dev-server.config.js` for dev portal configuration - Enable live preview and API mocking in dev portal (future documentation planned) - Default dev portal to `@equinor/fusion-framework-dev-portal` but allow custom portals - Add `fusion-framework-cli auth login` command for improved authentication - Refactor CLI into `bin`, `commands`, and `lib` namespaces for better organization - BREAKING CHANGE: remove `--service` flag, deprecate `app -build-???` commands in favor of new structure * feat(dev-server): export UserConfig interface from vite * chore: update vite to 6.3.5 * chore: add build output directory to .gitignore * feat(cli): update TODO.md and improve return handling in legacy functions * fix: update package.json main entry to point to dist for multiple cookbooks * refactor: rename resolveAppPackage to resolveProjectPackage for consistency * feat: refactor Dockerfile and add libsecret installation instructions to enhance secure credential storage * feat: enhance app manifest handling and improve error management in git utilities * doc: implement lazy loading of MSAL cache to optimize libsec loading * style: format img tag for better readability and maintainability * fix: correct package name in fetch portal config changeset * Empty-Commit * removed pre.json file --------- Co-authored-by: Copilot <[email protected]>
🦋 Changeset detectedLatest commit: a86b21a The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…eckout reference in PR docs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR performs a comprehensive modernization and refactoring of the Fusion Framework codebase, transitioning to ESM modules, updating dependencies, improving documentation, and adding new development tooling.
- Migration to ES modules with
"type": "module"and.jsextensions in imports - Updated dependencies including Zod version bumps and TypeScript configuration improvements
- Enhanced documentation with comprehensive JSDoc comments and improved README files
- Introduction of new development server and portal packages for better development experience
Reviewed Changes
Copilot reviewed 224 out of 384 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/modules/module/src/BaseConfigBuilder.ts | Updated imports to use .js extensions and improved JSDoc documentation |
| packages/modules/module/package.json | Added "type": "module" and version bump to support ESM |
| packages/modules/http/src/module.ts | Updated authentication method call from acquireToken to acquireAccessToken |
| packages/modules/http/package.json | Updated Zod dependency to version 3.25.76 |
| packages/modules/event/src/event.ts | Replaced @note with @remarks in JSDoc comments |
| packages/modules/context/src/* | Extensive documentation improvements and type safety enhancements |
| packages/dev-server/src/* | New development server package with comprehensive configuration options |
| packages/dev-portal/src/* | New development portal package for local development |
| packages/cli/src/* | Major refactoring with improved utilities and type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…to separate package
… in documentation
Why
This PR introduces a collection of updates, enhancements, and fixes across the Fusion Framework monorepo. It includes refactors, dependency upgrades, bug fixes, documentation updates, and feature releases for multiple packages.
The current behavior includes outdated dependencies, limited functionality in some modules, and missing documentation for certain integrations.
@equinor/fusion-framework-cli
The Fusion Framework CLI has been completely rewritten to use the Fusion Framework internally, reducing dependencies and improving performance. This rewrite makes the CLI a first-class citizen in the Fusion Framework ecosystem, providing a more consistent and integrated experience.
The Dev Portal has been modularized and moved to a separate package,
@equinor/fusion-framework-dev-server, enabling a modular architecture and independent updates. The Dev Portal now supports live previews and API mocking, configurable viadev-server.config.js.The CLI's command structure has been reorganized into three main groups:
bin(executable functions),commands(CLI commands), andlib(for consumers, config, and utilities). This improves organization and modularity.The
--serviceflag has been removed, and the CLI now uses service discovery via Fusion environment variables. Additionally, allapp -build-???commands have been deprecated and will be removed in the next major version.Vite configuration and dev server functionality have been abstracted into the
@equinor/fusion-framework-dev-serverpackage. The CLI now provides a higher-level API that handles Vite configuration internally, while still allowing for customization through configuration options.New utility functions have been added to the CLI, including modules for resolving CI/CD metadata (e.g., GitHub Actions, Azure DevOps), git commit and remote info, and package metadata. These utilities support advanced scripting and automation scenarios.
Support for portal configuration has been improved with new helpers for loading and resolving portal configuration files. The portal manifest has been refactored to use
nameandtemplateEntryfor consistency with app manifests, and type safety and schema validation have been enhanced.The CLI has been modernized for ESM compatibility, including the use of
deepmergeinstead oflodash.mergewith, explicit.jsextensions in imports, and updatedpackage.jsonandtsconfig.jsonconfigurations.The dev server configuration has been refactored to improve merging logic, add a
RecursivePartialtype, and implement a custom array merge strategy. Documentation for configuration has also been improved.A Node.js version check has been added to the CLI entrypoint, recommending the use of the LTS version. Build configuration now injects version info via environment variables.
The maintainability, type safety, and developer experience of the CLI and dev server packages have been significantly improved.
For further details, see the CLI's README and the docs folder.
@equinor/fusion-framework-dev-portal
This PR introduces a new package,
@equinor/fusion-framework-dev-portal, as part of a refactor of the@equinor/fusion-framework-cli.Features
This package is a small part of the refactoring of the
@equinor/fusion-framework-cliand while it can be used standalone, it is recommended to use the@equinor/fusion-framework-dev-serverpackage for a more complete development experience.Read More
For more detailed information, usage examples, and advanced configuration, please refer to the GitHub README for this package.
@equinor/fusion-framework-dev-server
Introduced a new package,
@equinor/fusion-framework-dev-server, designed to provide a development server tailored for Fusion Framework applications. Built on top of Vite, it seamlessly integrates Vite and Fusion Framework configurations.For more details, visit the GitHub repository.
Features
createDevServerFunction: Simplifies the creation of a development server using a configuration object.createDevServerConfigFunction: Generates a Vite-compatible configuration for the development server.spa.templateEnvfor defining environment variables specific to Single Page Applications.api.serviceDiscoveryUrl.processServicesfunction to remap Fusion services' URIs and dynamically generate proxy routes.@equinor/fusion-logfor customizable logging, with dedicated sub-loggers for SPA and API services.Dependencies
The following dependencies were added to support the new package:
@equinor/fusion-framework-vite-plugin-api-service@equinor/fusion-framework-vite-plugin-spa@equinor/fusion-framework-module-http
acquireAccessTokenfrom the auth provider to retrieve the access token for requests with scopes.acquireTokenbut instead providesacquireAccessTokenfor token retrieval.@equinor/fusion-framework-module-msal-node
This release makes
@equinor/fusion-framework-module-msal-nodean explicit ESM package.@equinor/fusion-framework-module-module
This release makes
@equinor/fusion-framework-modulean explicit ESM package.@equinor/fusion-framework-react-components-people-provider
update
@equinor/fusion-wc-persondependency to version 3.1.8@equinor/fusion-framework-vite-plugin-api-service
Introducing a new Vite plugin for Fusion Framework applications that simplifies API development workflows through service discovery integration and API mocking.
Key capabilities:
For complete documentation and examples, see the API Service Plugin README.
@equinor/fusion-framework-vite-plugin-spa
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.
Purpose:
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.
Key Features:
.envfiles with proper naming conventions@equinor/fusion-framework-vite-plugin-api-servicefor enhanced development capabilitiesThis plugin is designed for seamless integration with the Fusion Framework CLI and provides flexible configuration for both standard and advanced SPA scenarios.
@equinor/fusion-imports
Updated the
filesfield inpackage.jsonto include bothdistandsrcdirectories.Bookmark
Refactored the
Bookmarktype to be an intersection ofBookmarkWithoutDataand an optionalpayloadproperty, improving type safety and flexibility. UpdateduseBookmarkNavigateto use proper TypeScript typing for bookmark events.Module Bookmark Changes:
Bookmarktype inpackages/modules/bookmark/src/types.tsBookmarkProviderEventstype inpackages/modules/bookmark/src/index.ts@noteto@remarksinpackages/modules/bookmark/src/BookmarkClient.tsReact Changes:
packages/react/modules/bookmark/src/portal/useBookmarkNavigate.tsto use proper TypeScript typing for bookmark provider eventspackages/react/app/tsconfig.jsonDependency Updates
6.3.5for improved performance and compatibility.Breaking changes
@equinor/fusion-framework-cli
--serviceflag has been removed. The CLI now uses service discovery via Fusion environment variables. Allapp -build-???commands are deprecated and will be removed in the next major version. Migration Guide: v10 to v11EsmNext to NodeNext
@equinor/fusion-framework-moduleand"@equinor/fusion-framework-module-msal-nodeis now built formoduleandmoduleResolutiontoNodeNext. This should not really effect any consumers, but all CJS will fail.closes: #AB64518
Check off the following:
Confirm that I checked changes to branch which I am merging into.
Confirm that the I have completed the self-review checklist.
Confirm that my changes meet our code of conduct.