Skip to content

feat(standard-server): server adapter for connected peers (websocket, ...) #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from

Conversation

unnoq
Copy link
Owner

@unnoq unnoq commented Apr 24, 2025

Summary by CodeRabbit

  • New Features
    • Introduced the new @orpc/standard-server-messages package with initial configuration and documentation.
  • Documentation
    • Added a comprehensive README outlining features, integrations, and related packages.
  • Chores
    • Added configuration files for Git, npm publishing, and TypeScript setup to support package development and distribution.

Copy link

vercel bot commented Apr 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ❌ Failed (Inspect) Apr 27, 2025 10:28am

Copy link

coderabbitai bot commented Apr 24, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update introduces the foundational setup for the @orpc/standard-server-messages package within a monorepo. It adds configuration and documentation files including .gitignore, README.md, package.json, and tsconfig.json. These files establish package metadata, TypeScript project settings, build scripts, dependency declarations, and documentation describing the package's purpose and its place in the oRPC ecosystem. No source code or exported entities are added or modified in this change.

Changes

File(s) Change Summary
packages/standard-server-messages/.gitignore Added .gitignore to specify files and directories to be ignored by Git, including build outputs, logs, and temp files.
packages/standard-server-messages/README.md Added a README with an overview of the package, its features, related packages, badges, and license information.
packages/standard-server-messages/package.json Introduced package.json with package metadata, scripts, exports, dependencies, and publishing configuration.
packages/standard-server-messages/tsconfig.json Added TypeScript configuration extending a base config, specifying project references, includes, and excludes.

Poem

In a burrow of code where messages hop,
New configs and docs make the carrots non-stop!
With TypeScript and scripts, the groundwork is laid,
A README now tells how the magic is made.
No bunnies were harmed—just files ignored,
As oRPC’s garden grows, with features restored! 🥕✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@unnoq unnoq marked this pull request as draft April 24, 2025 11:51
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
packages/standard-server-messages/README.md (1)

5-5: Remove or complete the empty header
The <h1></h1> is empty and has no visible effect. Either populate it with the package name or remove this line to clean up the markup.

packages/standard-server-messages/package.json (2)

2-6: Review package metadata
The name, version, license, and homepage fields are populated correctly. Consider linking the homepage directly to this package’s documentation (e.g., https://orpc.unnoq.com/packages/standard-server-messages) for better discoverability.


12-14: Expand keywords for discoverability
Currently, only "orpc" is listed. You might add relevant keywords like "rpc", "openapi", "typescript", and "websocket" to improve npm search results.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cdb7b6 and e9d908f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • packages/standard-server-messages/.gitignore (1 hunks)
  • packages/standard-server-messages/README.md (1 hunks)
  • packages/standard-server-messages/package.json (1 hunks)
  • packages/standard-server-messages/tsconfig.json (1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/standard-server-messages/README.md

[misspelling] ~33-~33: Possible spelling mistakes found.
Context: ...tack Query (React, Vue, Solid, Svelte), Pinia Colada, and more. - 🚀 Server Actions: Ful...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~52-~52: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react](https://www.npmjs.com/package/@o...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~53-~53: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...with React and React Server Actions. - [@orpc/react-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~54-~54: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~57-~57: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 markdownlint-cli2 (0.17.2)
packages/standard-server-messages/README.md

71-71: Images should have alternate text (alt text)
null

(MD045, no-alt-text)

🔇 Additional comments (8)
packages/standard-server-messages/tsconfig.json (1)

1-19: Configuration is sound
This tsconfig.json correctly extends the base tsconfig.lib.json, sets up the appropriate lib targets, references the standard-server and shared packages for composite builds, and includes/excludes the expected file patterns.

packages/standard-server-messages/.gitignore (1)

1-26: Ignore patterns look comprehensive
The .gitignore covers hidden files (while preserving templates), common build artifacts, logs, and temp files. This will keep the repo clean of generated noise.

packages/standard-server-messages/README.md (3)

22-42: Highlights section is well-structured
The features list clearly communicates the package’s value propositions and aligns with the broader oRPC messaging.

🧰 Tools
🪛 LanguageTool

[misspelling] ~33-~33: Possible spelling mistakes found.
Context: ...tack Query (React, Vue, Solid, Svelte), Pinia Colada, and more. - 🚀 Server Actions: Ful...

(EN_MULTITOKEN_SPELLING_TWO)


47-62: Packages list appears comprehensive
The related package links are accurate and provide helpful context for users exploring the oRPC ecosystem.

🧰 Tools
🪛 LanguageTool

[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... your API or implement API contract. - [@orpc/client](https://www.npmjs.com/package/@...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~52-~52: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... API on the client with type-safety. - [@orpc/react](https://www.npmjs.com/package/@o...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~53-~53: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...with React and React Server Actions. - [@orpc/react-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~54-~54: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/react/overview). - [@orpc/vue-query](https://www.npmjs.com/packag...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~55-~55: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...latest/docs/framework/vue/overview). - [@orpc/solid-query](https://www.npmjs.com/pack...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...test/docs/framework/solid/overview). - [@orpc/svelte-query](https://www.npmjs.com/pac...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...est/docs/framework/svelte/overview). - [@orpc/vue-colada](https://www.npmjs.com/packa...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~57-~57: Possible spelling mistakes found.
Context: ...ge/@orpc/vue-colada): Integration with Pinia Colada. - [@or...

(EN_MULTITOKEN_SPELLING_TWO)


[style] ~58-~58: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ada](https://pinia-colada.esm.dev/). - [@orpc/openapi](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...I specs and handle OpenAPI requests. - [@orpc/zod](https://www.npmjs.com/package/@orp...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~60-~60: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...tps://zod.dev/) doesn't support yet. - [@orpc/valibot](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~61-~61: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rom Valibot. - [@orpc/arktype](https://www.npmjs.com/package/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


75-78: License section is correct
The MIT license reference is standard and properly linked.

packages/standard-server-messages/package.json (3)

15-26: Verify export mappings and publishConfig usage
Using publishConfig.exports to override the published exports field is a valid pattern, but please confirm it aligns with your release tooling. Ensure that local imports (via "exports": { ".": "./src/index.ts" }) and the published package (mapped to dist) resolve correctly in downstream projects.


30-34: Confirm build tooling availability
The build script depends on the unbuild CLI (and type:check uses tsc -b). Ensure that unbuild is installed as a workspace devDependency or is otherwise available in your CI/CD environments to avoid build failures.


36-38: Workspace dependencies look correct
The package correctly depends on @orpc/shared and @orpc/standard-server using the workspace protocol.

Comment on lines 69 to 73
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg'/>
</a>
</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add alt text to the sponsors image
For accessibility, include an alt attribute on the <img> tag:

<img src="https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg" alt="Our sponsors" />
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

71-71: Images should have alternate text (alt text)
null

(MD045, no-alt-text)

Comment on lines 1 to 4
<div align="center">
<image align="center" src="https://orpc.unnoq.com/logo.webp" width=280 alt="oRPC logo" />
</div>

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix image tag syntax
The markdown uses <image> instead of the standard <img> tag. Update to:

<img align="center" src="https://orpc.unnoq.com/logo.webp" width="280" alt="oRPC logo" />

Comment on lines 63 to 66
## `@orpc/standard-server-events`

Message based (Websocket, ...) server adapter for oRPC.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update the adapter reference
This section mentions @orpc/standard-server-events, but the package being introduced is @orpc/standard-server-messages. Please correct the heading and description to reference messages rather than events.

@unnoq unnoq changed the title feat(standard-server): message base adapter (websocket, ...) feat(standard-server): server adapter for connected peers (websocket, ...) Apr 27, 2025
@unnoq unnoq closed this Apr 28, 2025
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