Versioning storage based on mcp-auth version number to let us iterate on storage format

This commit is contained in:
Glen Maddern 2025-03-31 16:21:34 +11:00
parent a97fd9e5c6
commit 1382827ebd
3 changed files with 28 additions and 35 deletions

View file

@ -191,12 +191,12 @@ export async function parseCommandLineArgs(args: string[], defaultPort: number,
// Check for --clean flag
const cleanIndex = args.indexOf('--clean')
const clean = cleanIndex !== -1
// Remove the flag from args if it exists
if (clean) {
args.splice(cleanIndex, 1)
}
const serverUrl = args[0]
const specifiedPort = args[1] ? parseInt(args[1]) : undefined
@ -221,7 +221,7 @@ export async function parseCommandLineArgs(args: string[], defaultPort: number,
} else {
console.error(`Using automatically selected callback port: ${callbackPort}`)
}
if (clean) {
console.error('Clean mode enabled: config files will be reset before reading')
}
@ -243,3 +243,5 @@ export function setupSignalHandlers(cleanup: () => Promise<void>) {
// Keep the process alive
process.stdin.resume()
}
export const MCP_REMOTE_VERSION = require('../../package.json').version