Skip to content

refactor(cli-proxy): update createProxyApp interface to use generic type declaration to avoid type casting when adopted - #2817

Open
jiashengguo wants to merge 1 commit into
devfrom
jiasheng-dev
Open

refactor(cli-proxy): update createProxyApp interface to use generic type declaration to avoid type casting when adopted#2817
jiashengguo wants to merge 1 commit into
devfrom
jiasheng-dev

Conversation

@jiashengguo

@jiashengguo jiashengguo commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Improved schema-aware typing when configuring proxy applications and authenticated clients.
    • Added stronger type consistency across client, schema, and authentication settings.
  • Breaking Changes

    • Proxy applications must now be created using a named options object.
    • Authentication settings are provided through the nested auth configuration.

…ype declaration to avoid type casting when adopted
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 85b18065-8141-45d9-8383-09dec66e7478

📥 Commits

Reviewing files that changed from the base of the PR and between a2fe1ce and 30be51c.

📒 Files selected for processing (2)
  • packages/cli/src/proxy.ts
  • packages/cli/test/proxy.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

createProxyApp now accepts a typed options object and preserves schema-specific client types through proxy creation and authentication. Proxy tests now use named options and nested authentication settings.

Changes

Proxy API

Layer / File(s) Summary
Generic proxy contract
packages/cli/src/proxy.ts
Proxy options, handler construction, and authenticated client resolution now preserve the generic Schema type. The legacy positional signature was removed.
Options-based proxy test setup
packages/cli/test/proxy.test.ts
Proxy tests now pass dependencies through named options and authentication settings through the nested auth property.

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 30be5

This localized CLI proxy interface refactor has no actionable merge-blocking risk in the supplied evidence and is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating the createProxyApp interface with a generic type declaration to avoid type casting.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jiasheng-dev

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/cli/src/proxy.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/cli/test/proxy.test.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant