Skip to content

Commit 5068ce2

Browse files
committed
Remove shell endpoint
1 parent f6fa0b2 commit 5068ce2

4 files changed

Lines changed: 3 additions & 277 deletions

File tree

src/http/handlers/shell.ts

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/http/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import connect from 'connect';
44
import http from 'node:http';
55
import { checkOrigin, checkRemoteIp } from './security';
66
import { handleMcp } from './handlers/mcp';
7-
import { handleShell } from './handlers/shell';
87
import { createHandleHtml } from './handlers/html';
98
import { createHandleConfig } from './handlers/config';
109
import bodyParser from 'body-parser';
@@ -32,7 +31,6 @@ function getHandlers(config: TidewaveConfig): Record<string, Handler> {
3231
'': createHandleHtml(config),
3332
config: createHandleConfig(config),
3433
mcp: handleMcp,
35-
shell: handleShell,
3634
};
3735
}
3836

test/http/shell.test.ts

Lines changed: 0 additions & 140 deletions
This file was deleted.

test/vite-plugin.test.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ describe('Tidewave Vite Plugin', () => {
7070

7171
const middlewareUse = (mockServer as any)._middlewareUse;
7272

73-
// Should register 6 middleware: security + decode body + html + config + mcp + shell routes
74-
expect(middlewareUse).toHaveBeenCalledTimes(6);
73+
// Should register 5 middleware: security + decode body + html + config + mcp routes
74+
expect(middlewareUse).toHaveBeenCalledTimes(5);
7575

7676
// Global security middleware
7777
expect(middlewareUse).toHaveBeenCalledWith('/tidewave', expect.any(Function));
@@ -84,9 +84,6 @@ describe('Tidewave Vite Plugin', () => {
8484

8585
// MCP route
8686
expect(middlewareUse).toHaveBeenCalledWith('/tidewave/mcp', expect.any(Function));
87-
88-
// Shell route
89-
expect(middlewareUse).toHaveBeenCalledWith('/tidewave/shell', expect.any(Function));
9087
});
9188

9289
it('should pass config to configureServer', async () => {
@@ -102,7 +99,7 @@ describe('Tidewave Vite Plugin', () => {
10299

103100
// Middleware should be registered (config is passed internally)
104101
const middlewareUse = (mockServer as any)._middlewareUse;
105-
expect(middlewareUse).toHaveBeenCalledTimes(6);
102+
expect(middlewareUse).toHaveBeenCalledTimes(5);
106103
});
107104
});
108105

@@ -117,17 +114,6 @@ describe('Tidewave Vite Plugin', () => {
117114

118115
expect(middlewareUse).toHaveBeenCalledWith('/tidewave/mcp', expect.any(Function));
119116
});
120-
121-
it('should register shell route with correct path', async () => {
122-
const mockServer = createMockServer();
123-
const plugin = tidewave();
124-
125-
await (plugin.configureServer as any)(mockServer);
126-
127-
const middlewareUse = (mockServer as any)._middlewareUse;
128-
129-
expect(middlewareUse).toHaveBeenCalledWith('/tidewave/shell', expect.any(Function));
130-
});
131117
});
132118

133119
describe('Configuration Validation', () => {
@@ -218,10 +204,6 @@ describe('Tidewave Vite Plugin', () => {
218204
// Fifth call should be MCP endpoint
219205
expect(calls[4][0]).toBe('/tidewave/mcp');
220206
expect(typeof calls[4][1]).toBe('function');
221-
222-
// Sixth call should be shell endpoint
223-
expect(calls[5][0]).toBe('/tidewave/shell');
224-
expect(typeof calls[5][1]).toBe('function');
225207
});
226208
});
227209
});

0 commit comments

Comments
 (0)