@gettrace/cli 1.0.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.
- package/README.md +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +452 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ============================================
|
|
3
|
+
// TRACE CONNECT IDE BRIDGE
|
|
4
|
+
// Allows Trace extension to interact with the local filesystem
|
|
5
|
+
// ============================================
|
|
6
|
+
import { program } from 'commander';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { WebSocketServer } from 'ws';
|
|
9
|
+
import * as fs from 'fs';
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
import { exec } from 'child_process';
|
|
12
|
+
import { promisify } from 'util';
|
|
13
|
+
const execAsync = promisify(exec);
|
|
14
|
+
const VERSION = '1.0.0';
|
|
15
|
+
program
|
|
16
|
+
.name('trace-connect')
|
|
17
|
+
.description('IDE Bridge for Trace Extension allowing secure file system access')
|
|
18
|
+
.version(VERSION);
|
|
19
|
+
program
|
|
20
|
+
.command('connect', { isDefault: true })
|
|
21
|
+
.alias('c')
|
|
22
|
+
.description('Start IDE bridge for Chrome extension (enables source code access)')
|
|
23
|
+
.option('-p, --port <port>', 'WebSocket port', '8765')
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
const port = parseInt(options.port);
|
|
26
|
+
const projectPath = process.cwd();
|
|
27
|
+
console.log();
|
|
28
|
+
console.log(chalk.bold.cyan('🔗 Trace IDE Bridge'));
|
|
29
|
+
console.log(chalk.gray('─'.repeat(55)));
|
|
30
|
+
console.log();
|
|
31
|
+
console.log(`📁 Project: ${chalk.green(projectPath)}`);
|
|
32
|
+
console.log(`🌐 Port: ${chalk.cyan(port)}`);
|
|
33
|
+
console.log();
|
|
34
|
+
// Read package.json for project info
|
|
35
|
+
let projectInfo = { projectPath };
|
|
36
|
+
try {
|
|
37
|
+
const pkgPath = path.join(projectPath, 'package.json');
|
|
38
|
+
if (fs.existsSync(pkgPath)) {
|
|
39
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
40
|
+
projectInfo = {
|
|
41
|
+
...projectInfo,
|
|
42
|
+
name: pkg.name,
|
|
43
|
+
version: pkg.version,
|
|
44
|
+
description: pkg.description
|
|
45
|
+
};
|
|
46
|
+
console.log(`📦 Package: ${chalk.yellow(pkg.name)} v${pkg.version}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
// No package.json, that's fine
|
|
51
|
+
}
|
|
52
|
+
// Start WebSocket server
|
|
53
|
+
const wss = new WebSocketServer({ port });
|
|
54
|
+
let clientCount = 0;
|
|
55
|
+
console.log();
|
|
56
|
+
console.log(chalk.green('✓') + ' WebSocket server started');
|
|
57
|
+
console.log(chalk.dim('Waiting for extension to connect...'));
|
|
58
|
+
console.log();
|
|
59
|
+
console.log(chalk.gray('─'.repeat(55)));
|
|
60
|
+
console.log(chalk.dim('Press Ctrl+C to stop'));
|
|
61
|
+
console.log();
|
|
62
|
+
wss.on('connection', (ws) => {
|
|
63
|
+
clientCount++;
|
|
64
|
+
console.log(chalk.green('●') + ` Extension connected (${clientCount} client${clientCount > 1 ? 's' : ''})`);
|
|
65
|
+
ws.on('message', async (data) => {
|
|
66
|
+
try {
|
|
67
|
+
const message = JSON.parse(data.toString());
|
|
68
|
+
const { id, type } = message;
|
|
69
|
+
let response = { id };
|
|
70
|
+
switch (type) {
|
|
71
|
+
case 'GET_PROJECT_INFO':
|
|
72
|
+
response.data = projectInfo;
|
|
73
|
+
break;
|
|
74
|
+
case 'READ_FILE':
|
|
75
|
+
try {
|
|
76
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
77
|
+
if (!filePath.startsWith(projectPath)) {
|
|
78
|
+
response.error = 'Access denied';
|
|
79
|
+
}
|
|
80
|
+
else if (fs.existsSync(filePath)) {
|
|
81
|
+
response.data = {
|
|
82
|
+
content: fs.readFileSync(filePath, 'utf-8'),
|
|
83
|
+
exists: true,
|
|
84
|
+
path: filePath
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
response.data = { exists: false };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
response.error = e.message;
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case 'GET_SOURCE':
|
|
96
|
+
try {
|
|
97
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
98
|
+
if (!filePath.startsWith(projectPath)) {
|
|
99
|
+
response.error = 'Access denied';
|
|
100
|
+
}
|
|
101
|
+
else if (fs.existsSync(filePath)) {
|
|
102
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
103
|
+
const lines = content.split('\n');
|
|
104
|
+
const start = Math.max(0, (message.lineStart || 1) - 1);
|
|
105
|
+
const end = message.lineEnd ? Math.min(lines.length, message.lineEnd) : lines.length;
|
|
106
|
+
response.data = {
|
|
107
|
+
lines: lines.slice(start, end),
|
|
108
|
+
startLine: start + 1,
|
|
109
|
+
endLine: end,
|
|
110
|
+
totalLines: lines.length
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
response.error = 'File not found';
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
response.error = e.message;
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case 'GET_ERROR_CONTEXT':
|
|
122
|
+
try {
|
|
123
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
124
|
+
if (!filePath.startsWith(projectPath)) {
|
|
125
|
+
response.error = 'Access denied';
|
|
126
|
+
}
|
|
127
|
+
else if (fs.existsSync(filePath)) {
|
|
128
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
129
|
+
const lines = content.split('\n');
|
|
130
|
+
const targetLine = message.line || 1;
|
|
131
|
+
const contextLines = message.contextLines || 5;
|
|
132
|
+
const start = Math.max(0, targetLine - contextLines - 1);
|
|
133
|
+
const end = Math.min(lines.length, targetLine + contextLines);
|
|
134
|
+
response.data = {
|
|
135
|
+
lines: lines.slice(start, end).map((line, i) => ({
|
|
136
|
+
number: start + i + 1,
|
|
137
|
+
content: line,
|
|
138
|
+
isError: start + i + 1 === targetLine
|
|
139
|
+
})),
|
|
140
|
+
errorLine: targetLine,
|
|
141
|
+
filePath: message.filePath
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
response.error = 'File not found';
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
response.error = e.message;
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case 'GET_FILE_TREE':
|
|
153
|
+
try {
|
|
154
|
+
const depth = message.depth || 3;
|
|
155
|
+
const tree = getFileTree(projectPath, depth);
|
|
156
|
+
response.data = { tree };
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
response.error = e.message;
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
case 'SEARCH_CODE':
|
|
163
|
+
try {
|
|
164
|
+
const query = message.query;
|
|
165
|
+
const matches = searchInFiles(projectPath, query, 20);
|
|
166
|
+
response.data = { matches };
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
response.error = e.message;
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
// ========== FILE WRITING (UI Design Export) ==========
|
|
173
|
+
case 'WRITE_FILE':
|
|
174
|
+
try {
|
|
175
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
176
|
+
if (!filePath.startsWith(projectPath)) {
|
|
177
|
+
response.error = 'Access denied: Path outside project';
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
const dirPath = path.dirname(filePath);
|
|
181
|
+
if (!fs.existsSync(dirPath)) {
|
|
182
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
183
|
+
}
|
|
184
|
+
fs.writeFileSync(filePath, message.content, 'utf-8');
|
|
185
|
+
response.data = { success: true, path: filePath };
|
|
186
|
+
console.log(chalk.blue('ℹ') + ` Wrote file: ${message.filePath}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch (e) {
|
|
190
|
+
response.error = e.message;
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case 'APPEND_FILE':
|
|
194
|
+
try {
|
|
195
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
196
|
+
if (!filePath.startsWith(projectPath)) {
|
|
197
|
+
response.error = 'Access denied: Path outside project';
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
fs.appendFileSync(filePath, '\n' + message.content, 'utf-8');
|
|
201
|
+
response.data = { success: true, path: filePath };
|
|
202
|
+
console.log(chalk.blue('ℹ') + ` Appended file: ${message.filePath}`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
catch (e) {
|
|
206
|
+
response.error = e.message;
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case 'EDIT_FILE':
|
|
210
|
+
try {
|
|
211
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
212
|
+
if (!filePath.startsWith(projectPath)) {
|
|
213
|
+
response.error = 'Access denied: Path outside project';
|
|
214
|
+
}
|
|
215
|
+
else if (!fs.existsSync(filePath)) {
|
|
216
|
+
response.error = 'File not found for editing';
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
220
|
+
if (!content.includes(message.target)) {
|
|
221
|
+
response.error = 'Target string not found in file (must be exact match)';
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
const newContent = content.replace(message.target, message.replacement);
|
|
225
|
+
fs.writeFileSync(filePath, newContent, 'utf-8');
|
|
226
|
+
response.data = { success: true, path: filePath };
|
|
227
|
+
console.log(chalk.blue('ℹ') + ` Edited file: ${message.filePath}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
catch (e) {
|
|
232
|
+
response.error = e.message;
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
// ========== GIT & ENVIRONMENT TOOLS ==========
|
|
236
|
+
case 'GIT_BLAME':
|
|
237
|
+
try {
|
|
238
|
+
const filePath = message.filePath;
|
|
239
|
+
const line = message.line;
|
|
240
|
+
const { stdout } = await execAsync(`git blame -L ${line},${line} --porcelain "${filePath}"`, { cwd: projectPath });
|
|
241
|
+
const lines = stdout.split('\n');
|
|
242
|
+
const commitHash = lines[0].split(' ')[0];
|
|
243
|
+
const author = lines.find((l) => l.startsWith('author '))?.substring(7);
|
|
244
|
+
const email = lines.find((l) => l.startsWith('author-mail '))?.substring(12);
|
|
245
|
+
const date = lines.find((l) => l.startsWith('author-time '))?.substring(12);
|
|
246
|
+
const summary = lines.find((l) => l.startsWith('summary '))?.substring(8);
|
|
247
|
+
response.data = {
|
|
248
|
+
commit: commitHash,
|
|
249
|
+
author,
|
|
250
|
+
email,
|
|
251
|
+
date: new Date(parseInt(date) * 1000).toISOString().split('T')[0],
|
|
252
|
+
message: summary
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (e) {
|
|
256
|
+
response.error = `Git blame failed: ${e.message}`;
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
case 'GIT_RECENT_CHANGES':
|
|
260
|
+
try {
|
|
261
|
+
const filePath = message.filePath;
|
|
262
|
+
const days = message.days || 7;
|
|
263
|
+
const { stdout } = await execAsync(`git log -n 10 --since="${days} days ago" --pretty=format:"%h|%an|%ad|%s" --date=short "${filePath}"`, { cwd: projectPath });
|
|
264
|
+
response.data = {
|
|
265
|
+
history: stdout.split('\n').filter(Boolean).map((line) => {
|
|
266
|
+
const [hash, author, date, message] = line.split('|');
|
|
267
|
+
return { hash, author, date, message };
|
|
268
|
+
})
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
catch (e) {
|
|
272
|
+
response.error = `Git log failed: ${e.message}`;
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
case 'GET_IMPORTS':
|
|
276
|
+
try {
|
|
277
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
278
|
+
if (fs.existsSync(filePath)) {
|
|
279
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
280
|
+
const importRegex = /import\s+(?:[\w*\s{},]*)\s+from\s+['"]([^'"]+)['"]/g;
|
|
281
|
+
const imports = [];
|
|
282
|
+
let match;
|
|
283
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
284
|
+
imports.push(match[1]);
|
|
285
|
+
}
|
|
286
|
+
response.data = { imports };
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
response.error = 'File not found';
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
catch (e) {
|
|
293
|
+
response.error = e.message;
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
case 'FIND_USAGES':
|
|
297
|
+
try {
|
|
298
|
+
const query = message.query;
|
|
299
|
+
const { stdout } = await execAsync(`git grep -n "${query}"`, { cwd: projectPath });
|
|
300
|
+
response.data = {
|
|
301
|
+
usages: stdout.split('\n').filter(Boolean).slice(0, 20).map((line) => {
|
|
302
|
+
const parts = line.split(':');
|
|
303
|
+
return {
|
|
304
|
+
file: parts[0],
|
|
305
|
+
line: parseInt(parts[1]),
|
|
306
|
+
content: parts.slice(2).join(':').trim()
|
|
307
|
+
};
|
|
308
|
+
})
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
catch (e) {
|
|
312
|
+
if (e.code === 1)
|
|
313
|
+
response.data = { usages: [] };
|
|
314
|
+
else
|
|
315
|
+
response.error = `Grep failed: ${e.message}`;
|
|
316
|
+
}
|
|
317
|
+
break;
|
|
318
|
+
case 'GET_ENV_VARS':
|
|
319
|
+
try {
|
|
320
|
+
const filePath = path.resolve(projectPath, message.filePath);
|
|
321
|
+
if (fs.existsSync(filePath)) {
|
|
322
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
323
|
+
const envRegex = /(?:process\.env\.|import\.meta\.env\.)([A-Z_][A-Z0-9_]*)/g;
|
|
324
|
+
const vars = new Set();
|
|
325
|
+
let match;
|
|
326
|
+
while ((match = envRegex.exec(content)) !== null) {
|
|
327
|
+
vars.add(match[1]);
|
|
328
|
+
}
|
|
329
|
+
response.data = { envVars: Array.from(vars) };
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
response.error = 'File not found';
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
catch (e) {
|
|
336
|
+
response.error = e.message;
|
|
337
|
+
}
|
|
338
|
+
break;
|
|
339
|
+
default:
|
|
340
|
+
response.error = `Unknown message type: ${type}`;
|
|
341
|
+
}
|
|
342
|
+
ws.send(JSON.stringify(response));
|
|
343
|
+
}
|
|
344
|
+
catch (e) {
|
|
345
|
+
console.error(chalk.red('Parse error:'), e.message);
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
ws.on('close', () => {
|
|
349
|
+
clientCount--;
|
|
350
|
+
console.log(chalk.yellow('●') + ` Extension disconnected (${clientCount} client${clientCount > 1 ? 's' : ''})`);
|
|
351
|
+
});
|
|
352
|
+
ws.on('error', (error) => {
|
|
353
|
+
console.error(chalk.red('WebSocket error:'), error.message);
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
wss.on('error', (error) => {
|
|
357
|
+
if (error.code === 'EADDRINUSE') {
|
|
358
|
+
console.log(chalk.red(`✗ Port ${port} is already in use`));
|
|
359
|
+
console.log(chalk.dim('Try: trace-connect --port 8766'));
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
console.error(chalk.red('Server error:'), error.message);
|
|
363
|
+
}
|
|
364
|
+
process.exit(1);
|
|
365
|
+
});
|
|
366
|
+
process.on('SIGINT', () => {
|
|
367
|
+
console.log();
|
|
368
|
+
console.log(chalk.dim('Stopping...'));
|
|
369
|
+
wss.close();
|
|
370
|
+
process.exit(0);
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
program.parse(process.argv);
|
|
374
|
+
// Helper: Get file tree
|
|
375
|
+
function getFileTree(dir, depth, currentDepth = 0) {
|
|
376
|
+
if (currentDepth >= depth)
|
|
377
|
+
return null;
|
|
378
|
+
const result = {};
|
|
379
|
+
const ignorePatterns = ['node_modules', '.git', 'dist', 'build', '.next', 'coverage', '.cache'];
|
|
380
|
+
try {
|
|
381
|
+
const items = fs.readdirSync(dir);
|
|
382
|
+
for (const item of items.slice(0, 50)) {
|
|
383
|
+
if (ignorePatterns.includes(item) || item.startsWith('.'))
|
|
384
|
+
continue;
|
|
385
|
+
const fullPath = path.join(dir, item);
|
|
386
|
+
try {
|
|
387
|
+
const stat = fs.statSync(fullPath);
|
|
388
|
+
if (stat.isDirectory()) {
|
|
389
|
+
result[item] = getFileTree(fullPath, depth, currentDepth + 1);
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
result[item] = 'file';
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
catch (e) {
|
|
396
|
+
// Skip inaccessible
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
catch (e) {
|
|
401
|
+
// Skip inaccessible dirs
|
|
402
|
+
}
|
|
403
|
+
return result;
|
|
404
|
+
}
|
|
405
|
+
// Helper: Simple search in files
|
|
406
|
+
function searchInFiles(dir, query, maxResults) {
|
|
407
|
+
const results = [];
|
|
408
|
+
const extensions = ['.js', '.ts', '.jsx', '.tsx', '.vue', '.svelte', '.css', '.html', '.json'];
|
|
409
|
+
const ignorePatterns = ['node_modules', '.git', 'dist', 'build', '.next', '.cache'];
|
|
410
|
+
function searchDir(currentDir) {
|
|
411
|
+
if (results.length >= maxResults)
|
|
412
|
+
return;
|
|
413
|
+
try {
|
|
414
|
+
const items = fs.readdirSync(currentDir);
|
|
415
|
+
for (const item of items) {
|
|
416
|
+
if (results.length >= maxResults)
|
|
417
|
+
return;
|
|
418
|
+
if (ignorePatterns.includes(item) || item.startsWith('.'))
|
|
419
|
+
continue;
|
|
420
|
+
const fullPath = path.join(currentDir, item);
|
|
421
|
+
try {
|
|
422
|
+
const stat = fs.statSync(fullPath);
|
|
423
|
+
if (stat.isDirectory()) {
|
|
424
|
+
searchDir(fullPath);
|
|
425
|
+
}
|
|
426
|
+
else if (extensions.some(ext => item.endsWith(ext))) {
|
|
427
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
428
|
+
const lines = content.split('\n');
|
|
429
|
+
for (let i = 0; i < lines.length && results.length < maxResults; i++) {
|
|
430
|
+
if (lines[i].includes(query)) {
|
|
431
|
+
results.push({
|
|
432
|
+
file: path.relative(dir, fullPath),
|
|
433
|
+
line: i + 1,
|
|
434
|
+
content: lines[i].trim().substring(0, 200)
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
catch (e) {
|
|
441
|
+
// ignore
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
catch (e) {
|
|
446
|
+
// ignore
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
searchDir(dir);
|
|
450
|
+
return results;
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,+CAA+C;AAC/C,2BAA2B;AAC3B,+DAA+D;AAC/D,+CAA+C;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAa,MAAM,IAAI,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OA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C;4BACP,CAAC;wBACL,CAAC;oBACL,CAAC;gBACL,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACT,SAAS;gBACb,CAAC;YACL,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACR,SAAS;QACd,CAAC;IACL,CAAC;IAED,SAAS,CAAC,GAAG,CAAC,CAAC;IACf,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gettrace/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Trace IDE Bridge for connecting local filesystem to Trace browser extensions.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"trace": "./dist/index.js",
|
|
9
|
+
"trace-connect": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"dev": "tsc --watch",
|
|
14
|
+
"start": "node dist/index.js",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"debugging",
|
|
19
|
+
"ide-bridge",
|
|
20
|
+
"trace",
|
|
21
|
+
"probebrowser",
|
|
22
|
+
"ai-coding"
|
|
23
|
+
],
|
|
24
|
+
"author": "Trace",
|
|
25
|
+
"license": "UNLICENSED",
|
|
26
|
+
"private": false,
|
|
27
|
+
"homepage": "https://www.gettrace.dev",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "",
|
|
31
|
+
"directory": "packages/cli"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"chalk": "^5.3.0",
|
|
38
|
+
"commander": "^12.0.0",
|
|
39
|
+
"ws": "^8.16.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.0.0",
|
|
43
|
+
"@types/ws": "^8.5.10",
|
|
44
|
+
"typescript": "^5.3.0"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"README.md"
|
|
49
|
+
]
|
|
50
|
+
}
|