Skip to content

Commit a55f3aa

Browse files
committed
chore: use prefault over default
1 parent 79f6c04 commit a55f3aa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/examples/server/simpleSseServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const getServer = () => {
2828
'start-notification-stream',
2929
'Starts sending periodic notifications',
3030
{
31-
interval: z.number().describe('Interval in milliseconds between notifications').default(1000),
32-
count: z.number().describe('Number of notifications to send').default(10)
31+
interval: z.number().describe('Interval in milliseconds between notifications').prefault(1000),
32+
count: z.number().describe('Number of notifications to send').prefault(10)
3333
},
3434
async ({ interval, count }, extra): Promise<CallToolResult> => {
3535
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

src/examples/server/simpleStatelessStreamableHttp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ const getServer = () => {
4242
'start-notification-stream',
4343
'Starts sending periodic notifications for testing resumability',
4444
{
45-
interval: z.number().describe('Interval in milliseconds between notifications').default(100),
46-
count: z.number().describe('Number of notifications to send (0 for 100)').default(10)
45+
interval: z.number().describe('Interval in milliseconds between notifications').prefault(100),
46+
count: z.number().describe('Number of notifications to send (0 for 100)').prefault(10)
4747
},
4848
async ({ interval, count }, extra): Promise<CallToolResult> => {
4949
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

src/examples/server/simpleStreamableHttp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ const getServer = () => {
291291
'start-notification-stream',
292292
'Starts sending periodic notifications for testing resumability',
293293
{
294-
interval: z.number().describe('Interval in milliseconds between notifications').default(100),
295-
count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
294+
interval: z.number().describe('Interval in milliseconds between notifications').prefault(100),
295+
count: z.number().describe('Number of notifications to send (0 for 100)').prefault(50)
296296
},
297297
async ({ interval, count }, extra): Promise<CallToolResult> => {
298298
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

src/examples/server/sseAndStreamableHttpCompatibleServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const getServer = () => {
3333
'start-notification-stream',
3434
'Starts sending periodic notifications for testing resumability',
3535
{
36-
interval: z.number().describe('Interval in milliseconds between notifications').default(100),
37-
count: z.number().describe('Number of notifications to send (0 for 100)').default(50)
36+
interval: z.number().describe('Interval in milliseconds between notifications').prefault(100),
37+
count: z.number().describe('Number of notifications to send (0 for 100)').prefault(50)
3838
},
3939
async ({ interval, count }, extra): Promise<CallToolResult> => {
4040
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

0 commit comments

Comments
 (0)