Skip to content

fix: handle cli metadata flags#339

Open
Viodmian wants to merge 1 commit into
UI5:mainfrom
Viodmian:fix-cli-metadata-flags
Open

fix: handle cli metadata flags#339
Viodmian wants to merge 1 commit into
UI5:mainfrom
Viodmian:fix-cli-metadata-flags

Conversation

@Viodmian

@Viodmian Viodmian commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • handle ui5mcp --help / -h before server startup and print usage
  • handle ui5mcp --version / -v before server startup and print the package version
  • keep unsupported arguments on the existing error path with exit code 2
  • add CLI coverage for help/version and isolate process.argv between serial tests

Reproduction

With the published @ui5/[email protected] package, metadata flags currently fail as unsupported arguments:

node ./bin/ui5mcp.js --help
# exits 2: Unexpected arguments: This command does not accept any arguments.

node ./bin/ui5mcp.js --version
# exits 2: Unexpected arguments: This command does not accept any arguments.

These flags are useful for package managers, MCP client diagnostics, and quick installation checks that should not need to start the MCP server.

Verification

npm ci --ignore-scripts --no-audit --no-fund
npx ava test/lib/cli.ts
npm run build-test -- --pretty false
npx eslint src/cli.ts test/lib/cli.ts
npm run build
git diff --check
node bin/ui5mcp.js --help
node bin/ui5mcp.js --version
node bin/ui5mcp.js --definitely-not-real

After the fix, --help, -h, --version, and -v exit 0 without constructing the server. Unknown arguments still exit 2.

@cla-assistant

cla-assistant Bot commented Jun 8, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Viodmian
Viodmian force-pushed the fix-cli-metadata-flags branch from 58e77de to 0fe0778 Compare June 8, 2026 03:56
@RandomByte

Copy link
Copy Markdown
Member

Thank you for your interest in contributing to this project. I noticed this PR appears to have been created by an AI bot.

Before we can review and consider this contribution, we need to clarify a few things:

CLA Requirement: All contributions to SAP open source projects require signing our Contributor License Agreement (CLA). A CLA is a legal agreement that requires legal capacity to enter into — something an AI bot cannot do on its own. Therefore, we need a human or legal entity to take responsibility for this contribution and sign the CLA.

Human Review: Our guidelines for AI-generated code contributions place obligations on contributors to review AI-generated output for compliance with licensing terms, third-party IP considerations, and tool-specific filtering requirements. These responsibilities require human judgment and accountability.

Could you please clarify:

  1. Is there a human maintainer or organization behind this bot who can review this contribution, take responsibility for its content, and sign the CLA?
  2. Has a human reviewed this PR for compliance with the project's license and our AI contribution guidelines?

Without a human in the loop who can sign the CLA and assume responsibility for the contribution, we unfortunately cannot accept this PR.

@RandomByte RandomByte added the information required Further information is requested label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

information required Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants