@mcp-abap-adt/auth-broker 0.3.0 → 0.3.2
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 +9 -0
- package/README.md +2 -0
- package/bin/mcp-auth.js +12 -19
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,15 @@ Thank you to all contributors! See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the co
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [0.3.2] - 2026-01-28
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- **CLI**: Run via local `tsx` CLI using Node to avoid platform-specific spawn issues (no `npx`/`.cmd`).
|
|
18
|
+
- **Build**: Use local `tsc` and `biome` binaries directly to avoid `npx` resolving the wrong package.
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
- **README**: Clarify that `mcp-auth` uses local dependencies and does not require global `tsx`.
|
|
22
|
+
|
|
14
23
|
## [0.3.0] - 2025-12-31
|
|
15
24
|
|
|
16
25
|
### Added
|
package/README.md
CHANGED
|
@@ -647,6 +647,8 @@ Generate or refresh `.env`/JSON output using AuthBroker + stores:
|
|
|
647
647
|
mcp-auth --service-key <path> --output <path> [--env <path>] [--type abap|xsuaa] [--credential] [--browser auto|none|system|chrome|edge|firefox] [--format json|env]
|
|
648
648
|
```
|
|
649
649
|
|
|
650
|
+
**Note**: The CLI runs via the local `tsx` dependency. For repo usage, run `npm install` first. For package usage, no global `tsx` install is required.
|
|
651
|
+
|
|
650
652
|
**Authentication Flow:**
|
|
651
653
|
- Default: `authorization_code` (browser-based OAuth2)
|
|
652
654
|
- `--credential`: `client_credentials` (clientId/clientSecret, no browser)
|
package/bin/mcp-auth.js
CHANGED
|
@@ -6,30 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
const { spawn } = require('child_process');
|
|
8
8
|
const path = require('path');
|
|
9
|
-
const fs = require('fs');
|
|
10
9
|
|
|
11
10
|
// Get absolute path to TypeScript file
|
|
12
11
|
const scriptPath = path.resolve(__dirname, 'mcp-auth.ts');
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (useLocalTsx) {
|
|
22
|
-
// Use local tsx
|
|
23
|
-
command = process.platform === 'win32' ? `${localTsx}.cmd` : localTsx;
|
|
24
|
-
args = [scriptPath, ...process.argv.slice(2)];
|
|
25
|
-
} else {
|
|
26
|
-
// Use npx tsx
|
|
27
|
-
command = 'npx';
|
|
28
|
-
args = ['tsx', scriptPath, ...process.argv.slice(2)];
|
|
13
|
+
let tsxCliPath;
|
|
14
|
+
try {
|
|
15
|
+
// Resolve tsx CLI from local dependency (cross-platform, no npx/cmd)
|
|
16
|
+
tsxCliPath = require.resolve('tsx/dist/cli.js');
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('Error: tsx is not installed. Run `npm install` first to install local dependencies.');
|
|
19
|
+
process.exit(1);
|
|
29
20
|
}
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
const
|
|
22
|
+
const nodePath = process.execPath;
|
|
23
|
+
const args = [tsxCliPath, scriptPath, ...process.argv.slice(2)];
|
|
24
|
+
|
|
25
|
+
// Run the TypeScript file via node + tsx CLI
|
|
26
|
+
const child = spawn(nodePath, args, {
|
|
33
27
|
stdio: 'inherit',
|
|
34
28
|
shell: false, // Don't use shell to avoid security warnings
|
|
35
29
|
env: process.env,
|
|
@@ -46,4 +40,3 @@ child.on('error', (error) => {
|
|
|
46
40
|
child.on('exit', (code) => {
|
|
47
41
|
process.exit(code || 0);
|
|
48
42
|
});
|
|
49
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/auth-broker",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "JWT authentication broker for MCP ABAP ADT - manages tokens based on destination headers",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"scripts": {
|
|
40
40
|
"chrono": "./tools/version-stats.sh",
|
|
41
41
|
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
42
|
-
"lint": "
|
|
43
|
-
"lint:check": "
|
|
44
|
-
"format": "
|
|
45
|
-
"build": "npm run --silent clean &&
|
|
46
|
-
"build:fast": "
|
|
42
|
+
"lint": "biome check --write src",
|
|
43
|
+
"lint:check": "biome check src",
|
|
44
|
+
"format": "biome format --write src",
|
|
45
|
+
"build": "npm run --silent clean && biome check src --diagnostic-level=error && tsc -p tsconfig.json",
|
|
46
|
+
"build:fast": "tsc -p tsconfig.json",
|
|
47
47
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
48
|
-
"test:check": "
|
|
48
|
+
"test:check": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
49
49
|
"prepublishOnly": "npm run build",
|
|
50
50
|
"generate-env": "tsx bin/generate-env-from-service-key.ts"
|
|
51
51
|
},
|