electron-debug-skill 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -308,9 +308,31 @@ async function cmdStatus() {
308
308
  }
309
309
  }
310
310
  async function cmdListPages(args) {
311
+ // Use daemon API
312
+ const isDaemonRunning = await daemonCheck();
313
+ if (isDaemonRunning) {
314
+ try {
315
+ const targets = await daemonRequest('/targets', 'GET');
316
+ console.log('\nAvailable Pages:');
317
+ console.log('─'.repeat(60));
318
+ (targets || [])
319
+ .filter((t) => t.type === 'page')
320
+ .forEach((t, i) => {
321
+ const marker = t.id === currentTargetId ? '→ ' : ' ';
322
+ console.log(`${marker}[${i + 1}] ${t.title}`);
323
+ console.log(` URL: ${t.url}`);
324
+ console.log(` ID: ${t.id}`);
325
+ console.log('');
326
+ });
327
+ }
328
+ catch (err) {
329
+ console.error('Error:', err.message);
330
+ }
331
+ return;
332
+ }
333
+ // Fallback to direct connection
311
334
  const port = Number(args.port) || connectionPort;
312
335
  const host = args.host ? String(args.host) : connectionHost;
313
- // Fetch targets via HTTP JSON endpoint (doesn't require connection)
314
336
  const http = await import('http');
315
337
  const targetsJson = await new Promise((resolve, reject) => {
316
338
  http.get(`http://${host}:${port}/json`, (res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-debug-skill",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "Claude Code Skill for debugging Electron applications using Chrome DevTools Protocol (CDP)",
6
6
  "main": "dist/index.js",