Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Unreleased

### Public API

- **Add `getAllTools` and `getVersionInfo` to public exports** — `getAllTools` is now re-exported from `@mapbox/mcp-devkit-server/tools` and `getVersionInfo` (plus `VersionInfo` type) from `@mapbox/mcp-devkit-server/utils`. These are needed by `hosted-mcp-server` to import server functionality via npm packages instead of submodule filesystem paths.
- Added `test/exports.test.ts` to verify public barrel exports

## 0.5.0 - 2026-02-24

### Features Added
Expand Down
1 change: 1 addition & 0 deletions src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const validateStyle = new ValidateStyleTool();

// Export registry functions for batch access
export {
getAllTools,
getCoreTools,
getElicitationTools,
getResourceFallbackTools,
Expand Down
4 changes: 4 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ export {
type HttpPolicy
} from './httpPipeline.js';

// Export version utilities
export { getVersionInfo } from './versionUtils.js';
export type { VersionInfo } from './versionUtils.js';

// Export types
export type { HttpRequest } from './types.js';
40 changes: 40 additions & 0 deletions test/exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Mapbox, Inc.
// Licensed under the MIT License.

import { describe, it, expect } from 'vitest';

describe('Public API exports', () => {
describe('tools barrel', () => {
it('exports getAllTools', async () => {
const { getAllTools } = await import('../src/tools/index.js');
expect(getAllTools).toBeDefined();
expect(typeof getAllTools).toBe('function');
});

it('exports getCoreTools', async () => {
const { getCoreTools } = await import('../src/tools/index.js');
expect(getCoreTools).toBeDefined();
expect(typeof getCoreTools).toBe('function');
});

it('exports getToolByName', async () => {
const { getToolByName } = await import('../src/tools/index.js');
expect(getToolByName).toBeDefined();
expect(typeof getToolByName).toBe('function');
});
});

describe('utils barrel', () => {
it('exports getVersionInfo', async () => {
const { getVersionInfo } = await import('../src/utils/index.js');
expect(getVersionInfo).toBeDefined();
expect(typeof getVersionInfo).toBe('function');
});

it('exports httpRequest', async () => {
const { httpRequest } = await import('../src/utils/index.js');
expect(httpRequest).toBeDefined();
expect(typeof httpRequest).toBe('function');
});
});
});
Loading