From 943e64e635ac7d4dc9f616d3de6538d5039ead5d Mon Sep 17 00:00:00 2001 From: SammyBits Date: Mon, 31 Aug 2026 15:13:23 -0400 Subject: [PATCH] fix(version): pass TLS options in /status probe + mark as optional in help Two small operator-pain reductions reported in the same session: 1. 'deltix version' showed "server version probe unavailable" on self-signed TLS servers even though every data command worked. The /status probe was a raw fetch() without buildFetchTlsOptions(...); once the CA cert + SNI override are threaded through, the probe succeeds just like the rest of the API. 2. The top-level deltix help still showed every as required even though v0.7.14 made all data commands autodetect from cwd when no arg is given. Marked them as [] so the help reflects reality, added the discoverability note at the top ('When run from a deltix init-ed working tree, [] becomes optional'), and standardised the [--flag] patterns to [--flag=value|-f value] so the -b / -n short flags landed in v0.7.13 show up too. 133 unit tests pass; lint clean. --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package.json | 2 +- src/cli/index.ts | 41 ++++++++++++++++++++++++++--------------- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1106371..89e217c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,32 @@ Each entry starts with a **plain-language summary** (what changed, in everyday words) before any technical detail — written so someone outside engineering can understand what shipped and why it matters. +## [0.7.16] - 2026-08-31 + +**In plain terms:** the help text now tells you `[]` is optional +when you're inside a `deltix init`-ed working tree, and `deltix version` +finally shows the server version (the probe now passes TLS options). + +### Fixed + +- **`deltix version` reported "server version probe unavailable"** on TLS + servers with self-signed certs even though `push`, `log`, and every + data command worked fine. The probe path used a raw `fetch()` without + passing the CA cert / SNI override that the data API threads through. + Now uses the same `buildFetchTlsOptions(...)` helper, so the probe + succeeds against the same TLS server as everything else. + +### Changed + +- **Help text now shows optionality.** The `deltix` top-level help + switched `` to `[]` for every command that autodetects + via v0.7.14's `resolveRepo` (repo get, branch list/create/checkout/ + delete/current, merge, diff, roles, sync-prefs). All `[--flag]` + patterns unified to `[--flag=value|-f value]` so the short forms + shipped in v0.7.13 are discoverable. New top-level note: "When run + from a `deltix init`-ed working tree, [] becomes optional — + the cwd project wins." + ## [0.7.15] - 2026-08-31 **In plain terms:** two small operator-pain reductions reported in one diff --git a/package.json b/package.json index ac2f358..4e13e1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deltix-client", - "version": "0.7.15", + "version": "0.7.16", "private": true, "license": "MIT", "type": "module", diff --git a/src/cli/index.ts b/src/cli/index.ts index 0152dc2..ce94b4d 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -66,6 +66,7 @@ import { } from '../contexts/versioning-local'; import { getClientBuildInfo } from '../shared/build-info'; import { applyPersistedConfigDefaults, loadEnv } from '../shared/env'; +import { buildFetchTlsOptions } from '../shared/http-tls'; import { printError, printInfo, @@ -1123,6 +1124,14 @@ async function runVersion(): Promise { }); const env = loadEnv(); + // Same TLS config the data API uses — otherwise the probe fails with + // "self signed certificate" against a TLS server with a self-signed + // cert even though /api/v1/* requests succeed, just because the probe + // passes through raw `fetch()` without a CA override. + const tls = buildFetchTlsOptions({ + caCertPath: env.DELTIX_HTTP_TLS_CA_PATH, + serverNameOverride: env.DELTIX_HTTP_TLS_SERVER_NAME_OVERRIDE, + }); // /status is a best-effort probe — the actual server isn't down just // because the status endpoint happened to time out or return non-2xx // (the API endpoints under /api/v1/* are a separate surface and were @@ -1133,6 +1142,7 @@ async function runVersion(): Promise { try { const response = await fetch(new URL('/status', env.DELTIX_SERVER_URL), { signal: AbortSignal.timeout(3000), + ...(tls ? { tls } : {}), }); if (response.ok) { const server = (await response.json()) as { @@ -1442,6 +1452,7 @@ export async function runCli(argv: string[]): Promise { printLines([ 'Deltix-Client versioning parity with Deltix-Server Fase 5', 'Usage: deltix [...args]', + 'When run from a `deltix init`-ed working tree, [] becomes optional — the cwd project wins.', ' deltix configure', ' deltix init ', ' deltix clone ', @@ -1455,22 +1466,22 @@ export async function runCli(argv: string[]): Promise { ' deltix status []', ' deltix repo create ', ' deltix repo list', - ' deltix repo get ', - ' deltix branch list ', + ' deltix repo get []', + ' deltix branch list []', ' deltix branch local []', - ' deltix branch create ', - ' deltix branch checkout ', - ' deltix branch delete ', - ' deltix branch current ', - ' deltix merge [targetBranch]', - ' deltix log [--branch=name] [--limit=N]', - ' deltix diff ', - ' deltix roles list ', - ' deltix roles grant ', - ' deltix roles revoke ', - ' deltix sync-prefs get ', - ' deltix sync-prefs set [tables...]', - ' deltix sync-prefs dry-run [tables...]', + ' deltix branch create [] ', + ' deltix branch checkout [] ', + ' deltix branch delete [] ', + ' deltix branch current []', + ' deltix merge [] [targetBranch]', + ' deltix log [] [--branch=name|-b name] [--limit=N|-n N]', + ' deltix diff [] ', + ' deltix roles list []', + ' deltix roles grant [] ', + ' deltix roles revoke [] ', + ' deltix sync-prefs get []', + ' deltix sync-prefs set [] [tables...]', + ' deltix sync-prefs dry-run [] [tables...]', ]); return command ? 1 : 0; }