@mcp-abap-adt/auth-broker 3.0.2 → 3.0.4

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
@@ -9,7 +9,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  Thank you to all contributors! See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the complete list.
11
11
 
12
- ## [Unreleased]
12
+ ## [3.0.4] - 2026-09-28
13
+
14
+ ### Fixed
15
+
16
+ - **`mcp-sso` did not start from an installed package.** It imports
17
+ `@mcp-abap-adt/logger`, which was only a dev dependency, so every command —
18
+ `--version` and `help` included — died with `Cannot find module
19
+ '@mcp-abap-adt/logger'`. It worked in this repository, where dev dependencies
20
+ are installed. `@mcp-abap-adt/logger` is now a runtime dependency. `mcp-auth`
21
+ was not affected. Found by installing the 3.0.3 tarball into an empty
22
+ directory and running each bin.
23
+
24
+ ### Tests
25
+
26
+ - **`tests/sso-demo` moves to CAP 10**: `@sap/cds` `^10`, `@sap/cds-dk` `^10`,
27
+ `@cap-js/sqlite` `^3`. `npm audit` there goes from 12 findings (2 critical,
28
+ 6 high) to 0: they sat in copies nested under `@sap/cds-dk` 9, which no
29
+ update inside 9.x could reach. `cds build --production` builds the service as
30
+ before. The demo is not part of the published package.
31
+
32
+ ## [3.0.3] - 2026-09-27
33
+
34
+ ### Added
35
+
36
+ - **`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".
13
37
 
14
38
  ## [3.0.2] - 2026-09-27
15
39
 
@@ -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.2",
3
+ "version": "3.0.4",
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",
@@ -72,11 +72,11 @@
72
72
  "@mcp-abap-adt/interfaces-auth": "^2.1.0",
73
73
  "@mcp-abap-adt/interfaces-auth-sap": "^1.0.1",
74
74
  "@mcp-abap-adt/interfaces-utils": "^1.1.0",
75
+ "@mcp-abap-adt/logger": "^0.4.0",
75
76
  "axios": "^1.13.5"
76
77
  },
77
78
  "devDependencies": {
78
79
  "@biomejs/biome": "^2.3.14",
79
- "@mcp-abap-adt/logger": "^0.4.0",
80
80
  "@types/express": "^5.0.5",
81
81
  "@types/jest": "^30.0.0",
82
82
  "@types/js-yaml": "^4.0.9",