fix(public-api): fix broken dev setup, replace smoke tests with vitest#12198
fix(public-api): fix broken dev setup, replace smoke tests with vitest#12198kaladinlight merged 6 commits intodevelopfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughReplaces custom smoke-test tooling with an esbuild-driven dev/build workflow (watch + server auto-restart), migrates tests to Vitest (unit + integration projects), updates package scripts and Dockerfile, adjusts example env and .gitignore, adds new tests, and removes legacy smoke-test runner and test utilities. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
080ee9c to
ad5ed57
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/public-api/esbuild.config.mjs`:
- Around line 37-40: restartServer currently calls serverProcess.kill() and
immediately spawns a new process, causing EADDRINUSE races; change it to kill
the existing child and only spawn the replacement from the child's exit/close
handler. Concretely, if serverProcess exists call serverProcess.kill(), then
attach a one-time listener (serverProcess.once('exit' or 'close', ...)) that
performs the spawn('node', ['--env-file=.env', 'dist/server.cjs'], { stdio:
'inherit' }) so the new process is only created after the old process has fully
exited; if there is no serverProcess spawn immediately. Ensure you reference
restartServer and serverProcess when making this change.
In `@packages/public-api/package.json`:
- Around line 14-15: The vitest config currently includes both unit and
integration patterns (the include array in vitest.config.ts contains
"src/**/*.test.ts" and "src/integration.test.ts"), causing pnpm test (script
"test" in package.json) to run integration tests; update vitest.config.ts to
separate integration tests from unit tests by either removing
"src/integration.test.ts" from the main include array and keeping only
"src/**/*.test.ts" for the default project, or create a second Vitest project
entry that includes "src/integration.test.ts" and run it via the existing
"test:integration" script; ensure package.json scripts remain "test": "vitest
run src/**/*.test.ts" and "test:integration": "vitest run
src/integration.test.ts" (or adjust scripts to target the new project names) so
unit and integration runs are isolated.
- Around line 11-13: The package.json metadata still points to artifacts the
build no longer produces; update the package "main" and "types" fields to match
the new output (e.g., set "main" to "dist/server.cjs" and either set "types" to
"dist/server.d.ts" or remove "types") or restore declaration emission in the
"build" pipeline; specifically edit package.json entries for "main" and "types"
and either adjust the "build" script (used by build/dev) to emit .d.ts files
(via tsc --emitDeclarationOnly or similar) or remove the types reference so
consumers don't resolve missing files.
In `@packages/public-api/vitest.config.ts`:
- Around line 5-10: The test include pattern currently in the vitest config
(test.include) lets src/integration.test.ts be discovered by default; update the
include array to explicitly exclude the integration file (add
'!src/integration.test.ts') so plain vitest runs only unit tests, and then
add/package.json scripts: keep "test" running vitest with the default config
(unit-only) and add "test:integration" that runs vitest targeting
src/integration.test.ts (or a dedicated config) so integration tests are run
separately; edit the test config's include and the package.json scripts "test"
and "test:integration" accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6fe5e4ae-e747-42a2-9bcc-4a813b5cdeb8
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
packages/public-api/.env.examplepackages/public-api/CLAUDE.mdpackages/public-api/Dockerfilepackages/public-api/esbuild.config.mjspackages/public-api/esbuild.smoke-tests.mjspackages/public-api/package.jsonpackages/public-api/src/integration.test.tspackages/public-api/src/lib/quoteStore.test.tspackages/public-api/tests/run-smoke-tests.tspackages/public-api/tests/smoke-tests.tspackages/public-api/tests/test-config.tspackages/public-api/tests/test-utils.tspackages/public-api/vitest.config.ts
💤 Files with no reviewable changes (6)
- packages/public-api/esbuild.smoke-tests.mjs
- packages/public-api/tests/test-config.ts
- packages/public-api/tests/run-smoke-tests.ts
- packages/public-api/tests/test-utils.ts
- packages/public-api/tests/smoke-tests.ts
- packages/public-api/Dockerfile
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
packages/public-api/vitest.config.ts (1)
9-9:⚠️ Potential issue | 🟠 MajorExclude integration test from default discovery.
Line 9 currently includes
src/integration.test.tsin default runs (also matched bysrc/**/*.test.ts), so plainvitest/pnpm testwon’t stay unit-only as intended.Suggested fix
- include: ['src/**/*.test.ts', 'src/integration.test.ts'], + include: ['src/**/*.test.ts', '!src/integration.test.ts'],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/public-api/vitest.config.ts` at line 9, The vitest config currently explicitly includes 'src/integration.test.ts' in the include array, causing integration tests to run by default; update the vitest configuration by removing 'src/integration.test.ts' from the include array (or add an exclude entry for 'src/integration.test.ts') so unit-only discovery uses only 'src/**/*.test.ts'—edit the include/exclude values in the exported config where the include array is defined to stop auto-running the integration test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/public-api/src/lib/quoteStore.test.ts`:
- Line 3: The import on quoteStore.test.ts mixes value and type imports
violating import/consistent-type-specifier-style; change the single line
importing both QuoteStore and StoredQuote into two imports: keep the runtime
value import for QuoteStore (e.g., import { QuoteStore } from './quoteStore')
and add a separate type-only import for StoredQuote using the TypeScript type
import syntax (import type { StoredQuote } from './quoteStore'), ensuring tests
still reference StoredQuote as a type.
---
Duplicate comments:
In `@packages/public-api/vitest.config.ts`:
- Line 9: The vitest config currently explicitly includes
'src/integration.test.ts' in the include array, causing integration tests to run
by default; update the vitest configuration by removing
'src/integration.test.ts' from the include array (or add an exclude entry for
'src/integration.test.ts') so unit-only discovery uses only
'src/**/*.test.ts'—edit the include/exclude values in the exported config where
the include array is defined to stop auto-running the integration test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 64b1fce3-df15-4a93-b934-e3cd16200df4
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (14)
.gitignorepackages/public-api/.env.examplepackages/public-api/CLAUDE.mdpackages/public-api/Dockerfilepackages/public-api/esbuild.config.mjspackages/public-api/esbuild.smoke-tests.mjspackages/public-api/package.jsonpackages/public-api/src/integration.test.tspackages/public-api/src/lib/quoteStore.test.tspackages/public-api/tests/run-smoke-tests.tspackages/public-api/tests/smoke-tests.tspackages/public-api/tests/test-config.tspackages/public-api/tests/test-utils.tspackages/public-api/vitest.config.ts
💤 Files with no reviewable changes (6)
- packages/public-api/tests/run-smoke-tests.ts
- packages/public-api/Dockerfile
- packages/public-api/tests/smoke-tests.ts
- packages/public-api/esbuild.smoke-tests.mjs
- packages/public-api/tests/test-utils.ts
- packages/public-api/tests/test-config.ts
✅ Files skipped from review due to trivial changes (3)
- .gitignore
- packages/public-api/CLAUDE.md
- packages/public-api/src/integration.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/public-api/package.json
- packages/public-api/esbuild.config.mjs
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/public-api/package.json (1)
13-14: Consider using vitest projects to make the unit/integration test split more explicit.The current approach mixes CLI arguments (
src/**/*.test.ts) with config-level filtering (theexcludeinvitest.config.ts). While the config'sexclude: ['src/integration.test.ts']does filter correctly, the "test" script's reliance on shell glob expansion creates implicit behavior. Using vitest projects with named test categories would be clearer:- "test": "vitest run src/**/*.test.ts", - "test:integration": "vitest run src/integration.test.ts" + "test": "vitest run --project unit", + "test:integration": "vitest run --project integration"Define
unitandintegrationprojects invitest.config.tswith appropriateinclude/excludepatterns. This makes the test split explicit and independent of CLI expansion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/public-api/package.json` around lines 13 - 14, Update the test scripts and Vitest config to use named projects instead of relying on shell glob expansion: add `unit` and `integration` projects in `vitest.config.ts` (e.g., projects array with a "unit" project including `src/**/*.test.ts` and excluding `src/integration.test.ts`, and an "integration" project including `src/integration.test.ts`), then change the package.json scripts ("test" and "test:integration") to run vitest with the project flag (e.g., `vitest -p unit` and `vitest -p integration`) so the split is explicit and independent of CLI glob behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/public-api/package.json`:
- Around line 13-14: Update the test scripts and Vitest config to use named
projects instead of relying on shell glob expansion: add `unit` and
`integration` projects in `vitest.config.ts` (e.g., projects array with a "unit"
project including `src/**/*.test.ts` and excluding `src/integration.test.ts`,
and an "integration" project including `src/integration.test.ts`), then change
the package.json scripts ("test" and "test:integration") to run vitest with the
project flag (e.g., `vitest -p unit` and `vitest -p integration`) so the split
is explicit and independent of CLI glob behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e59605fe-ff48-4260-85a2-6906fbb399bd
📒 Files selected for processing (5)
packages/public-api/esbuild.config.mjspackages/public-api/package.jsonpackages/public-api/src/lib/quoteStore.test.tspackages/public-api/vitest.config.tsvitest-packages.config.mts
✅ Files skipped from review due to trivial changes (1)
- vitest-packages.config.mts
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/public-api/vitest.config.ts
- packages/public-api/esbuild.config.mjs
- packages/public-api/src/lib/quoteStore.test.ts
✅ QA Review - PR #12198Tested by: QABot automated review SummaryThis PR fixes the public-api dev setup and migrates from smoke tests to vitest. Test Results
Notes
Recommendation: ✅ Approve - all tooling changes verified working |
QA Test Results ✅Branch: Tests Performed
Details
Notes
Recommendation: ✅ Ready for approval from a code review perspective Automated QA by OpenClaw 2026-03-21 |
NeOMakinG
left a comment
There was a problem hiding this comment.
QA Test Results 🧪
Tested by: Automated QA
Branch: public-api-dev
✅ Passing
| Test | Status | Details |
|---|---|---|
Unit Tests (pnpm test) |
✅ 14/14 | quoteStore TTL, eviction, sweep - all green |
Build (pnpm build) |
✅ | esbuild produces dist/server.cjs (38MB) in 975ms |
Dev Server (pnpm dev) |
✅ | Starts on :3001, health check returns {status: ok}, file watching works |
⚠️ Partial
| Test | Status | Details |
|---|---|---|
Integration (pnpm test:integration) |
2 tests timeout on /v1/swap/rates (EVM same-chain pair) - likely upstream swap service latency in dev mode |
📝 Notes
-
vitest.config.ts issue: The
exclude: ['src/integration.test.ts']in vitest.config.ts blockspnpm test:integrationfrom running. Had to bypass the config to run integration tests. Consider using a separate config for integration tests. -
Timeout values: Integration test timeout is 5s which may be too short for swap rate fetching. The cross-chain pair test passed (1148ms) but same-chain tests timed out.
Verdict
Approve with minor suggestion - Core functionality works great. The dev setup is fixed and the migration from smoke tests to vitest is clean. Just the integration test config needs a small fix.
NeOMakinG
left a comment
There was a problem hiding this comment.
QA Review ✅
Tested PR: #12198 - fix(public-api): fix broken dev setup, replace smoke tests with vitest
Test Results
| Test | Status |
|---|---|
Unit Tests (pnpm test) |
✅ 14/14 passed |
Build (pnpm build) |
✅ esbuild produces dist/server.cjs |
Dev Server (pnpm dev) |
✅ Starts with watch mode, loads 31,361 assets |
/health endpoint |
✅ Returns {status: ok} |
/v1/chains endpoint |
✅ Returns 49 chains |
/v1/assets/count |
✅ Returns 31,361 assets |
/v1/assets/:assetId |
✅ Single asset lookup works |
Minor Finding
The pnpm test:integration command has a config conflict - the test file is excluded in vitest.config.ts but the command tries to run it anyway. All endpoints work correctly when tested manually. Consider creating a separate vitest.integration.config.ts that doesn't exclude integration tests.
Verdict
All test plan items verified. Dev setup works correctly with esbuild watch mode. LGTM! 🚀
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/public-api/vitest.config.ts`:
- Around line 20-21: Move the root-level testTimeout into each project's test
configuration: locate the vitest configuration object where testTimeout is
defined at top-level (symbol: testTimeout) and remove it from the root, then add
testTimeout: 30000 inside the relevant project's test block (symbol: test) so
each project's `test` field contains the timeout option; ensure you update all
projects in the config that need the same timeout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9030441c-898b-44db-acaf-4698f8a2d846
📒 Files selected for processing (2)
packages/public-api/package.jsonpackages/public-api/vitest.config.ts
* feat: affiliate system alignment - public-api, widget, dashboard (#12150) * feat: add RPC fallback resilience for unchained outages (#12017) * chore: update near affiliate address (#12156) * fix: codex config relative path to agents.md (#12152) fix: codex config relative path to AGENTS.md Codex resolves model_instructions_file relative to .codex/ dir, so "AGENTS.md" was looking for .codex/AGENTS.md instead of repo root. Co-authored-by: gomes-bot <contact@0xgom.es> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: restore missing transaction history translation keys (#12168) * fix: bump NativeQrScanner minimum version to 3.7.2 (#12173) The native QR scanner handler ships in mobile app v3.7.2 (mobile-app PR #156), but the version gate was set to 3.4.0. This caused mobile apps v3.4.0–3.7.1 to incorrectly attempt native scanning, resulting in a 60-second spinner timeout with no way to scan. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: make WalletConnect network selection list scrollable (#12169) * fix: batch yield balance queries to respect api limit (#12174) * fix: graceful error message when yield tx fails due to insufficient gas (#12176) * fix: sync rfox staking asset selection to context for modals (#12175) * fix: release script squash-merge compat and backmerge automation (#12162) * fix: prevent duplicate private sync pr in release script merged_untagged case was creating a private sync PR without checking if one already existed, unlike tagged_private_stale which had the guard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: prevent duplicate private sync pr in release script tagged_private_stale case was creating a private sync PR even when private was already content-identical to main (SHA mismatch due to propagation delay after a sync PR merges). Added a content diff check to bail early in that case. Same guard applied to the hotfix path. The merged_untagged case also gets the open-PR guard for belt-and-suspenders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: idle prereleaseMerged content diff + tagged_private_stale backmerge auto-merge - idle case: use git diff content check instead of SHA equality for prereleaseMerged - squash merges diverge SHAs even when content matches - tagged_private_stale (regular + hotfix): set auto-merge with merge commit strategy on backmerge PR so it lands without manual intervention Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: coderabbitai review - prereleaseMerged ahead-check + no early break in tagged_private_stale - idle: replace SHA/content-diff prereleaseMerged with commit-ahead check (origin/main..origin/release) - prevents false positive when release is *behind* main (e.g. post-hotfix), which would have routed into release PR path with 0 commits - tagged_private_stale (regular + hotfix): remove early break when private is content-synced - script must still evaluate backmerge PR creation even when private sync is a no-op Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: prettier formatting in release script * fix: enable auto-merge on existing backmerge PRs during reruns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: lint --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: gomes-bot <contact@0xgom.es> * docs: update qabot skill for agent-browser 0.20.x features (#12177) * chore: update near affiliate address * docs: update qabot skill for agent-browser 0.20.x features Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Apotheosis <0xapotheosis@gmail.com> Co-authored-by: gomes-bot <contact@0xgom.es> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: route custom token metadata imports through proxy (#12040) * fix: use content diff for private sync state detection in release script (#12181) * fix: type error on mismatch viem version (#12193) * fix: tron trc20 balances for non-activated accounts + send warning (#12191) * feat: abstract chain + addchain scaffolder (#12186) * fix: move workspace cetusprotocol dependecies into swapper package (#12195) * fix: show networkFeeError at trade confirm (#12197) * fix: chainflip swap explorer link and solana compute budget (#12178) * fix(public-api): fix broken dev setup, replace smoke tests with vitest (#12198) * chore: refactor to improve maintainability (#12199) * fix: align public-api Docker image paths and simplify server config (#12204) * feat: chainflip lending dashboard revamp (#12189) * feat: add affiliate & auth routes to public-api, refactor affiliate-dashboard for prod (#12200) * chore: update app translations (#12209) * chore: update env vars (#12210) * chore: railway deployment updates for swap widget and affiliate dashboard (#12227) * fix: asset generation scripts (#12228) * feat: regenerate asset data 03/31/2026 (#12229) Co-authored-by: asset-generation-bot <action@github.com> --------- Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com> Co-authored-by: Apotheosis <0xapotheosis@gmail.com> Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com> Co-authored-by: gomes-bot <contact@0xgom.es> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jibles <premiumjibles@gmail.com> Co-authored-by: firebomb1 <88804546+firebomb1@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: asset-generation-bot <action@github.com>
chore: prerelease v1.1019.0 (#12230) * feat: affiliate system alignment - public-api, widget, dashboard (#12150) * feat: add RPC fallback resilience for unchained outages (#12017) * chore: update near affiliate address (#12156) * fix: codex config relative path to agents.md (#12152) fix: codex config relative path to AGENTS.md Codex resolves model_instructions_file relative to .codex/ dir, so "AGENTS.md" was looking for .codex/AGENTS.md instead of repo root. * fix: restore missing transaction history translation keys (#12168) * fix: bump NativeQrScanner minimum version to 3.7.2 (#12173) The native QR scanner handler ships in mobile app v3.7.2 (mobile-app PR #156), but the version gate was set to 3.4.0. This caused mobile apps v3.4.0–3.7.1 to incorrectly attempt native scanning, resulting in a 60-second spinner timeout with no way to scan. * fix: make WalletConnect network selection list scrollable (#12169) * fix: batch yield balance queries to respect api limit (#12174) * fix: graceful error message when yield tx fails due to insufficient gas (#12176) * fix: sync rfox staking asset selection to context for modals (#12175) * fix: release script squash-merge compat and backmerge automation (#12162) * fix: prevent duplicate private sync pr in release script merged_untagged case was creating a private sync PR without checking if one already existed, unlike tagged_private_stale which had the guard. * fix: prevent duplicate private sync pr in release script tagged_private_stale case was creating a private sync PR even when private was already content-identical to main (SHA mismatch due to propagation delay after a sync PR merges). Added a content diff check to bail early in that case. Same guard applied to the hotfix path. The merged_untagged case also gets the open-PR guard for belt-and-suspenders. * fix: idle prereleaseMerged content diff + tagged_private_stale backmerge auto-merge - idle case: use git diff content check instead of SHA equality for prereleaseMerged - squash merges diverge SHAs even when content matches - tagged_private_stale (regular + hotfix): set auto-merge with merge commit strategy on backmerge PR so it lands without manual intervention * fix: coderabbitai review - prereleaseMerged ahead-check + no early break in tagged_private_stale - idle: replace SHA/content-diff prereleaseMerged with commit-ahead check (origin/main..origin/release) - prevents false positive when release is *behind* main (e.g. post-hotfix), which would have routed into release PR path with 0 commits - tagged_private_stale (regular + hotfix): remove early break when private is content-synced - script must still evaluate backmerge PR creation even when private sync is a no-op * fix: prettier formatting in release script * fix: enable auto-merge on existing backmerge PRs during reruns * fix: lint --------- * docs: update qabot skill for agent-browser 0.20.x features (#12177) * chore: update near affiliate address * docs: update qabot skill for agent-browser 0.20.x features --------- * feat: route custom token metadata imports through proxy (#12040) * fix: use content diff for private sync state detection in release script (#12181) * fix: type error on mismatch viem version (#12193) * fix: tron trc20 balances for non-activated accounts + send warning (#12191) * feat: abstract chain + addchain scaffolder (#12186) * fix: move workspace cetusprotocol dependecies into swapper package (#12195) * fix: show networkFeeError at trade confirm (#12197) * fix: chainflip swap explorer link and solana compute budget (#12178) * fix(public-api): fix broken dev setup, replace smoke tests with vitest (#12198) * chore: refactor to improve maintainability (#12199) * fix: align public-api Docker image paths and simplify server config (#12204) * feat: chainflip lending dashboard revamp (#12189) * feat: add affiliate & auth routes to public-api, refactor affiliate-dashboard for prod (#12200) * chore: update app translations (#12209) * chore: update env vars (#12210) * chore: railway deployment updates for swap widget and affiliate dashboard (#12227) * fix: asset generation scripts (#12228) * feat: regenerate asset data 03/31/2026 (#12229) --------- Co-authored-by: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com> Co-authored-by: Apotheosis <0xapotheosis@gmail.com> Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com> Co-authored-by: gomes-bot <contact@0xgom.es> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jibles <premiumjibles@gmail.com> Co-authored-by: firebomb1 <88804546+firebomb1@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: asset-generation-bot <action@github.com>
Summary
The
public-apidev setup was effectively broken out of the box —pnpm devfailed immediately with ESM/CJS module resolution errors, andpnpm build && pnpm startproduced a broken tsc output due to missing.jsextensions on relative imports. This PR fixes the dev/build pipeline and replaces the bespoke smoke test framework with a proper vitest test suite.Build & Dev
pnpm devnow uses esbuild in watch mode (same bundler as prod) instead oftsx watch. esbuild handles CJS/ESM interop transparently, eliminating thebs58check/lodashnamed export errors that madetsxunusablepnpm buildnow runs esbuild directly (producesdist/server.cjs), replacing the broken tsc-only path which emitted ESM with missing file extensionspnpm startpoints atdist/server.cjs— dev and prod now use the same artifactchild_process.spawn+ esbuildonEndhook.envvia Node's built-in--env-fileflag — no extra depsbuild:bundle,start:prod,test:smoke,docker:build,docker:runtsxdevDependencyTests
test-utils.ts,smoke-tests.ts,run-smoke-tests.ts,esbuild.smoke-tests.mjs) with standard vitestpnpm test):src/lib/quoteStore.test.ts— 14 tests covering TTL expiry, dual-TTL after txHash binding, txHash index correctness, capacity eviction, and sweep cleanuppnpm test:integration):src/integration.test.ts— hits a running server, covers health, chains, assets, rates, and quote endpoints. Requires server to be running locally.env.exampleupdated to useNODE_ENV=developmentas the local defaultTest plan
pnpm devstarts without errors and restarts on file changespnpm build && pnpm startstarts the serverpnpm testpasses (14 unit tests, no server required)pnpm test:integrationpasses with server running (pnpm devin another terminal)🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Chores
Documentation