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 +25 -13
- package/bin/cli.bundle.js +512 -498
- package/bin/cli.js +512 -498
- package/bridge.js +50 -28
- package/mcp.js +2 -31
- package/package.json +2 -1
- package/scanner.js +7 -0
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(`\
|
|
16
|
+
console.log(`\nYap2App Codebase Context:\n`);
|
|
17
17
|
const context = await scanCodebase(process.cwd());
|
|
18
|
-
console.log(
|
|
19
|
-
console.log(`Framework:
|
|
20
|
-
console.log(`Path Alias:
|
|
21
|
-
|
|
22
|
-
console.log(`
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
41
|
+
Yap2App CLI
|
|
31
42
|
|
|
32
43
|
Usage:
|
|
33
44
|
npx yap2app [command]
|
|
34
45
|
|
|
35
46
|
Commands:
|
|
36
|
-
start
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|