@equinor/fusion-framework-module-service-discovery
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -6,2 +6,13 @@ # Change Log | ||
## 0.2.2 (2022-05-31) | ||
### Bug Fixes | ||
* **module-service-discovery:** update interfaces ([e1b6864](https://github.com/equinor/fusion-framework/commit/e1b686466ae28204e1d605cce0441dab69787e48)) | ||
## 0.2.1 (2022-03-14) | ||
@@ -8,0 +19,0 @@ |
@@ -6,3 +6,3 @@ import { ServiceDiscoveryConfigurator } from './configurator'; | ||
configure: () => new ServiceDiscoveryConfigurator(), | ||
initialize: ({ serviceDiscovery: config }, instance) => new ServiceDiscoveryProvider(config, instance.http), | ||
initialize: ({ serviceDiscovery: config }, modules) => new ServiceDiscoveryProvider(config, modules.http), | ||
postConfigure: (config) => { | ||
@@ -9,0 +9,0 @@ const { clientKey } = config.serviceDiscovery; |
import { IServiceDiscoveryConfigurator } from './configurator'; | ||
import type { Environment, Service } from './types'; | ||
import type { ModulesConfigType } from '@equinor/fusion-framework-module'; | ||
import type { HttpModule, IHttpClient, IHttpClientProvider } from '@equinor/fusion-framework-module-http'; | ||
import type { ModulesConfigType, ModulesInstanceType } from '@equinor/fusion-framework-module'; | ||
import type { HttpModule, IHttpClient } from '@equinor/fusion-framework-module-http'; | ||
export interface IServiceDiscoveryProvider { | ||
resolveService(key: string): Promise<Service | undefined>; | ||
resolveService(key: string): Promise<Service>; | ||
readonly environment: Promise<Environment>; | ||
@@ -12,6 +12,6 @@ configureClient(name: string, config: ModulesConfigType<[HttpModule]>): Promise<void>; | ||
protected readonly _config: IServiceDiscoveryConfigurator; | ||
protected readonly _http: IHttpClientProvider; | ||
constructor(_config: IServiceDiscoveryConfigurator, _http: IHttpClientProvider); | ||
protected readonly _http: ModulesInstanceType<[HttpModule]>['http']; | ||
constructor(_config: IServiceDiscoveryConfigurator, _http: ModulesInstanceType<[HttpModule]>['http']); | ||
get environment(): Promise<Environment>; | ||
resolveService(key: string): Promise<Service | undefined>; | ||
resolveService(key: string): Promise<Service>; | ||
configureClient(name: string, config: ModulesConfigType<[HttpModule]>, onCreate?: (client: IHttpClient) => void): Promise<void>; | ||
@@ -18,0 +18,0 @@ protected _environment?: Environment; |
{ | ||
"name": "@equinor/fusion-framework-module-service-discovery", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "", | ||
@@ -25,3 +25,3 @@ "main": "./dist/esm/index.js", | ||
"@equinor/fusion-framework-module": "^0.1.1", | ||
"@equinor/fusion-framework-module-http": "^0.1.1" | ||
"@equinor/fusion-framework-module-http": "^0.2.0" | ||
}, | ||
@@ -36,3 +36,3 @@ "types": "index.d.ts", | ||
}, | ||
"gitHead": "ca51042b6cfe4d543c2a7025051c9ea8029a5a7b" | ||
"gitHead": "2f895b65287e2bf233b1ac63749333da0cfb6b54" | ||
} |
@@ -20,4 +20,4 @@ import { IServiceDiscoveryConfigurator, ServiceDiscoveryConfigurator } from './configurator'; | ||
configure: () => new ServiceDiscoveryConfigurator(), | ||
initialize: ({ serviceDiscovery: config }, instance) => | ||
new ServiceDiscoveryProvider(config, instance.http), | ||
initialize: ({ serviceDiscovery: config }, modules) => | ||
new ServiceDiscoveryProvider(config, modules.http), | ||
postConfigure: (config) => { | ||
@@ -24,0 +24,0 @@ const { clientKey } = config.serviceDiscovery; |
@@ -5,8 +5,4 @@ import { IServiceDiscoveryConfigurator } from './configurator'; | ||
import type { ModulesConfigType } from '@equinor/fusion-framework-module'; | ||
import type { | ||
HttpModule, | ||
IHttpClient, | ||
IHttpClientProvider, | ||
} from '@equinor/fusion-framework-module-http'; | ||
import type { ModulesConfigType, ModulesInstanceType } from '@equinor/fusion-framework-module'; | ||
import type { HttpModule, IHttpClient } from '@equinor/fusion-framework-module-http'; | ||
@@ -17,3 +13,3 @@ export interface IServiceDiscoveryProvider { | ||
*/ | ||
resolveService(key: string): Promise<Service | undefined>; | ||
resolveService(key: string): Promise<Service>; | ||
/** | ||
@@ -31,3 +27,3 @@ * service environment | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
protected readonly _http: IHttpClientProvider | ||
protected readonly _http: ModulesInstanceType<[HttpModule]>['http'] | ||
) {} | ||
@@ -39,3 +35,3 @@ | ||
async resolveService(key: string): Promise<Service | undefined> { | ||
async resolveService(key: string): Promise<Service> { | ||
const { services } = await this._getEnvironment(); | ||
@@ -42,0 +38,0 @@ // TODO - not found error |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82722
329
+ Added@equinor/fusion-framework-module@0.2.8(transitive)
+ Added@equinor/fusion-framework-module-http@0.2.2(transitive)
+ Addedrxjs@7.5.6(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@equinor/fusion-framework-module-http@0.1.1(transitive)