Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
type ServerOnLog,
type ServerOnLogHandler,
type ServerLogEvent,
type ServerStatReport,
type ServerStats,
type ServerGetStats
} from './server';
Expand Down Expand Up @@ -86,6 +87,13 @@
*/
type PfMcpStats = ServerStats;

/**
* Statistics report about the server.
*
* @alias ServerStatReport
*/
type PfMcpStatReport = ServerStatReport;

/**
* Main function - Programmatic and CLI entry point with optional overrides
*
Expand Down Expand Up @@ -148,7 +156,7 @@
const main = async (
pfMcpOptions: PfMcpOptions = {},
pfMcpSettings: PfMcpSettings = {}
): Promise<PfMcpInstance> => {

Check warning on line 159 in src/index.ts

View workflow job for this annotation

GitHub Actions / Integration-checks (24.x)

Expected to return a value at the end of async arrow function

Check warning on line 159 in src/index.ts

View workflow job for this annotation

GitHub Actions / Integration-checks (20.x)

Expected to return a value at the end of async arrow function

Check warning on line 159 in src/index.ts

View workflow job for this annotation

GitHub Actions / Integration-checks (22.x)

Expected to return a value at the end of async arrow function
const { mode, ...options } = pfMcpOptions;
const { allowProcessExit } = pfMcpSettings;

Expand Down Expand Up @@ -187,6 +195,7 @@
type PfMcpLogEvent,
type PfMcpOnLog,
type PfMcpOnLogHandler,
type PfMcpStatReport,
type PfMcpStats,
type PfMcpGetStats,
type ToolCreator,
Expand Down
10 changes: 9 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { DEFAULT_OPTIONS } from './options.defaults';
import { isZodRawShape, isZodSchema } from './server.schema';
import { isPlainObject, timeoutFunction } from './server.helpers';
import { createServerStats, type Stats } from './server.stats';
import { stat } from './stats';
import { stat, type StatReport } from './stats';

/**
* A tool registered with the MCP server.
Expand Down Expand Up @@ -93,6 +93,13 @@ interface ServerSettings {
*/
type ServerStats = Stats;

/**
* Server stats report.
*
* @alias StatReport
*/
type ServerStatReport = StatReport;

/**
* A callback to Promise return server stats.
*/
Expand Down Expand Up @@ -458,6 +465,7 @@ export {
type ServerOnLogHandler,
type ServerOptions,
type ServerSettings,
type ServerStatReport,
type ServerStats,
type ServerGetStats
};
Loading