From dc9524f408ff6c4d186c25afb243025462649e60 Mon Sep 17 00:00:00 2001 From: Bob Cozzi Date: Tue, 23 Jun 2026 09:31:49 -0500 Subject: [PATCH] feat: expose getSystemVersion in CodeForIBMi public API Add getSystemVersion() to the CodeForIBMi interface in typings.ts and wire it up in the activate() return object in extension.ts. This allows consumer extensions (e.g. vscode-db2i) to retrieve the IBM i OS version without drilling into the internal IBMi class directly. Usage: const version = api?.getSystemVersion(); // e.g. 7.5 --- src/extension.ts | 3 ++- src/typings.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 56e967776..59c97196e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -153,7 +153,8 @@ export async function activate(context: ExtensionContext): Promise actionTools: ActionTools, componentRegistry: extensionComponentRegistry, connectionManager: IBMi.connectionManager, - searchTools: SearchTools + searchTools: SearchTools, + getSystemVersion: () => instance.getConnection()?.getSystemVersion(), }; } diff --git a/src/typings.ts b/src/typings.ts index e5b109d4c..a6525e008 100644 --- a/src/typings.ts +++ b/src/typings.ts @@ -21,7 +21,8 @@ export interface CodeForIBMi { actionTools: typeof ActionTools, componentRegistry: ComponentRegistry, connectionManager: ConnectionManager, - searchTools: typeof SearchTools + searchTools: typeof SearchTools, + getSystemVersion: () => number | undefined, } export interface DeploymentParameters {