@portkey-ai/hoot 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/hoot.js +9 -4
- package/dist/assets/index-BT3lROoM.js +194 -0
- package/dist/assets/{index-bgGzZ1Sm.css → index-qJfsobY2.css} +1 -1
- package/dist/index.html +2 -2
- package/mcp-backend-server.js +331 -9
- package/package.json +2 -2
- package/0.2.1 +0 -0
- package/dist/assets/index-CU8LB-gI.js +0 -194
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ hoot
|
|
|
35
35
|
- view responses
|
|
36
36
|
- oauth 2.1 if your server needs it
|
|
37
37
|
- copy stuff to clipboard
|
|
38
|
-
-
|
|
38
|
+
- **🦉 "try in hoot" links** - share servers with just a URL, auto-detection magic! ([docs](./docs/TRY_IN_HOOT.md))
|
|
39
39
|
|
|
40
40
|
## how it works
|
|
41
41
|
|
package/bin/hoot.js
CHANGED
|
@@ -107,11 +107,17 @@ setTimeout(async () => {
|
|
|
107
107
|
const srcExists = existsSync(join(rootDir, 'src'));
|
|
108
108
|
const mode = srcExists ? 'development' : 'production';
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
// Get frontend port from environment or use default
|
|
111
|
+
const frontendPort = process.env.FRONTEND_PORT || process.env.PORT || '8009';
|
|
112
|
+
const shouldOpenBrowser = process.env.NODE_ENV !== 'production';
|
|
113
|
+
|
|
114
|
+
console.log(`🌐 Starting frontend in ${mode} mode on port ${frontendPort}...`);
|
|
111
115
|
|
|
112
116
|
// Start vite - use dev mode if src exists, preview mode if using built dist/
|
|
113
117
|
const viteCommand = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
114
|
-
const viteArgs = srcExists
|
|
118
|
+
const viteArgs = srcExists
|
|
119
|
+
? (shouldOpenBrowser ? ['vite', '--open'] : ['vite'])
|
|
120
|
+
: ['vite', 'preview', '--port', frontendPort, '--host', '0.0.0.0', ...(shouldOpenBrowser ? ['--open'] : [])];
|
|
115
121
|
|
|
116
122
|
const frontend = spawn(viteCommand, viteArgs, {
|
|
117
123
|
cwd: rootDir,
|
|
@@ -149,13 +155,12 @@ setTimeout(async () => {
|
|
|
149
155
|
|
|
150
156
|
// Wait a bit for frontend to fully start, then show success message
|
|
151
157
|
setTimeout(() => {
|
|
152
|
-
const port = srcExists ? 8009 : 8010;
|
|
153
158
|
console.log(`
|
|
154
159
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
155
160
|
✅ Hoot is running!
|
|
156
161
|
|
|
157
162
|
Backend: http://localhost:8008
|
|
158
|
-
Frontend: http://localhost:${
|
|
163
|
+
Frontend: http://localhost:${frontendPort}
|
|
159
164
|
|
|
160
165
|
Press Ctrl+C to stop
|
|
161
166
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|