Skip to content

refactor: defines explicit exports inside internal packages#2551

Merged
stalniy merged 1 commit intomainfrom
refactor/strict-exports
Jan 22, 2026
Merged

refactor: defines explicit exports inside internal packages#2551
stalniy merged 1 commit intomainfrom
refactor/strict-exports

Conversation

@stalniy
Copy link
Contributor

@stalniy stalniy commented Jan 22, 2026

Why

  1. Ensure that imports do not import internal details. This may be important when we decide to build packages separately
  2. Need to export package.json for refactor: migrates from webpack to tsup in console-api #2547

Summary by CodeRabbit

  • Chores
    • Standardized module import paths across the codebase to use centralized barrel exports for consistent type and module resolution.
    • Added explicit package export maps to define and stabilize public package surfaces, improving module resolution and package interoperability.

✏️ Tip: You can customize this high-level summary in your review settings.

@stalniy stalniy requested a review from a team as a code owner January 22, 2026 01:54
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Consolidates package public surfaces via added exports fields in several package.json files and updates numerous imports to use package barrel exports instead of deep internal module paths; no runtime logic or public API signatures were changed.

Changes

Cohort / File(s) Summary
API service & providers
apps/api/src/address/services/address/address.service.ts, apps/api/src/network/providers/net-config.provider.ts, apps/api/src/provider/services/provider/provider.service.ts
Switched imports to package barrel exports (e.g., CosmosHttpService, NetConfig, ProviderSnapshot).
Deploy web — billing & payments
apps/deploy-web/src/components/billing-usage/*, apps/deploy-web/src/components/shared/*, apps/deploy-web/src/components/onboarding/steps/*, apps/deploy-web/src/components/new-deployment/NewDeploymentContainer.tsx
Replaced deep @akashnetwork/http-sdk/src/... type/service imports with @akashnetwork/http-sdk barrel imports (Charge, PaymentMethod, SetupIntentResponse, TemplateOutput, ApiWalletWithOptional3DS, etc.).
Deploy web — queries & DI
apps/deploy-web/src/queries/*, apps/deploy-web/src/services/app-di-container/app-di-container.ts
Updated StripeService, WalletSettingsHttpService and related type imports to use the http-sdk barrel; DI container now imports HttpStripeService from barrel.
Indexer monitors & DB usage
apps/indexer/src/db/buildDatabase.ts, apps/indexer/src/monitors/*BalanceMonitor.ts
Repointed MonitoredValue and other db schema imports to @akashnetwork/database/dbSchemas/base barrel.
Tests & seeders
apps/api/test/*, apps/api/test/seeders/day.seeder.ts
Consolidated type imports from dbSchemas barrels instead of deep paths; no test behavior changes.
packages/http-sdk
packages/http-sdk/package.json, packages/http-sdk/src/index.ts, packages/http-sdk/src/wallet-settings/wallet-settings-http.service.ts
Added package exports entries; re-exported stripe.service and stripe.types from index.ts; made wallet-settings types publicly exportable.
Other package exports added
packages/database/package.json, packages/env-loader/package.json, packages/logging/package.json, packages/net/package.json, packages/network-store/package.json, packages/react-query-sdk/package.json, packages/ui/package.json
Added exports mappings to define public API surfaces; packages/logging also adjusted peerDependencies and metadata.

Sequence Diagram(s)

(omitted — changes are import/export and packaging adjustments, not new multi-component control flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • ygrishajev
  • baktun14

Poem

🐰
I hopped through files with nimble paws,
Tucked deep paths into barreled drawers.
Exports aligned, imports now light—
A tidy hop into the codebase night.
Crunchy carrots, tidy paths — delight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: defines explicit exports inside internal packages' accurately summarizes the main change: introducing explicit exports in package.json files across internal packages to define public API surfaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@codecov
Copy link

codecov bot commented Jan 22, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2007 1 2006 1
View the top 1 failed test(s) by shortest run time
Addresses API GET /v1/addresses/{address}/transactions/{skip}/{limit} returns paginated transactions for an address
Stack Traces | 0.065s run time
Error: 
    at Query.run (.../dialects/postgres/query.js:76:25)
    at .../sequelize/src/sequelize.js:650:28
    at processTicksAndRejections (node:internal/process/task_queues:103:5)
    at PostgresQueryInterface.insert (.../dialects/abstract/query-interface.js:795:21)
    at Lease.save (.../sequelize/src/model.js:4154:35)
    at lease.create (.../sequelize/src/model.js:2305:12)
    at createLease (.../test/seeders/lease.seeder.ts:6:10)
    at async Promise.all (index 1)
    at setup (.../test/functional/addresses.spec.ts:357:5)
    at Object.<anonymous> (.../test/functional/addresses.spec.ts:120:41)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@stalniy stalniy force-pushed the refactor/strict-exports branch from 28556b2 to b43b9d6 Compare January 22, 2026 09:15
@stalniy stalniy merged commit 71f907f into main Jan 22, 2026
65 of 68 checks passed
@stalniy stalniy deleted the refactor/strict-exports branch January 22, 2026 12:49
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

Comments