@mcp-abap-adt/auth-broker 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,18 @@ Thank you to all contributors! See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the co
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [3.0.3] - 2026-09-27
15
+
16
+ ### Added
17
+
18
+ - **`help` and `version` as commands** for `mcp-auth` and `mcp-sso`: `help` / `--help` / `-h` and `version` / `--version` / `-v` — the same set in every CLI of the family, each answering before anything starts or connects. Both answered "Unknown command".
19
+
20
+ ## [3.0.2] - 2026-09-27
21
+
22
+ ### Changed
23
+
24
+ - **Node.js 26 is supported**: `engines` is `"^22 || ^24 || ^26"`. Under Node 26 npm skipped every release whose `engines` did not admit it and installed the newest one that did — silently an older major, for this package one without the restriction. Measured: `npm i -g @mcp-abap-adt/proxy` on Node 26.7.0 installed 4.2.0 while 5.0.1 was `latest`. The release build runs on Node 22 (it was 18, below `engines`).
25
+
14
26
  ## [3.0.1] - 2026-09-26
15
27
 
16
28
  ### Fixed
package/README.md CHANGED
@@ -26,8 +26,9 @@ authorization code or client credentials) and `mcp-sso` (OIDC and SAML single si
26
26
  npm install @mcp-abap-adt/auth-broker
27
27
  ```
28
28
 
29
- Requires Node.js 22 or 24 (`engines: "^22 || ^24"`), the versions SAP BTP's Cloud Foundry
30
- Node.js buildpack offers.
29
+ Requires Node.js 22, 24 or 26 (`engines: "^22 || ^24 || ^26"`): 22 and 24 are
30
+ the versions SAP BTP's Cloud Foundry Node.js buildpack offers, and 26 is
31
+ supported as well.
31
32
 
32
33
  ## Usage
33
34
 
@@ -206,7 +207,7 @@ const connection = new JwtAbapConnection(config, tokenRefresher);
206
207
  5. The broker no longer writes the client secret into the session store. Read
207
208
  it from the service key store if you relied on finding it in the session.
208
209
  6. `refreshToken()` now forces a new token; it used to return `getToken()`'s.
209
- 7. Node.js 22 or 24; SAML runs need the IdP trust (see *Migrating `mcp-sso`
210
+ 7. Node.js 22, 24 or 26; SAML runs need the IdP trust (see *Migrating `mcp-sso`
210
211
  SAML runs from 2.2.0*).
211
212
 
212
213
  ## Configuration
@@ -857,7 +858,7 @@ With 4.x every `mcp-sso` SAML run (`bearer`, `saml2 --flow pure`, and `mcp-auth
857
858
  `--assertion-flow manual`. For any other `--assertion` from an SP-initiated login:
858
859
  `--authn-request-id`.
859
860
 
860
- Node.js 22 or 24 is required.
861
+ Node.js 22, 24 or 26 is required.
861
862
 
862
863
  ### Utility Script
863
864
 
@@ -131,8 +131,8 @@ function showHelp() {
131
131
  console.log(' --assertion <base64> A SAMLResponse obtained elsewhere');
132
132
  console.log(' --assertion-flow <flow> browser|manual|assertion');
133
133
  console.log('');
134
- console.log(' --version, -v Show version number');
135
- console.log(' --help, -h Show this help message');
134
+ console.log(' version, --version, -v Show version number');
135
+ console.log(' help, --help, -h Show this help message');
136
136
  console.log('');
137
137
  console.log('Examples:');
138
138
  console.log(' # Auth code (default flow via service key)');
@@ -189,11 +189,16 @@ function showHelp() {
189
189
  }
190
190
  function parseArgs(args = process.argv.slice(2)) {
191
191
  // Handle --version and --help first
192
- if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
192
+ if (args.length === 0 ||
193
+ args[0] === 'help' ||
194
+ args.includes('--help') ||
195
+ args.includes('-h')) {
193
196
  showHelp();
194
197
  process.exit(0);
195
198
  }
196
- if (args.includes('--version') || args.includes('-v')) {
199
+ if (args[0] === 'version' ||
200
+ args.includes('--version') ||
201
+ args.includes('-v')) {
197
202
  console.log(getVersion());
198
203
  process.exit(0);
199
204
  }
@@ -401,6 +406,16 @@ function workDir() {
401
406
  }
402
407
  async function main() {
403
408
  const rawArgs = process.argv.slice(2);
409
+ // `help` and `version` as commands, like every CLI in the family; they answer
410
+ // before any subcommand is dispatched.
411
+ if (rawArgs[0] === 'help') {
412
+ showHelp();
413
+ process.exit(0);
414
+ }
415
+ if (rawArgs[0] === 'version') {
416
+ console.log(getVersion());
417
+ process.exit(0);
418
+ }
404
419
  const subcommand = rawArgs[0];
405
420
  const hasSubcommand = subcommand && !subcommand.startsWith('-') && subcommand.length > 0;
406
421
  if (hasSubcommand) {
@@ -165,8 +165,8 @@ function showHelp() {
165
165
  console.log(' also needs --idp-initiated or --authn-request-id; the browser and manual flows');
166
166
  console.log(' send their own request unless --idp-initiated is given.');
167
167
  console.log('');
168
- console.log(' --version, -v Show version number');
169
- console.log(' --help, -h Show this help message');
168
+ console.log(' version, --version, -v Show version number');
169
+ console.log(' help, --help, -h Show this help message');
170
170
  }
171
171
  function parseScopes(value) {
172
172
  if (!value)
@@ -218,11 +218,16 @@ function createCliLogger(prefix = 'SSO') {
218
218
  }
219
219
  function parseArgs() {
220
220
  let args = process.argv.slice(2);
221
- if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
221
+ if (args.length === 0 ||
222
+ args[0] === 'help' ||
223
+ args.includes('--help') ||
224
+ args.includes('-h')) {
222
225
  showHelp();
223
226
  process.exit(0);
224
227
  }
225
- if (args.includes('--version') || args.includes('-v')) {
228
+ if (args[0] === 'version' ||
229
+ args.includes('--version') ||
230
+ args.includes('-v')) {
226
231
  console.log(getVersion());
227
232
  process.exit(0);
228
233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/auth-broker",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Per-destination token broker for SAP BTP and ABAP: sessions and service keys from stores, tokens from an injected provider, results persisted - plus the mcp-auth and mcp-sso CLIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -64,7 +64,7 @@
64
64
  "mcp-sso": "./dist/bin/mcp-sso.js"
65
65
  },
66
66
  "engines": {
67
- "node": "^22 || ^24"
67
+ "node": "^22 || ^24 || ^26"
68
68
  },
69
69
  "dependencies": {
70
70
  "@mcp-abap-adt/auth-providers": "^4.2.0",