Skip to content

fix: public api railway deployment - #11853

Merged
0xApotheosis merged 5 commits into
developfrom
public-api-dockerfile
Feb 13, 2026
Merged

fix: public api railway deployment#11853
0xApotheosis merged 5 commits into
developfrom
public-api-dockerfile

Conversation

@kaladinlight

@kaladinlight kaladinlight commented Feb 12, 2026

Copy link
Copy Markdown
Member
  • Update dockerfile with newly added hdwallet packages and slight cleanup
  • Fix esbuild warnings and errors
  • Update railway config and convert to json which is now linked to the railway service for configuration

Summary by CodeRabbit

  • Chores
    • Reorganized TypeScript type declarations across package exports for improved consistency.
    • Updated Docker build configuration and removed runtime health checks.
    • Added Railway deployment configuration and optimized build tool setup for better dependency handling.

@kaladinlight
kaladinlight requested a review from a team as a code owner February 12, 2026 22:37
@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR standardizes TypeScript type declaration exposure across 30+ packages by reorganizing the types field within exports maps in package.json files. Additionally, the public-api package infrastructure is refactored with Dockerfile build optimizations, esbuild plugin-based ethers resolution, and updated Railway deployment configurations.

Changes

Cohort / File(s) Summary
Package.json exports reorganization
packages/caip/package.json, packages/chain-adapters/package.json, packages/contracts/package.json, packages/errors/package.json, packages/types/package.json, packages/unchained-client/package.json, packages/utils/package.json
Added types field within exports["."] map and removed duplicate nested types entry. Standardizes type declaration positioning across core packages.
Hdwallet packages exports reorganization
packages/hdwallet-coinbase/package.json, packages/hdwallet-core/package.json, packages/hdwallet-gridplus/package.json, packages/hdwallet-keepkey-electron/package.json, packages/hdwallet-keepkey-nodehid/package.json, packages/hdwallet-keepkey-nodewebusb/package.json, packages/hdwallet-keepkey-tcp/package.json, packages/hdwallet-keepkey-webusb/package.json, packages/hdwallet-keepkey/package.json, packages/hdwallet-keplr/package.json, packages/hdwallet-ledger-webhid/package.json, packages/hdwallet-ledger-webusb/package.json, packages/hdwallet-ledger/package.json, packages/hdwallet-metamask-multichain/package.json, packages/hdwallet-native-vault/package.json, packages/hdwallet-native/package.json, packages/hdwallet-phantom/package.json, packages/hdwallet-trezor-connect/package.json, packages/hdwallet-trezor/package.json, packages/hdwallet-vultisig/package.json, packages/hdwallet-walletconnectv2/package.json
Repositioned types field within exports["."] map. Most changes move types before import and require entries for consistent export ordering.
Swapper package exports reorganization
packages/swapper/package.json
Reordered types entry to appear before import and require within exports["."] map.
Public API infrastructure
packages/public-api/Dockerfile
Expanded workspace package copying during build, replaced multi-workspace postbuild with single trigger, removed port exposure and health checks, and simplified production stage to use prebuilt artifacts.
Public API esbuild configuration
packages/public-api/esbuild.config.mjs
Replaced alias-based ethers resolution with a new ethersCompatPlugin that conditionally rewrites ethers/lib/utils imports to ethers (excluding hdwallet packages).
Public API Docker ignore configuration
packages/public-api/Dockerfile.dockerignore
Added src/ directory to ignore list.
Public API deployment configuration
packages/public-api/railway.json, packages/public-api/railway.toml
Added new Railway deployment config (railway.json) with build and deploy settings; removed corresponding build and deploy sections from railway.toml.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • NeOMakinG
  • premiumjibles
  • 0xApotheosis

Poem

🐰 Thirty packages hopped in line,
Their types aligned in exports divine,
Ethers resolved through plugin's might,
Docker built lighter, deployment right!
Configuration clean, the code takes flight!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title describes the main change (fixing public API Railway deployment), which aligns with the primary objectives including Dockerfile updates, Railway configuration fixes, and esbuild corrections across multiple packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch public-api-dockerfile

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
packages/hdwallet-native/package.json (1)

15-22: Inconsistent types ordering in sub-exports.

The "." export correctly places "types" first, but "./nativeEvents" and "./crypto/revocable" still have "import" before "types". This is inconsistent with the standardization being applied across all packages in this PR.

♻️ Proposed fix
     "./nativeEvents": {
-      "import": "./dist/esm/nativeEvents.js",
-      "types": "./dist/esm/nativeEvents.d.ts"
+      "types": "./dist/esm/nativeEvents.d.ts",
+      "import": "./dist/esm/nativeEvents.js"
     },
     "./crypto/revocable": {
-      "import": "./dist/esm/crypto/isolation/engines/default/revocable.js",
-      "types": "./dist/esm/crypto/isolation/engines/default/revocable.d.ts"
+      "types": "./dist/esm/crypto/isolation/engines/default/revocable.d.ts",
+      "import": "./dist/esm/crypto/isolation/engines/default/revocable.js"
     }
packages/public-api/Dockerfile (1)

15-48: The workspace COPY list is complete, but consider adding a lint check to prevent future omissions.

All 33 workspace packages are correctly included in the COPY statements (lines 15-48). However, this list must be manually kept in sync whenever a new workspace package is added to the root package.json. If a package is added to the workspace but forgotten in the Dockerfile, yarn install --immutable will fail.

Consider adding a CI lint check or a prominent comment referencing the root package.json workspaces configuration to help future contributors remember to update both files when adding new packages.


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 and usage tips.

@0xApotheosis 0xApotheosis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sanity checked build locally, lgtm. Will monitor CI upon merge.

@0xApotheosis
0xApotheosis merged commit 04fd86c into develop Feb 13, 2026
7 checks passed
@0xApotheosis
0xApotheosis deleted the public-api-dockerfile branch February 13, 2026 03:29
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.

2 participants