@siteboon/claude-code-ui 1.10.3 → 1.10.4
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/assets/{index-DDdVKZPL.js → index-CJDQ69DP.js} +188 -177
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/index.js +65 -0
package/dist/index.html
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<!-- Prevent zoom on iOS -->
|
|
27
27
|
<meta name="format-detection" content="telephone=no" />
|
|
28
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
+
<script type="module" crossorigin src="/assets/index-CJDQ69DP.js"></script>
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-7V_UDHjJ.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-B7BYDWj-.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/vendor-xterm-jI4BCHEb.js">
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -237,6 +237,71 @@ app.get('/api/config', authenticateToken, (req, res) => {
|
|
|
237
237
|
});
|
|
238
238
|
});
|
|
239
239
|
|
|
240
|
+
// System update endpoint
|
|
241
|
+
app.post('/api/system/update', authenticateToken, async (req, res) => {
|
|
242
|
+
try {
|
|
243
|
+
// Get the project root directory (parent of server directory)
|
|
244
|
+
const projectRoot = path.join(__dirname, '..');
|
|
245
|
+
|
|
246
|
+
console.log('Starting system update from directory:', projectRoot);
|
|
247
|
+
|
|
248
|
+
// Run the update command
|
|
249
|
+
const updateCommand = 'git checkout main && git pull && npm install';
|
|
250
|
+
|
|
251
|
+
const child = spawn('sh', ['-c', updateCommand], {
|
|
252
|
+
cwd: projectRoot,
|
|
253
|
+
env: process.env
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
let output = '';
|
|
257
|
+
let errorOutput = '';
|
|
258
|
+
|
|
259
|
+
child.stdout.on('data', (data) => {
|
|
260
|
+
const text = data.toString();
|
|
261
|
+
output += text;
|
|
262
|
+
console.log('Update output:', text);
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
child.stderr.on('data', (data) => {
|
|
266
|
+
const text = data.toString();
|
|
267
|
+
errorOutput += text;
|
|
268
|
+
console.error('Update error:', text);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
child.on('close', (code) => {
|
|
272
|
+
if (code === 0) {
|
|
273
|
+
res.json({
|
|
274
|
+
success: true,
|
|
275
|
+
output: output || 'Update completed successfully',
|
|
276
|
+
message: 'Update completed. Please restart the server to apply changes.'
|
|
277
|
+
});
|
|
278
|
+
} else {
|
|
279
|
+
res.status(500).json({
|
|
280
|
+
success: false,
|
|
281
|
+
error: 'Update command failed',
|
|
282
|
+
output: output,
|
|
283
|
+
errorOutput: errorOutput
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
child.on('error', (error) => {
|
|
289
|
+
console.error('Update process error:', error);
|
|
290
|
+
res.status(500).json({
|
|
291
|
+
success: false,
|
|
292
|
+
error: error.message
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
} catch (error) {
|
|
297
|
+
console.error('System update error:', error);
|
|
298
|
+
res.status(500).json({
|
|
299
|
+
success: false,
|
|
300
|
+
error: error.message
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
240
305
|
app.get('/api/projects', authenticateToken, async (req, res) => {
|
|
241
306
|
try {
|
|
242
307
|
const projects = await getProjects();
|