New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@equinor/fusion-framework-module-service-discovery

Package Overview
Dependencies
Maintainers
3
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion-framework-module-service-discovery

## Configure

0.3.1
Source
npm
Version published
Weekly downloads
1.5K
-39.77%
Maintainers
3
Weekly downloads
 
Created
Source

Fusion Service Provider

Configure


/** configure the client which should fetch service descriptions */ 
config.http.configureClient('my_service_discovery', {
  baseUri: 'https://foo.bar',
  defaultScopes: ['321312bab2-3213123bb-321312aa2/.default'],
});

/** key of configured http client, default `service_discovery` */
config.serviceDiscovery.clientKey = 'my_service_discovery'

/** endpoint for fetching services */
config.serviceDiscovery.uri = 'api/services';

/** parse http response to service discovery environment */
config.serviceDiscovery.selector = async (response: Response): Promise<Environment> => {
  const services = await response.json() as Service[];
  return services.reduce((acc, service) => Object.assign(acc, {[service.key]: service}), {});
}

FAQs

Package last updated on 13 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts