pixelcrew 0.2.0 → 0.2.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.
@@ -55,17 +55,17 @@ export async function initializeProject(targetDir = process.cwd(), options = {})
55
55
  console.log(` \x1b[90m• Frameworks:\x1b[0m ${profile.frameworks.join(', ') || 'Standard Web'}`);
56
56
  console.log(` \x1b[90m• Backend:\x1b[0m ${profile.backend.join(', ') || 'Node.js'}`);
57
57
  console.log(` \x1b[90m• Database:\x1b[0m ${profile.database.join(', ') || 'SQL / Relational'}`);
58
- console.log(` \x1b[90m• Testing:\x1b[0m ${profile.testing.join(', ') || 'Standard Testing'}`);
59
-
60
58
  const pixelAgentsDir = path.join(targetDir, '.pixel-agents');
61
59
  const agentsDir = path.join(pixelAgentsDir, 'agents');
62
60
  const skillsDir = path.join(pixelAgentsDir, 'skills');
63
- const dashboardDir = path.join(targetDir, '.pixel-dashboard');
61
+ const reportsDir = path.join(pixelAgentsDir, 'reports');
62
+ const dashboardDir = path.join(pixelAgentsDir, 'dashboard');
64
63
 
65
- // Create directories
64
+ // Create directories inside .pixel-agents
66
65
  await fs.mkdir(pixelAgentsDir, { recursive: true });
67
66
  await fs.mkdir(agentsDir, { recursive: true });
68
67
  await fs.mkdir(skillsDir, { recursive: true });
68
+ await fs.mkdir(reportsDir, { recursive: true });
69
69
  if (enableDashboard) {
70
70
  await fs.mkdir(dashboardDir, { recursive: true });
71
71
  }
@@ -139,7 +139,7 @@ export async function initializeProject(targetDir = process.cwd(), options = {})
139
139
  await fs.writeFile(path.join(dashboardDir, 'index.html'), html, 'utf-8');
140
140
  await fs.writeFile(path.join(dashboardDir, 'styles.css'), css, 'utf-8');
141
141
  await fs.writeFile(path.join(dashboardDir, 'app.js'), js, 'utf-8');
142
- console.log(' \x1b[32m✓\x1b[0m Created .pixel-dashboard/ (index.html, styles.css, app.js)');
142
+ console.log(' \x1b[32m✓\x1b[0m Created .pixel-agents/dashboard/ (index.html, styles.css, app.js)');
143
143
  } catch (err) {
144
144
  // ignore
145
145
  }
@@ -6,7 +6,8 @@ import { fileURLToPath } from 'node:url';
6
6
 
7
7
  export function createServer(engine, options = {}) {
8
8
  const rootDir = engine.rootDir;
9
- const dashboardDir = path.join(rootDir, '.pixel-dashboard');
9
+ const dashboardDir = path.join(rootDir, '.pixel-agents', 'dashboard');
10
+ const legacyDashboardDir = path.join(rootDir, '.pixel-dashboard');
10
11
  const fallbackDashboardDir = fileURLToPath(new URL('../dashboard', import.meta.url));
11
12
 
12
13
  const sseClients = new Set();
@@ -233,9 +234,14 @@ export function createServer(engine, options = {}) {
233
234
  try {
234
235
  await fs.access(filePath);
235
236
  } catch {
236
- res.writeHead(404, { 'Content-Type': 'text/plain' });
237
- res.end('404 Not Found');
238
- return;
237
+ filePath = path.join(legacyDashboardDir, filename);
238
+ try {
239
+ await fs.access(filePath);
240
+ } catch {
241
+ res.writeHead(404, { 'Content-Type': 'text/plain' });
242
+ res.end('404 Not Found');
243
+ return;
244
+ }
239
245
  }
240
246
  }
241
247