dev3000 0.0.45 → 0.0.46
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/LICENSE +21 -0
- package/README.md +13 -1
- package/mcp-server/app/logs/LogsClient.test.ts +1 -1
- package/mcp-server/app/logs/LogsClient.tsx +592 -379
- package/mcp-server/app/logs/page.tsx +2 -1
- package/mcp-server/app/logs/utils.ts +46 -0
- package/package.json +3 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import LogsClient
|
|
1
|
+
import LogsClient from './LogsClient';
|
|
2
2
|
import { redirect } from 'next/navigation';
|
|
3
3
|
import { readFileSync, existsSync, readdirSync, statSync } from 'fs';
|
|
4
4
|
import { join, dirname, basename } from 'path';
|
|
5
|
+
import { parseLogEntries } from './utils';
|
|
5
6
|
|
|
6
7
|
interface PageProps {
|
|
7
8
|
searchParams: { file?: string; mode?: 'head' | 'tail' };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LogEntry } from '@/types';
|
|
2
|
+
|
|
3
|
+
export function parseLogEntries(logContent: string): LogEntry[] {
|
|
4
|
+
// Split by timestamp pattern - each timestamp starts a new log entry
|
|
5
|
+
const timestampPattern = /\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\] \[([^\]]+)\] /;
|
|
6
|
+
|
|
7
|
+
const entries: LogEntry[] = [];
|
|
8
|
+
const lines = logContent.split('\n');
|
|
9
|
+
let currentEntry: LogEntry | null = null;
|
|
10
|
+
|
|
11
|
+
for (const line of lines) {
|
|
12
|
+
if (!line.trim()) continue;
|
|
13
|
+
|
|
14
|
+
const match = line.match(timestampPattern);
|
|
15
|
+
if (match) {
|
|
16
|
+
// Save previous entry if exists
|
|
17
|
+
if (currentEntry) {
|
|
18
|
+
entries.push(currentEntry);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Start new entry
|
|
22
|
+
const [fullMatch, timestamp, source] = match;
|
|
23
|
+
const message = line.substring(fullMatch.length);
|
|
24
|
+
const screenshot = message.match(/\[SCREENSHOT\] (.+)/)?.[1];
|
|
25
|
+
|
|
26
|
+
currentEntry = {
|
|
27
|
+
timestamp,
|
|
28
|
+
source,
|
|
29
|
+
message,
|
|
30
|
+
screenshot,
|
|
31
|
+
original: line
|
|
32
|
+
};
|
|
33
|
+
} else if (currentEntry) {
|
|
34
|
+
// Append to current entry's message
|
|
35
|
+
currentEntry.message += '\n' + line;
|
|
36
|
+
currentEntry.original += '\n' + line;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Don't forget the last entry
|
|
41
|
+
if (currentEntry) {
|
|
42
|
+
entries.push(currentEntry);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return entries;
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dev3000",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "AI-powered development tools with browser monitoring and MCP server integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"claude"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"biome": "^0.3.3",
|
|
33
34
|
"chalk": "^5.3.0",
|
|
34
35
|
"cli-progress": "^3.12.0",
|
|
35
36
|
"commander": "^11.1.0",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "tsc && mkdir -p dist/src && cp src/loading.html dist/src/",
|
|
61
62
|
"dev": "tsc --watch",
|
|
63
|
+
"format": "biome format --write .",
|
|
62
64
|
"test": "vitest run",
|
|
63
65
|
"postinstall": "cd mcp-server && pnpm install --frozen-lockfile",
|
|
64
66
|
"release": "./scripts/release.sh",
|