Skip to content

feat: expose getSystemVersion() in CodeForIBMi public API#3322

Open
bobcozzi wants to merge 1 commit into
codefori:masterfrom
bobcozzi:feature/expose-getSystemVersion-api
Open

feat: expose getSystemVersion() in CodeForIBMi public API#3322
bobcozzi wants to merge 1 commit into
codefori:masterfrom
bobcozzi:feature/expose-getSystemVersion-api

Conversation

@bobcozzi

Copy link
Copy Markdown
Contributor

Summary

Exposes getSystemVersion() as a first-class member of the CodeForIBMi public API interface, allowing consumer extensions (e.g. vscode-db2i) to retrieve the IBM i OS version without accessing internal implementation details.

Changes

  • src/typings.ts — Added getSystemVersion: () => number | undefined to the CodeForIBMi interface
  • src/extension.ts — Wired up the implementation in the activate() return object via instance.getConnection()?.getSystemVersion()

Usage (from a consumer extension)

const api = vscode.extensions.getExtension<CodeForIBMi>('halcyontechltd.code-for-ibmi')?.exports;
const version = api?.getSystemVersion(); // e.g. 7.5

Returns undefined if no connection is active, consistent with other connection-dependent API members.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant