yap2app 1.1.5 → 1.1.7

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/bin/cli-esm.js CHANGED
@@ -13,30 +13,42 @@ async function main() {
13
13
  await runMcpServer();
14
14
  } else if (command === 'scan') {
15
15
  // Run standalone shallow scanner and print summary
16
- console.log(`\nšŸ” Yap2App Codebase Context Scanner:`);
16
+ console.log(`\nYap2App Codebase Context:\n`);
17
17
  const context = await scanCodebase(process.cwd());
18
- console.log(`\nProject: ${context.project_name}`);
19
- console.log(`Framework: ${context.framework} (${context.framework_display_name || 'Generic'})`);
20
- console.log(`Path Alias: ${context.path_alias || '@/'}`);
21
- const depCount = Array.isArray(context.dependencies) ? context.dependencies.length : Object.keys(context.dependencies || {}).length;
22
- console.log(`Dependencies Detected: ${depCount}`);
23
- console.log(`UI Components Catalog: ${(context.component_names || []).join(', ') || 'None'}`);
24
- console.log(`\nFull Context JSON:\n`, JSON.stringify(context, null, 2));
18
+ console.log(` Project: ${context.project_name}`);
19
+ console.log(` Framework: ${context.framework_display_name || context.framework}`);
20
+ console.log(` Path Alias: ${context.path_alias || '@/'}`);
21
+ console.log(` Files: ${context.discovered_files?.length || 0}`);
22
+ console.log(` Components: ${(context.component_names || []).join(', ') || 'None'}\n`);
23
+ } else if (command === 'init' || command === 'install') {
24
+ const context = await scanCodebase(process.cwd());
25
+ console.log(`\n⚔ Yap2App Workspace Initializer:`);
26
+ console.log(` Directory: ${context.project_root}`);
27
+ console.log(` Framework: ${context.framework_display_name || 'Plain HTML / CSS / JS (Fresh Workspace)'}`);
28
+ console.log(` Files Found: ${context.total_files_count}`);
29
+ if (context.total_files_count === 0) {
30
+ console.log(`\n ā„¹ļø Fresh / empty directory detected.`);
31
+ console.log(` Starting Local Bridge. Generate and sync components from Web Studio to scaffold files directly here.\n`);
32
+ } else {
33
+ console.log(`\n Existing codebase indexed with ${context.total_files_count} files.\n`);
34
+ }
35
+ startBridge();
25
36
  } else if (command === 'start' || command === 'bridge' || command === 'server') {
26
37
  // Start Localhost Bridge for Web Studio UI
27
38
  startBridge();
28
39
  } else if (command === 'help' || command === '--help' || command === '-h') {
29
40
  console.log(`
30
- ⚔ Yap2App CLI & MCP Toolkit ⚔
41
+ Yap2App CLI
31
42
 
32
43
  Usage:
33
44
  npx yap2app [command]
34
45
 
35
46
  Commands:
36
- start | bridge Start the Localhost Bridge with W3C PNA for 1-click Web Studio Sync (Default)
37
- mcp Run the Model Context Protocol (MCP) Server over stdio for Cursor/Claude
38
- scan Run a shallow codebase scan and print detected standards & UI primitives
39
- help Display this help guide
47
+ start, bridge Start local bridge for Web Studio sync (default)
48
+ init, install Initialize and link fresh/existing folder with Web Studio
49
+ mcp Run MCP server over stdio for Cursor / Claude Desktop
50
+ scan Scan codebase context and detected components
51
+ help Show this help message
40
52
  `);
41
53
  } else {
42
54
  // Default fallback to bridge