From 9fcc33ef230c0a2e2c15f65fe626c467b5754013 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 26 Jul 2024 12:59:09 +0530 Subject: [PATCH] added capabilityV_2_5 Signed-off-by: Sanket Teli --- src/extend-config/extendGlobal.ts | 7 ++----- src/types/FabloConfigExtended.ts | 12 +++++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/extend-config/extendGlobal.ts b/src/extend-config/extendGlobal.ts index 9c2517f8..75cab6fa 100644 --- a/src/extend-config/extendGlobal.ts +++ b/src/extend-config/extendGlobal.ts @@ -8,11 +8,8 @@ const getNetworkCapabilities = (fabricVersion: string): Capabilities => { if (version(fabricVersion).isGreaterOrEqual("2.0.0")) return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; - if (version(fabricVersion).isGreaterOrEqual("1.4.3")) - return { channel: "V1_4_3", orderer: "V1_4_2", application: "V1_4_2", isV2: false }; - - if (version(fabricVersion).isGreaterOrEqual("1.4.2")) - return { channel: "V1_4_2", orderer: "V1_4_2", application: "V1_4_2", isV2: false }; + if (version(fabricVersion).isGreaterOrEqual("2.5.0")) + return { channel: "V2_5", orderer: "V2_5", application: "V2_5", isV2: true }; return { channel: "V1_3", orderer: "V1_1", application: "V1_3", isV2: false }; }; diff --git a/src/types/FabloConfigExtended.ts b/src/types/FabloConfigExtended.ts index f912c689..6473fc70 100644 --- a/src/types/FabloConfigExtended.ts +++ b/src/types/FabloConfigExtended.ts @@ -22,7 +22,17 @@ interface CapabilitiesV2 { isV2: true; } -export type Capabilities = CapabilitiesV1 | CapabilitiesV2; + +interface CapabilitiesV_2_5 { + application: "V2_5"; + channel: "V2_5"; + orderer: "V2_5"; + isV2: true; +} + + + +export type Capabilities = CapabilitiesV1 | CapabilitiesV2 | CapabilitiesV_2_5; export interface Global extends FabricVersions { tls: boolean;