@lovelybunch/api 1.0.56 → 1.0.57
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/dist/lib/auth/auth-manager.d.ts +122 -0
- package/dist/lib/auth/auth-manager.js +411 -0
- package/dist/middleware/auth.d.ts +31 -0
- package/dist/middleware/auth.js +142 -0
- package/dist/routes/api/v1/api-keys/index.d.ts +1 -0
- package/dist/routes/api/v1/api-keys/index.js +1 -0
- package/dist/routes/api/v1/api-keys/route.d.ts +3 -0
- package/dist/routes/api/v1/api-keys/route.js +120 -0
- package/dist/routes/api/v1/auth/index.d.ts +1 -0
- package/dist/routes/api/v1/auth/index.js +1 -0
- package/dist/routes/api/v1/auth/route.d.ts +3 -0
- package/dist/routes/api/v1/auth/route.js +230 -0
- package/dist/routes/api/v1/auth-settings/index.d.ts +1 -0
- package/dist/routes/api/v1/auth-settings/index.js +1 -0
- package/dist/routes/api/v1/auth-settings/route.d.ts +3 -0
- package/dist/routes/api/v1/auth-settings/route.js +249 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/route.js +1 -1
- package/dist/routes/api/v1/context/knowledge/route.js +2 -2
- package/dist/server-with-static.js +9 -0
- package/dist/server.js +9 -0
- package/package.json +11 -4
- package/static/assets/index-CRg4lVi6.js +779 -0
- package/static/assets/index-VqhUTak4.css +33 -0
- package/static/index.html +2 -2
- package/static/assets/index-BvXDHRet.css +0 -33
- package/static/assets/index-NCb27WQQ.js +0 -747
package/dist/server.js
CHANGED
|
@@ -19,6 +19,9 @@ app.use('*', cors({
|
|
|
19
19
|
}));
|
|
20
20
|
// Handle trailing slashes consistently for API routes
|
|
21
21
|
app.use('/api/*', trimTrailingSlash());
|
|
22
|
+
// Import and apply authentication middleware
|
|
23
|
+
import { authMiddleware } from './middleware/auth.js';
|
|
24
|
+
app.use('/api/*', authMiddleware);
|
|
22
25
|
// Create WebSocket support
|
|
23
26
|
const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app });
|
|
24
27
|
// WebSocket route for terminal sessions
|
|
@@ -73,6 +76,9 @@ app.get('/ws/terminal-preview/:sessionId', upgradeWebSocket((c) => ({
|
|
|
73
76
|
},
|
|
74
77
|
})));
|
|
75
78
|
// Import and register API routes
|
|
79
|
+
import auth from './routes/api/v1/auth/index.js';
|
|
80
|
+
import authSettings from './routes/api/v1/auth-settings/index.js';
|
|
81
|
+
import apiKeys from './routes/api/v1/api-keys/index.js';
|
|
76
82
|
import proposals from './routes/api/v1/proposals/index.js';
|
|
77
83
|
import terminalSessions from './routes/api/v1/terminal/sessions/index.js';
|
|
78
84
|
import terminalCreate from './routes/api/v1/terminal/[proposalId]/create/index.js';
|
|
@@ -93,6 +99,9 @@ import git from './routes/api/v1/git/index.js';
|
|
|
93
99
|
import mcp from './routes/api/v1/mcp/index.js';
|
|
94
100
|
import symlinks from './routes/api/v1/symlinks/index.js';
|
|
95
101
|
// Register API routes
|
|
102
|
+
app.route('/api/v1/auth', auth);
|
|
103
|
+
app.route('/api/v1/auth-settings', authSettings);
|
|
104
|
+
app.route('/api/v1/api-keys', apiKeys);
|
|
96
105
|
app.route('/api/v1/proposals', proposals);
|
|
97
106
|
app.route('/api/v1/terminal/sessions', terminalSessions);
|
|
98
107
|
app.route('/api/v1/terminal/:proposalId/create', terminalCreate);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -32,17 +32,24 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@hono/node-server": "^1.13.7",
|
|
34
34
|
"@hono/node-ws": "^1.0.6",
|
|
35
|
-
"@lovelybunch/core": "^1.0.
|
|
36
|
-
"@lovelybunch/mcp": "^1.0.
|
|
37
|
-
"@lovelybunch/types": "^1.0.
|
|
35
|
+
"@lovelybunch/core": "^1.0.57",
|
|
36
|
+
"@lovelybunch/mcp": "^1.0.57",
|
|
37
|
+
"@lovelybunch/types": "^1.0.57",
|
|
38
|
+
"arctic": "^1.9.2",
|
|
39
|
+
"bcrypt": "^5.1.1",
|
|
40
|
+
"cookie": "^0.6.0",
|
|
38
41
|
"dotenv": "^17.2.1",
|
|
39
42
|
"fuse.js": "^7.0.0",
|
|
40
43
|
"gray-matter": "^4.0.3",
|
|
41
44
|
"hono": "^4.9.5",
|
|
45
|
+
"jsonwebtoken": "^9.0.2",
|
|
42
46
|
"node-pty": "^1.0.0",
|
|
43
47
|
"ws": "^8.18.0"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
50
|
+
"@types/bcrypt": "^5.0.2",
|
|
51
|
+
"@types/cookie": "^0.6.0",
|
|
52
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
46
53
|
"@types/node": "^22.10.2",
|
|
47
54
|
"@types/ws": "^8.5.13",
|
|
48
55
|
"tsx": "^4.19.2",
|