mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fixes
This commit is contained in:
commit
71c0d20c07
@ -18,8 +18,8 @@ export interface OceanPlatformTech {
|
|||||||
|
|
||||||
export interface OceanPlatformVersions {
|
export interface OceanPlatformVersions {
|
||||||
lib: OceanPlatformTech
|
lib: OceanPlatformTech
|
||||||
aquarius: OceanPlatformTech
|
metadataStore: OceanPlatformTech
|
||||||
brizo: OceanPlatformTech
|
provider: OceanPlatformTech
|
||||||
status: {
|
status: {
|
||||||
ok: boolean
|
ok: boolean
|
||||||
}
|
}
|
||||||
@ -30,20 +30,18 @@ export interface OceanPlatformVersions {
|
|||||||
*/
|
*/
|
||||||
export class Versions extends Instantiable {
|
export class Versions extends Instantiable {
|
||||||
/**
|
/**
|
||||||
* Returns the instance of OceanVersions.
|
* Returns the instance of Ocean Stack Versions.
|
||||||
* @return {Promise<OceanVersions>}
|
* @return {Promise<Versions>}
|
||||||
*/
|
*/
|
||||||
public static async getInstance(config: InstantiableConfig): Promise<Versions> {
|
public static async getInstance(config: InstantiableConfig): Promise<Versions> {
|
||||||
const instance = new Versions()
|
const instance = new Versions()
|
||||||
instance.setInstanceConfig(config)
|
instance.setInstanceConfig(config)
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
public async get(): Promise<OceanPlatformVersions> {
|
public async get(): Promise<OceanPlatformVersions> {
|
||||||
const versions = {} as OceanPlatformVersions
|
const versions = {} as OceanPlatformVersions
|
||||||
|
|
||||||
// Squid
|
|
||||||
versions.lib = {
|
versions.lib = {
|
||||||
name: 'Lib',
|
name: 'Lib',
|
||||||
version: metadata.version,
|
version: metadata.version,
|
||||||
@ -51,36 +49,17 @@ export class Versions extends Instantiable {
|
|||||||
status: OceanPlatformTechStatus.Working
|
status: OceanPlatformTechStatus.Working
|
||||||
}
|
}
|
||||||
|
|
||||||
// Brizo
|
// MetadataStore
|
||||||
try {
|
|
||||||
const {
|
|
||||||
network,
|
|
||||||
software: name,
|
|
||||||
version
|
|
||||||
} = await this.ocean.brizo.getVersionInfo()
|
|
||||||
versions.brizo = {
|
|
||||||
name,
|
|
||||||
status: OceanPlatformTechStatus.Working,
|
|
||||||
version
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
versions.brizo = {
|
|
||||||
name: 'Brizo',
|
|
||||||
status: OceanPlatformTechStatus.Stopped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Aquarius
|
|
||||||
try {
|
try {
|
||||||
const { software: name, version } = await this.ocean.aquarius.getVersionInfo()
|
const { software: name, version } = await this.ocean.aquarius.getVersionInfo()
|
||||||
versions.aquarius = {
|
versions.metadataStore = {
|
||||||
name,
|
name,
|
||||||
status: OceanPlatformTechStatus.Working,
|
status: OceanPlatformTechStatus.Working,
|
||||||
version
|
version
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
versions.aquarius = {
|
versions.metadataStore = {
|
||||||
name: 'Aquarius',
|
name: 'MetadataStore',
|
||||||
status: OceanPlatformTechStatus.Stopped
|
status: OceanPlatformTechStatus.Stopped
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user