Skip to content

Commit

Permalink
Better export names
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 16, 2024
1 parent 5442709 commit 455b55f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .changeset/mighty-mugs-remain.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"sofa-api": patch
---

Export `createSofa` and `createRoute` for custom intermediate configuration
Export `createSofa` and `createSofaRouter` for custom intermediate configuration
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createRouter } from './router.js';
import { createSofaRouter } from './router.js';
import type { SofaConfig } from './sofa.js';
import { createSofa } from './sofa.js';

export { OpenAPI } from './open-api/index.js';

export function useSofa(config: SofaConfig) {
return createRouter(createSofa(config));
return createSofaRouter(createSofa(config));
}

export { createRouter, createSofa };
export { createSofaRouter, createSofa };
2 changes: 1 addition & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function useRequestBody(
return method === 'POST' || method === 'PUT' || method === 'PATCH';
}

export function createRouter(sofa: Sofa) {
export function createSofaRouter(sofa: Sofa) {
logger.debug('[Sofa] Creating router');

sofa.openAPI ||= {};
Expand Down

0 comments on commit 455b55f

Please sign in to comment.