@agentlang/cli 0.11.9 → 0.12.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/out/main.js +206 -268
- package/out/main.js.map +1 -1
- package/out/repl.js +86 -100
- package/out/repl.js.map +1 -1
- package/out/studio/services/AppManagementService.js +7 -19
- package/out/studio/services/AppManagementService.js.map +1 -1
- package/out/studio/services/AppRuntimeService.js +14 -15
- package/out/studio/services/AppRuntimeService.js.map +1 -1
- package/out/studio/services/GitHubService.js +16 -16
- package/out/studio/services/GitHubService.js.map +1 -1
- package/out/studio.js +36 -41
- package/out/studio.js.map +1 -1
- package/out/ui/components/Help.js +25 -0
- package/out/ui/components/Help.js.map +1 -0
- package/out/ui/index.js +2 -0
- package/out/ui/index.js.map +1 -0
- package/out/ui/print.js +61 -0
- package/out/ui/print.js.map +1 -0
- package/out/ui-generator/specFinder.js +4 -7
- package/out/ui-generator/specFinder.js.map +1 -1
- package/out/ui-generator/specLoader.js +2 -3
- package/out/ui-generator/specLoader.js.map +1 -1
- package/out/ui-generator/uiGenerator.js +56 -57
- package/out/ui-generator/uiGenerator.js.map +1 -1
- package/out/utils/projectInitializer.js +21 -58
- package/out/utils/projectInitializer.js.map +1 -1
- package/package.json +6 -4
package/out/studio.js
CHANGED
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
1
|
import express from 'express';
|
|
3
2
|
import cors from 'cors';
|
|
4
3
|
import path from 'path';
|
|
5
|
-
import chalk from 'chalk';
|
|
6
4
|
import ora from 'ora';
|
|
5
|
+
import { ui } from './ui/index.js';
|
|
7
6
|
import open from 'open';
|
|
8
7
|
import { getWorkspaceRoot, findLStudioPath } from './studio/utils.js';
|
|
9
8
|
import { FileService } from './studio/services/FileService.js';
|
|
10
9
|
import { StudioServer } from './studio/services/StudioServer.js';
|
|
11
10
|
import { createRoutes } from './studio/routes.js';
|
|
12
11
|
export async function startStudio(projectPath = '.', studioPort = 4000, serverOnly = false) {
|
|
13
|
-
const spinner = ora(serverOnly ? 'Starting Studio backend server...' : 'Starting Agent Studio...').start();
|
|
14
12
|
const inputDir = path.resolve(process.cwd(), projectPath);
|
|
15
13
|
// Smart Parent Detection: Determine workspace root and initial app
|
|
16
14
|
const { workspaceRoot, initialAppPath } = getWorkspaceRoot(inputDir);
|
|
15
|
+
// ── Startup banner ──────────────────────────────────────────────────────────
|
|
16
|
+
ui.blank();
|
|
17
|
+
ui.banner(serverOnly ? 'Agent Studio' : 'Agent Studio', serverOnly ? 'Backend Server' : undefined);
|
|
18
|
+
ui.blank();
|
|
19
|
+
if (initialAppPath) {
|
|
20
|
+
ui.label('Project', path.basename(initialAppPath), 'cyan');
|
|
21
|
+
}
|
|
22
|
+
ui.label('Workspace', workspaceRoot);
|
|
23
|
+
ui.label('Port', String(studioPort), 'cyan');
|
|
24
|
+
ui.blank();
|
|
25
|
+
// ── Initialize ──────────────────────────────────────────────────────────────
|
|
26
|
+
const spinner = ora({
|
|
27
|
+
text: ui.format.dim('Initializing...'),
|
|
28
|
+
spinner: 'dots',
|
|
29
|
+
}).start();
|
|
17
30
|
// Initialize Services with workspace root
|
|
18
31
|
const fileService = new FileService(workspaceRoot);
|
|
19
32
|
const studioServer = new StudioServer(workspaceRoot, initialAppPath, fileService);
|
|
20
|
-
// Always use Dashboard Mode
|
|
21
33
|
if (initialAppPath) {
|
|
22
|
-
|
|
23
|
-
console.log(chalk.blue(`ℹ Detected project: ${path.basename(initialAppPath)}`));
|
|
24
|
-
console.log(chalk.blue(`ℹ Workspace root: ${workspaceRoot}`));
|
|
25
|
-
console.log(chalk.dim(' Auto-launching app...'));
|
|
26
|
-
// Auto-launch the detected app
|
|
27
|
-
// This sets the current app in StudioServer, which the frontend can detect via /workspace or /apps
|
|
34
|
+
spinner.text = ui.format.dim(`Launching ${path.basename(initialAppPath)}...`);
|
|
28
35
|
await studioServer.launchApp(initialAppPath);
|
|
29
36
|
}
|
|
30
37
|
else {
|
|
31
|
-
|
|
32
|
-
console.log(chalk.blue(`ℹ Workspace root: ${workspaceRoot}`));
|
|
33
|
-
console.log(chalk.dim(' Starting in Dashboard Mode. Select an app from the UI to launch it.'));
|
|
38
|
+
spinner.text = ui.format.dim('Starting Dashboard Mode...');
|
|
34
39
|
}
|
|
35
|
-
spinner.succeed(
|
|
40
|
+
spinner.succeed(ui.format.success('Studio initialized'));
|
|
36
41
|
// Find @agentlang/lstudio (skip in server-only mode)
|
|
37
|
-
// Try to find it in the input directory first (for projects with local lstudio)
|
|
38
|
-
// then fall back to workspace root
|
|
39
42
|
let lstudioPath = null;
|
|
40
43
|
if (!serverOnly) {
|
|
41
44
|
lstudioPath = findLStudioPath(inputDir);
|
|
@@ -43,9 +46,7 @@ export async function startStudio(projectPath = '.', studioPort = 4000, serverOn
|
|
|
43
46
|
lstudioPath = findLStudioPath(workspaceRoot);
|
|
44
47
|
}
|
|
45
48
|
if (!lstudioPath) {
|
|
46
|
-
|
|
47
|
-
// Warn instead of exit in case we are just using API
|
|
48
|
-
console.warn(chalk.yellow('Warning: Could not find @agentlang/lstudio UI files.'));
|
|
49
|
+
ui.warn('Could not find @agentlang/lstudio UI files.');
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
// Create Express app
|
|
@@ -56,11 +57,8 @@ export async function startStudio(projectPath = '.', studioPort = 4000, serverOn
|
|
|
56
57
|
app.use('/', createRoutes(studioServer, fileService));
|
|
57
58
|
// Serve static files from @agentlang/lstudio/dist (skip in server-only mode)
|
|
58
59
|
if (!serverOnly && lstudioPath) {
|
|
59
|
-
// Serve static files with fallthrough disabled - if file not found, continue to next middleware
|
|
60
60
|
app.use(express.static(lstudioPath, { fallthrough: true }));
|
|
61
|
-
// Handle client-side routing - serve index.html for all non-API, non-static-file routes
|
|
62
61
|
app.use((req, res, next) => {
|
|
63
|
-
// Skip if this is an API route (already handled by createRoutes)
|
|
64
62
|
if (req.path.startsWith('/files') ||
|
|
65
63
|
req.path.startsWith('/file') ||
|
|
66
64
|
req.path.startsWith('/test') ||
|
|
@@ -68,15 +66,12 @@ export async function startStudio(projectPath = '.', studioPort = 4000, serverOn
|
|
|
68
66
|
req.path.startsWith('/branch') ||
|
|
69
67
|
req.path.startsWith('/install') ||
|
|
70
68
|
req.path.startsWith('/env-config.js') ||
|
|
71
|
-
req.path.startsWith('/workspace') ||
|
|
69
|
+
req.path.startsWith('/workspace') ||
|
|
72
70
|
req.path.startsWith('/apps') ||
|
|
73
71
|
req.path.startsWith('/app/') ||
|
|
74
|
-
req.path.startsWith('/documents')
|
|
75
|
-
) {
|
|
72
|
+
req.path.startsWith('/documents')) {
|
|
76
73
|
return next();
|
|
77
74
|
}
|
|
78
|
-
// Check if this is a request for a static file with a known extension
|
|
79
|
-
// express.static would have already served it if it existed
|
|
80
75
|
const staticFileExtensions = [
|
|
81
76
|
'.js',
|
|
82
77
|
'.css',
|
|
@@ -95,12 +90,9 @@ export async function startStudio(projectPath = '.', studioPort = 4000, serverOn
|
|
|
95
90
|
'.html',
|
|
96
91
|
];
|
|
97
92
|
const hasStaticExtension = staticFileExtensions.some(ext => req.path.toLowerCase().endsWith(ext));
|
|
98
|
-
// If it's a static file request that express.static didn't handle, return 404
|
|
99
93
|
if (hasStaticExtension) {
|
|
100
94
|
return res.status(404).send('File not found');
|
|
101
95
|
}
|
|
102
|
-
// For all other GET requests, serve index.html
|
|
103
|
-
// (client-side routing will handle the rest, including routes with dots in them)
|
|
104
96
|
if (req.method === 'GET' && lstudioPath) {
|
|
105
97
|
res.sendFile(path.join(lstudioPath, 'index.html'));
|
|
106
98
|
}
|
|
@@ -109,27 +101,30 @@ export async function startStudio(projectPath = '.', studioPort = 4000, serverOn
|
|
|
109
101
|
}
|
|
110
102
|
});
|
|
111
103
|
}
|
|
112
|
-
// Start server
|
|
104
|
+
// ── Start server ────────────────────────────────────────────────────────────
|
|
113
105
|
await new Promise(resolve => {
|
|
114
106
|
app.listen(studioPort, () => {
|
|
115
|
-
spinner.succeed(chalk.green(`Studio server is running on http://localhost:${studioPort}`));
|
|
116
107
|
const studioUrl = `http://localhost:${studioPort}`;
|
|
108
|
+
ui.blank();
|
|
109
|
+
ui.divider(50);
|
|
110
|
+
ui.success('Studio is ready');
|
|
111
|
+
ui.blank();
|
|
117
112
|
if (serverOnly) {
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
ui.label('API', studioUrl, 'cyan');
|
|
114
|
+
ui.dim(' Endpoints: /files, /file, /info, /branch, /test, /workspace, /apps, /app/launch');
|
|
120
115
|
}
|
|
121
116
|
else {
|
|
122
|
-
|
|
117
|
+
ui.label('Local', studioUrl, 'cyan');
|
|
123
118
|
}
|
|
124
|
-
|
|
119
|
+
ui.blank();
|
|
120
|
+
ui.divider(50);
|
|
121
|
+
ui.blank();
|
|
125
122
|
if (!serverOnly) {
|
|
126
|
-
void open(studioUrl)
|
|
127
|
-
// Ignore errors when opening browser
|
|
128
|
-
});
|
|
123
|
+
void open(studioUrl);
|
|
129
124
|
}
|
|
130
|
-
// Handle cleanup on exit
|
|
131
125
|
const cleanup = () => {
|
|
132
|
-
|
|
126
|
+
ui.blank();
|
|
127
|
+
ui.warn('Shutting down...');
|
|
133
128
|
studioServer.stopApp(false);
|
|
134
129
|
process.exit(0);
|
|
135
130
|
};
|
package/out/studio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio.js","sourceRoot":"","sources":["../src/studio.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"studio.js","sourceRoot":"","sources":["../src/studio.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAA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,EAAE,CAAC;gBAChB,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;YACvB,CAAC;YAED,MAAM,OAAO,GAAG,GAAG,EAAE;gBACnB,EAAE,CAAC,KAAK,EAAE,CAAC;gBACX,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;gBAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC;YAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC9B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAE/B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
function Separator() {
|
|
4
|
+
return _jsx(Text, { dimColor: true, children: '─'.repeat(56) });
|
|
5
|
+
}
|
|
6
|
+
function SectionTitle({ title }) {
|
|
7
|
+
return (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "white", children: title }) }));
|
|
8
|
+
}
|
|
9
|
+
function Command({ name, args, description }) {
|
|
10
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { children: [' ', _jsx(Text, { color: "cyan", bold: true, children: name }), args && _jsxs(Text, { dimColor: true, children: [" ", args] })] }), _jsxs(Text, { dimColor: true, children: [' ', description] })] }));
|
|
11
|
+
}
|
|
12
|
+
function Option({ flag, arg, desc }) {
|
|
13
|
+
return (_jsxs(Text, { children: [' ', _jsx(Text, { color: "cyan", children: flag }), arg && _jsxs(Text, { dimColor: true, children: [" ", arg] }), ' ', _jsx(Text, { dimColor: true, children: desc })] }));
|
|
14
|
+
}
|
|
15
|
+
function SubOptions({ children }) {
|
|
16
|
+
return (_jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsx(Text, { color: "yellow", children: ' OPTIONS' }), children] }));
|
|
17
|
+
}
|
|
18
|
+
export default function Help({ version }) {
|
|
19
|
+
const g0 = '#00D9FF';
|
|
20
|
+
const g1 = '#00C4E6';
|
|
21
|
+
const g2 = '#00AFCC';
|
|
22
|
+
const g3 = '#009AB3';
|
|
23
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, marginBottom: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: g0, children: '█████╗ ' }), _jsx(Text, { color: g1, children: ' ██████╗ ' }), _jsx(Text, { color: g2, children: '███████╗' }), _jsx(Text, { color: g3, children: '███╗ ██╗' }), _jsx(Text, { color: g0, children: '████████╗' })] }), _jsxs(Text, { children: [_jsx(Text, { color: g0, children: '██╔══██╗' }), _jsx(Text, { color: g1, children: '██╔════╝ ' }), _jsx(Text, { color: g2, children: '██╔════╝' }), _jsx(Text, { color: g3, children: '████╗ ██║' }), _jsx(Text, { color: g0, children: '╚══██╔══╝' })] }), _jsxs(Text, { children: [_jsx(Text, { color: g0, children: '███████║' }), _jsx(Text, { color: g1, children: '██║ ███╗' }), _jsx(Text, { color: g2, children: '█████╗ ' }), _jsx(Text, { color: g3, children: '██╔██╗ ██║' }), _jsx(Text, { color: g0, children: ' ██║' })] }), _jsxs(Text, { children: [_jsx(Text, { color: g0, children: '██╔══██║' }), _jsx(Text, { color: g1, children: '██║ ██║' }), _jsx(Text, { color: g2, children: '██╔══╝ ' }), _jsx(Text, { color: g3, children: '██║╚██╗██║' }), _jsx(Text, { color: g0, children: ' ██║' })] }), _jsxs(Text, { children: [_jsx(Text, { color: g0, children: '██║ ██║' }), _jsx(Text, { color: g1, children: '╚██████╔╝' }), _jsx(Text, { color: g2, children: '███████╗' }), _jsx(Text, { color: g3, children: '██║ ╚████║' }), _jsx(Text, { color: g0, children: ' ██║' })] }), _jsxs(Text, { children: [_jsx(Text, { color: g0, children: '╚═╝ ╚═╝ ' }), _jsx(Text, { color: g1, children: ' ╚═════╝ ' }), _jsx(Text, { color: g2, children: '╚══════╝' }), _jsx(Text, { color: g3, children: '╚═╝ ╚═══╝' }), _jsx(Text, { color: g0, children: ' ╚═╝' })] }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsx(Text, { bold: true, color: "white", children: "Agentlang CLI" }), ' ', _jsxs(Text, { dimColor: true, children: ["v", version] })] }), _jsx(Text, { dimColor: true, children: "CLI for all things Agentlang" })] }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsx(SectionTitle, { title: "USAGE" }), _jsx(Separator, {}), _jsx(Box, { marginTop: 1, marginLeft: 2, children: _jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: "$ " }), _jsx(Text, { color: "cyan", children: "agent" }), " ", _jsx(Text, { color: "yellow", children: '<command>' }), " ", _jsx(Text, { dimColor: true, children: "[options]" })] }) })] }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsx(SectionTitle, { title: "COMMANDS" }), _jsx(Separator, {}), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Command, { name: "init", args: "<appname>", description: "Initialize a new Agentlang application" }), _jsx(SubOptions, { children: _jsx(Option, { flag: "-p, --prompt", arg: "<description>", desc: "Description or prompt for the application" }) }), _jsx(Command, { name: "run", args: "[file]", description: "Load and execute an Agentlang module" }), _jsx(SubOptions, { children: _jsx(Option, { flag: "-c, --config", arg: "<file>", desc: "Configuration file path" }) }), _jsx(Command, { name: "repl", args: "[directory]", description: "Start interactive REPL environment" }), _jsxs(SubOptions, { children: [_jsx(Option, { flag: "-w, --watch", desc: "Watch files and reload automatically" }), _jsx(Option, { flag: "-q, --quiet", desc: "Suppress startup messages" })] }), _jsx(Command, { name: "doc", args: "[file]", description: "Generate API documentation (Swagger/OpenAPI)" }), _jsxs(SubOptions, { children: [_jsx(Option, { flag: "-h, --outputHtml", arg: "<file>", desc: "Generate HTML documentation" }), _jsx(Option, { flag: "-p, --outputPostman", arg: "<file>", desc: "Generate Postman collection" })] }), _jsx(Command, { name: "parseAndValidate", args: "<file>", description: "Parse and validate Agentlang source code" }), _jsx(SubOptions, { children: _jsx(Option, { flag: "-d, --destination", arg: "<dir>", desc: "Output directory" }) }), _jsx(Command, { name: "ui-gen", args: "[spec-file]", description: "Generate UI from specification (requires Anthropic API key)" }), _jsxs(SubOptions, { children: [_jsx(Option, { flag: "-d, --directory", arg: "<dir>", desc: "Target directory" }), _jsx(Option, { flag: "-k, --api-key", arg: "<key>", desc: "Anthropic API key" }), _jsx(Option, { flag: "-p, --push", desc: "Commit and push to git" }), _jsx(Option, { flag: "-m, --message", arg: "<text>", desc: "Update instructions" })] }), _jsx(Command, { name: "fork", args: "<source> [name]", description: "Fork an app from a local directory or git repository" }), _jsxs(SubOptions, { children: [_jsx(Option, { flag: "-b, --branch", arg: "<branch>", desc: "Git branch to clone (for git URLs)" }), _jsx(Option, { flag: "-u, --username", arg: "<username>", desc: "GitHub username for authenticated access" }), _jsx(Option, { flag: "-t, --token", arg: "<token>", desc: "GitHub token for authenticated access" })] }), _jsx(Command, { name: "import", args: "<source> [name]", description: "Import an app (alias for fork)" }), _jsxs(SubOptions, { children: [_jsx(Option, { flag: "-b, --branch", arg: "<branch>", desc: "Git branch to clone (for git URLs)" }), _jsx(Option, { flag: "-u, --username", arg: "<username>", desc: "GitHub username for authenticated access" }), _jsx(Option, { flag: "-t, --token", arg: "<token>", desc: "GitHub token for authenticated access" })] }), _jsx(Command, { name: "studio", args: "[path]", description: "Start Agentlang Studio with local server" }), _jsx(SubOptions, { children: _jsx(Option, { flag: "-p, --port", arg: "<port>", desc: "Port to run Studio server on (default: 4000)" }) })] })] }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsx(SectionTitle, { title: "GLOBAL OPTIONS" }), _jsx(Separator, {}), _jsxs(Box, { flexDirection: "column", marginTop: 1, marginLeft: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: "cyan", children: "-h, --help" }), ' ', _jsx(Text, { dimColor: true, children: "Display help information" })] }), _jsxs(Text, { children: [_jsx(Text, { color: "cyan", children: "-V, --version" }), ' ', _jsx(Text, { dimColor: true, children: "Display version number" })] })] })] }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsx(SectionTitle, { title: "LEARN MORE" }), _jsx(Separator, {}), _jsxs(Box, { flexDirection: "column", marginTop: 1, marginLeft: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: "white", children: "Docs" }), ' ', _jsx(Text, { color: "cyan", children: "https://github.com/agentlang/agentlang-cli" })] }), _jsxs(Text, { children: [_jsx(Text, { color: "white", children: "Issues" }), ' ', _jsx(Text, { color: "cyan", children: "https://github.com/agentlang/agentlang-cli/issues" })] })] })] }), _jsx(Box, { marginLeft: 4, marginBottom: 1, children: _jsxs(Text, { dimColor: true, children: ['Run ', _jsxs(Text, { color: "cyan", children: ["agent ", '<command>', " --help"] }), ' for detailed command information'] }) })] }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Help.js","sourceRoot":"","sources":["../../../src/ui/components/Help.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAMhC,SAAS,SAAS;IAChB,OAAO,KAAC,IAAI,IAAC,QAAQ,kBAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAQ,CAAC;AAChD,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,KAAK,EAAqB;IAChD,OAAO,CACL,KAAC,GAAG,IAAC,YAAY,EAAE,CAAC,YAClB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,YACrB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|
package/out/ui/print.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { renderToString, Text, Box } from 'ink';
|
|
3
|
+
function p(el) {
|
|
4
|
+
// eslint-disable-next-line no-console
|
|
5
|
+
console.log(renderToString(el));
|
|
6
|
+
}
|
|
7
|
+
function pe(el) {
|
|
8
|
+
process.stderr.write(`${renderToString(el)}\n`);
|
|
9
|
+
}
|
|
10
|
+
export const ui = {
|
|
11
|
+
// Bold green with ✔ prefix
|
|
12
|
+
success: (msg) => p(_jsxs(Text, { bold: true, color: "green", children: ['✔ ', msg] })),
|
|
13
|
+
// Red rounded border box with ✖ prefix — draws maximum attention
|
|
14
|
+
error: (msg) => pe(_jsx(Box, { borderStyle: "round", borderColor: "red", paddingX: 1, children: _jsxs(Text, { color: "red", children: ['✖ ', msg] }) })),
|
|
15
|
+
// Bold yellow with ⚠ prefix
|
|
16
|
+
warn: (msg) => p(_jsxs(Text, { bold: true, color: "yellow", children: ['⚠ ', msg] })),
|
|
17
|
+
// Cyan with › prefix — uses › instead of ℹ which breaks on many terminals
|
|
18
|
+
info: (msg) => p(_jsxs(Text, { color: "cyan", children: ['› ', msg] })),
|
|
19
|
+
cyan: (msg) => p(_jsx(Text, { color: "cyan", children: msg })),
|
|
20
|
+
dim: (msg) => p(_jsx(Text, { dimColor: true, children: msg })),
|
|
21
|
+
plain: (msg) => p(_jsx(Text, { children: msg })),
|
|
22
|
+
bold: (msg) => p(_jsx(Text, { bold: true, children: msg })),
|
|
23
|
+
magenta: (msg) => p(_jsx(Text, { color: "magenta", children: msg })),
|
|
24
|
+
gray: (msg) => p(_jsx(Text, { color: "gray", children: msg })),
|
|
25
|
+
// Startup banner — bold title with cyan underline
|
|
26
|
+
banner: (title, subtitle) => p(_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { bold: true, color: "white", children: title }), subtitle !== undefined && subtitle !== '' && (_jsxs(Text, { dimColor: true, children: [' ', subtitle] }))] }), _jsx(Text, { color: "cyan", children: '─'.repeat(title.length + (subtitle ? subtitle.length + 2 : 0)) })] })),
|
|
27
|
+
// Aligned key-value label pair — for project/workspace/port display
|
|
28
|
+
label: (key, value, valueColor) => p(_jsxs(Box, { marginLeft: 2, children: [_jsx(Box, { width: 12, children: _jsx(Text, { color: "gray", children: key }) }), _jsx(Text, { color: valueColor !== null && valueColor !== void 0 ? valueColor : 'white', children: value })] })),
|
|
29
|
+
// Section title with a cyan underline separator
|
|
30
|
+
header: (title) => p(_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: "white", children: title }), _jsx(Text, { color: "cyan", children: '─'.repeat(title.length) })] })),
|
|
31
|
+
// Dim horizontal rule for visual separation
|
|
32
|
+
divider: (width = 48) => p(_jsx(Text, { dimColor: true, children: '─'.repeat(width) })),
|
|
33
|
+
// Empty line
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
blank: () => console.log(''),
|
|
36
|
+
// Composite: "✓ label value" with bold green check + optional cyan value
|
|
37
|
+
step: (check, label, value) => p(_jsxs(Text, { children: [_jsx(Text, { bold: true, color: "green", children: check }), label, value !== undefined && _jsx(Text, { color: "cyan", children: value })] })),
|
|
38
|
+
// Multi-part row with mixed colors in a single line
|
|
39
|
+
row: (parts) => p(_jsx(Text, { children: parts.map((part, i) => (_jsx(Text, { color: part.color, bold: part.bold, dimColor: part.dimColor, children: part.text }, i))) })),
|
|
40
|
+
// Returns formatted ANSI strings (for spinner text, inline template use)
|
|
41
|
+
format: {
|
|
42
|
+
success: (msg) => renderToString(_jsx(Text, { color: "green", children: msg })),
|
|
43
|
+
error: (msg) => renderToString(_jsx(Text, { color: "red", children: msg })),
|
|
44
|
+
warn: (msg) => renderToString(_jsx(Text, { color: "yellow", children: msg })),
|
|
45
|
+
info: (msg) => renderToString(_jsx(Text, { color: "cyan", children: msg })),
|
|
46
|
+
cyan: (msg) => renderToString(_jsx(Text, { color: "cyan", children: msg })),
|
|
47
|
+
dim: (msg) => renderToString(_jsx(Text, { dimColor: true, children: msg })),
|
|
48
|
+
gray: (msg) => renderToString(_jsx(Text, { color: "gray", children: msg })),
|
|
49
|
+
bold: (msg) => renderToString(_jsx(Text, { bold: true, children: msg })),
|
|
50
|
+
boldWhite: (msg) => renderToString(_jsx(Text, { bold: true, color: "white", children: msg })),
|
|
51
|
+
hex: (color) => (msg) => renderToString(_jsx(Text, { color: color, children: msg })),
|
|
52
|
+
row: (parts) => renderToString(_jsx(Text, { children: parts.map((part, i) => (_jsx(Text, { color: part.color, bold: part.bold, dimColor: part.dimColor, children: part.text }, i))) })),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
// Raw ANSI for string contexts that require a plain string (readline prompts)
|
|
56
|
+
export const ansi = {
|
|
57
|
+
cyan: (s) => `\x1b[36m${s}\x1b[0m`,
|
|
58
|
+
green: (s) => `\x1b[32m${s}\x1b[0m`,
|
|
59
|
+
dim: (s) => `\x1b[2m${s}\x1b[0m`,
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../src/ui/print.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAShD,SAAS,CAAC,CAAC,EAAsB;IAC/B,sCAAsC;IACtC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,EAAE,CAAC,EAAsB;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,2BAA2B;IAC3B,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE,CACvB,CAAC,C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AC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,YACtE,IAAI,CAAC,IAAI,IADD,CAAC,CAEL,CACR,CAAC,GACG,CACR;KACJ;CACF,CAAC;AAEF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS;IAC1C,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS;IAC3C,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS;CACzC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import
|
|
3
|
+
import { ui } from '../ui/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Searches for a UI spec file in the given directory
|
|
6
6
|
* Looks for files in this priority order:
|
|
@@ -19,8 +19,7 @@ export async function findSpecFile(searchDir = process.cwd()) {
|
|
|
19
19
|
for (const fileName of specFileNames) {
|
|
20
20
|
const filePath = path.join(searchDir, fileName);
|
|
21
21
|
if (await fs.pathExists(filePath)) {
|
|
22
|
-
|
|
23
|
-
console.log(chalk.gray(` Found spec file: ${fileName}`));
|
|
22
|
+
ui.gray(` Found spec file: ${fileName}`);
|
|
24
23
|
return filePath;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
@@ -30,11 +29,9 @@ export async function findSpecFile(searchDir = process.cwd()) {
|
|
|
30
29
|
const uiSpecFiles = files.filter(file => file.endsWith('.ui-spec.json'));
|
|
31
30
|
if (uiSpecFiles.length > 0) {
|
|
32
31
|
const filePath = path.join(searchDir, uiSpecFiles[0]);
|
|
33
|
-
|
|
34
|
-
console.log(chalk.gray(` Found spec file: ${uiSpecFiles[0]}`));
|
|
32
|
+
ui.gray(` Found spec file: ${uiSpecFiles[0]}`);
|
|
35
33
|
if (uiSpecFiles.length > 1) {
|
|
36
|
-
|
|
37
|
-
console.log(chalk.yellow(` Note: Multiple spec files found, using ${uiSpecFiles[0]}. Other files: ${uiSpecFiles.slice(1).join(', ')}`));
|
|
34
|
+
ui.warn(` Note: Multiple spec files found, using ${uiSpecFiles[0]}. Other files: ${uiSpecFiles.slice(1).join(', ')}`);
|
|
38
35
|
}
|
|
39
36
|
return filePath;
|
|
40
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specFinder.js","sourceRoot":"","sources":["../../src/ui-generator/specFinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"specFinder.js","sourceRoot":"","sources":["../../src/ui-generator/specFinder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,YAAoB,OAAO,CAAC,GAAG,EAAE;IAClE,iDAAiD;IACjD,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAEpD,2BAA2B;IAC3B,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,EAAE,CAAC,IAAI,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;YAC1C,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAED,oEAAoE;IACpE,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;QAEzE,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YACtD,EAAE,CAAC,IAAI,CAAC,sBAAsB,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAChD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,EAAE,CAAC,IAAI,CACL,4CAA4C,WAAW,CAAC,CAAC,CAAC,kBAAkB,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9G,CAAC;YACJ,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,iDAAiD;IACnD,CAAC;IAED,qBAAqB;IACrB,MAAM,IAAI,KAAK,CACb,4BAA4B,SAAS,KAAK;QACxC,mBAAmB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,iCAAiC;QAC5E,6DAA6D,CAChE,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import
|
|
3
|
+
import { ui } from '../ui/index.js';
|
|
4
4
|
export async function loadUISpec(specPath) {
|
|
5
5
|
try {
|
|
6
6
|
// Resolve the absolute path
|
|
@@ -16,8 +16,7 @@ export async function loadUISpec(specPath) {
|
|
|
16
16
|
if (!spec.appInfo || !spec.appInfo.name) {
|
|
17
17
|
throw new Error('Invalid UI spec: missing appInfo.name');
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
console.log(chalk.green(`✓ Loaded spec for: ${spec.appInfo.title || spec.appInfo.name}`));
|
|
19
|
+
ui.step('✓', ` Loaded spec for: ${spec.appInfo.title || spec.appInfo.name}`);
|
|
21
20
|
return spec;
|
|
22
21
|
}
|
|
23
22
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specLoader.js","sourceRoot":"","sources":["../../src/ui-generator/specLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"specLoader.js","sourceRoot":"","sources":["../../src/ui-generator/specLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAWpC,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,QAAgB;IAC/C,IAAI,CAAC;QACH,4BAA4B;QAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;QAE3D,uBAAuB;QACvB,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,2BAA2B,YAAY,EAAE,CAAC,CAAC;QAC7D,CAAC;QAED,+BAA+B;QAC/B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAW,CAAC;QAE3C,wCAAwC;QACxC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,C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