claude-live 3.0.0 → 3.1.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.
@@ -11,8 +11,8 @@
11
11
  body { background: #080808; overflow: hidden; }
12
12
  #root { width: 100vw; height: 100vh; }
13
13
  </style>
14
- <script type="module" crossorigin src="/assets/index-D3vltDuF.js"></script>
15
- <link rel="stylesheet" crossorigin href="/assets/index-TkH4paIm.css">
14
+ <script type="module" crossorigin src="/assets/index-cWLk4rCz.js"></script>
15
+ <link rel="stylesheet" crossorigin href="/assets/index-B6nvl-IU.css">
16
16
  </head>
17
17
  <body>
18
18
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-live",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Realtime Claude Code activity visualizer",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/marisancans/claude-live",
package/server/index.js CHANGED
@@ -32,6 +32,11 @@ const MIME = {
32
32
  const clients = new Set()
33
33
  const eventHistory = [] // all events seen since server start
34
34
  const MAX_HISTORY = 5000
35
+ const CORS_HEADERS = {
36
+ 'Access-Control-Allow-Origin': '*',
37
+ 'Access-Control-Allow-Methods': 'GET,POST,OPTIONS',
38
+ 'Access-Control-Allow-Headers': 'Content-Type',
39
+ }
35
40
 
36
41
  function filterHistory(events, { sessionId, projectId }) {
37
42
  return events.filter(event => {
@@ -54,6 +59,15 @@ function broadcast(data) {
54
59
  }
55
60
 
56
61
  const server = createServer((req, res) => {
62
+ for (const [key, value] of Object.entries(CORS_HEADERS)) {
63
+ res.setHeader(key, value)
64
+ }
65
+ if (req.method === 'OPTIONS') {
66
+ res.writeHead(204)
67
+ res.end()
68
+ return
69
+ }
70
+
57
71
  const requestUrl = new URL(req.url || '/', 'http://localhost')
58
72
  const pathname = requestUrl.pathname
59
73