@lovelybunch/api 1.0.55 → 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/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.55",
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.55",
36
- "@lovelybunch/mcp": "^1.0.55",
37
- "@lovelybunch/types": "^1.0.55",
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",