Releases: equinor/fusion-framework
@equinor/[email protected]
Patch Changes
-
#2459
15152e4Thanks @odinr! - Update configureFromFramework to handle authentication scopes -
Updated dependencies [
2644b3d,15152e4]:- @equinor/[email protected]
- @equinor/[email protected]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Major Changes
-
#2459
15152e4Thanks @odinr! - The Service Discovery module has been totally revamped to provide a more flexible and robust solution for service discovery in the Fusion Framework.
The module now relies on the Fusion Service Discovery API to fetch services and their configurations, which allows for more dynamic and real-time service discovery.The module now follows the "best practices" for configuration and usage, and it is now easier to configure and use the Service Discovery module in your applications. But this also means that the module has breaking changes that may require updates to existing implementations.
[!NOTE]
This module can still be configured to resolve custom services, as long as the client implements theIServiceDiscoveryClientinterface.Documentation Updates
- The README file has been updated to reflect the new configuration options and usage patterns for the Service Discovery module.
- Added sections for simple and advanced configurations, including examples of how to override the default HTTP client key and set a custom service discovery client.
Code Changes:
- 🔨 package.json: Added
zodas a new dependency for schema validation. - 💫 api-schema.ts: Added schema for the expected response from the
ServiceProviderClient - 💫 client.ts: Created
serviceResponseSelectorfor parsing and validating client respons. - 🔨 client.ts: Updated
IServiceDiscoveryClientinterface to include methods for resolving services and fetching services from the API. - 🔨 client.ts: Updated
ServiceDiscoveryClientto use the newserviceResponseSelector - 💫 configurator.ts: Introduced new methods for setting and configuring the service discovery client.
- 🔨 configurator.ts: Updated
ServiceDiscoveryConfiguratorto extend theBaseConfigBuilder - 🔨 configurator.ts: Added error handling and validation for required configurations.
BREAKING CHANGES:
- The type
Servicehas deprecated thedefaultScopesproperty in favor ofscopes. - The
IServiceDiscoveryClientinterface has been updated, which may require changes in implementations that use this interface. - The
ServiceDiscoveryConfiguratornow extendsBaseConfigBuilder, which will affect existing configurations. - The
ServiceDiscoveryProvider.resolveServicesmethod now returnsService[](previouslyEnvironment).
[!NOTE]
Only theServiceDiscoveryProvider.resolveServicesshould affect end-users,
as it changes the return type of the method.
The other changes are internal and should not affect existing implementations.Consumer Migration Guide:
defaultScopeshas been replaced withscopesin theServicetype. Update your code to use the new property.If you are using the
ServiceDiscoveryProvider.resolveServicesmethod, update your code to expect an array ofServiceobjects instead of anEnvironmentobject.// Before const { services } = await serviceDiscoveryProvider.resolveServices('my-service'); // After const services = await serviceDiscoveryProvider.resolveServices('my-service');
[!WARNING]
The preiousEnvironmentobject had aclientIdproperty, which is now removed, since every service can have its own client id, hence thescopesproperty in theServiceobject.Configuration Migration Guide:
If you are consuming the
@equinor/fusion-frameworkand only configuring the http client, no changes are required.If you are manually enabling the Service Discovery module, update your configuration to use the new methods provided by
ServiceDiscoveryConfigurator.
Refer to the updated README for detailed configuration examples and usage patterns.[!WARNING]
TheServiceDiscoveryConfiguratornow extendsBaseConfigBuilder, which means that the configuration methods have changed.
Patch Changes
- Updated dependencies [
c776845,2644b3d]:- @equinor/[email protected]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Minor Changes
-
#2452
c776845Thanks @odinr! - @equinor/fusion-framework-module-httpHttpClient._resolveUrlnow supports resolving URLs with a base URL that contains a path.before:
const client = new HttpClient('https://example.com/test/me'); client.fetch('/api'); // https://example.com/api
now:
const client = new HttpClient('https://example.com/test/me'); client.fetch('/api'); // https://example.com/test/me/api
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]
@equinor/[email protected]
Patch Changes
- Updated dependencies [
2644b3d]:- @equinor/[email protected]