@openbuilder/cli 0.50.17 → 0.50.19
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/dist/chunks/{Banner-D4tqKfzA.js → Banner-ClJs6QcI.js} +3 -4
- package/dist/chunks/{Banner-D4tqKfzA.js.map → Banner-ClJs6QcI.js.map} +1 -1
- package/dist/chunks/_commonjsHelpers-DcsQGttR.js +32 -0
- package/dist/chunks/_commonjsHelpers-DcsQGttR.js.map +1 -0
- package/dist/chunks/{init-tui-BNzk_7Yx.js → init-tui-DDxZYe9B.js} +54 -55
- package/dist/chunks/{init-tui-BNzk_7Yx.js.map → init-tui-DDxZYe9B.js.map} +1 -1
- package/dist/chunks/{init-CZoN6soU.js → init-zX5aX-qn.js} +5 -6
- package/dist/chunks/{init-CZoN6soU.js.map → init-zX5aX-qn.js.map} +1 -1
- package/dist/chunks/{main-tui-CTgDJWmu.js → main-tui-B5GJ49Bp.js} +43 -44
- package/dist/chunks/{main-tui-CTgDJWmu.js.map → main-tui-B5GJ49Bp.js.map} +1 -1
- package/dist/chunks/{run-DAEiNzrf.js → run-CaSootos.js} +33 -34
- package/dist/chunks/{run-DAEiNzrf.js.map → run-CaSootos.js.map} +1 -1
- package/dist/chunks/{start-BygPCbvw.js → start-B4P27nZ7.js} +46 -47
- package/dist/chunks/{start-BygPCbvw.js.map → start-B4P27nZ7.js.map} +1 -1
- package/dist/chunks/theme-BF4W2Gwm.js +2300 -0
- package/dist/chunks/theme-BF4W2Gwm.js.map +1 -0
- package/dist/chunks/{useBuildState-CdBSu9y_.js → useBuildState-BZuezCb6.js} +33 -35
- package/dist/chunks/{useBuildState-CdBSu9y_.js.map → useBuildState-BZuezCb6.js.map} +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/instrument.js +1 -29
- package/dist/instrument.js.map +1 -1
- package/package.json +1 -2
- package/scripts/prepare-release.js +9 -0
- package/dist/chunks/theme-DhorI2Hb.js +0 -44
- package/dist/chunks/theme-DhorI2Hb.js.map +0 -1
|
@@ -3,9 +3,8 @@ import { execSync } from 'node:child_process';
|
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join, dirname } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import {
|
|
6
|
+
import { j as jsxRuntimeExports, c as colors } from './theme-BF4W2Gwm.js';
|
|
7
7
|
import { Box, Text } from 'ink';
|
|
8
|
-
import { c as colors } from './theme-DhorI2Hb.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Version and git commit info utilities
|
|
@@ -106,8 +105,8 @@ function Banner() {
|
|
|
106
105
|
{ open: '╚██████╔╝██║ ███████╗██║ ╚████║', builder: '██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║' },
|
|
107
106
|
{ open: ' ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝', builder: '╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝' },
|
|
108
107
|
];
|
|
109
|
-
return (jsx(Box, { flexDirection: "column", alignItems: "center", children: lines.map((line, index) => (jsxs(Box, { children: [jsx(Text, { color: colors.cyan, children: line.open }), jsx(Text, { color: colors.brightPurple, children: line.builder })] }, index))) }));
|
|
108
|
+
return (jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "center", children: lines.map((line, index) => (jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: line.open }), jsxRuntimeExports.jsx(Text, { color: colors.brightPurple, children: line.builder })] }, index))) }));
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
export { Banner as B, getVersionInfo as g };
|
|
113
|
-
//# sourceMappingURL=Banner-
|
|
112
|
+
//# sourceMappingURL=Banner-ClJs6QcI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner-
|
|
1
|
+
{"version":3,"file":"Banner-ClJs6QcI.js","sources":["../../src/cli/utils/version-info.ts","../../src/cli/tui/components/Banner.tsx"],"sourcesContent":["/**\n * Version and git commit info utilities\n */\n\nimport { execSync } from 'node:child_process';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Find the package root directory (apps/runner).\n * Works in both development (src/cli/utils/) and production (dist/cli/utils/) modes.\n */\nfunction findPackageRoot(): string {\n // Try multiple possible locations\n const possiblePaths = [\n // Development: src/cli/utils/ -> apps/runner (3 levels up)\n join(__dirname, '..', '..', '..'),\n // Production from dist/cli/utils/: -> apps/runner (3 levels up, same structure)\n join(__dirname, '..', '..', '..'),\n ];\n \n for (const path of possiblePaths) {\n const packageJsonPath = join(path, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n // Verify this is the runner package\n if (pkg.name === '@openbuilder/cli') {\n return path;\n }\n } catch {\n // Continue to next path\n }\n }\n }\n \n // Fallback to the standard path\n return join(__dirname, '..', '..', '..');\n}\n\n// Cache the package root\nconst packageRoot = findPackageRoot();\n\n/**\n * Get the package version from package.json\n */\nexport function getPackageVersion(): string {\n try {\n const packageJsonPath = join(packageRoot, 'package.json');\n if (existsSync(packageJsonPath)) {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n return packageJson.version || '0.0.0';\n }\n } catch {\n // Ignore errors\n }\n return '0.0.0';\n}\n\n/**\n * Get the short git commit hash\n */\nexport function getGitCommit(): string | null {\n try {\n // Try to get commit from git command\n const commit = execSync('git rev-parse --short HEAD', {\n cwd: packageRoot,\n encoding: 'utf-8',\n stdio: ['pipe', 'pipe', 'pipe'],\n }).trim();\n return commit || null;\n } catch {\n // Git not available or not a git repo\n return null;\n }\n}\n\n/**\n * Get combined version string with commit\n * Returns \"v0.19.1 (abc1234)\" or just \"v0.19.1\" if no commit\n */\nexport function getVersionString(): string {\n const version = getPackageVersion();\n const commit = getGitCommit();\n \n if (commit) {\n return `v${version} (${commit})`;\n }\n return `v${version}`;\n}\n\n/**\n * Version info object\n */\nexport interface VersionInfo {\n version: string;\n commit: string | null;\n display: string;\n}\n\n/**\n * Get all version info\n */\nexport function getVersionInfo(): VersionInfo {\n const version = getPackageVersion();\n const commit = getGitCommit();\n \n return {\n version,\n commit,\n display: commit ? `v${version} (${commit})` : `v${version}`,\n };\n}\n","import { Box, Text } from 'ink';\nimport { colors } from '../theme.js';\n\n/**\n * ASCII art banner component - centered with cyan/purple gradient\n * Each line is padded to exactly the same width for perfect alignment\n */\nexport function Banner() {\n // Full banner lines - OPEN in cyan, BUILDER in purple\n // All lines padded to same total width for consistent centering\n const lines = [\n { open: ' ██████╗ ██████╗ ███████╗███╗ ██╗', builder: '██████╗ ██╗ ██╗██╗██╗ ██████╗ ███████╗██████╗ ' },\n { open: '██╔═══██╗██╔══██╗██╔════╝████╗ ██║', builder: '██╔══██╗██║ ██║██║██║ ██╔══██╗██╔════╝██╔══██╗' },\n { open: '██║ ██║██████╔╝█████╗ ██╔██╗ ██║', builder: '██████╔╝██║ ██║██║██║ ██║ ██║█████╗ ██████╔╝' },\n { open: '██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║', builder: '██╔══██╗██║ ██║██║██║ ██║ ██║██╔══╝ ██╔══██╗' },\n { open: '╚██████╔╝██║ ███████╗██║ ╚████║', builder: '██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║' },\n { open: ' ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝', builder: '╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝' },\n ];\n\n return (\n <Box flexDirection=\"column\" alignItems=\"center\">\n {lines.map((line, index) => (\n <Box key={index}>\n <Text color={colors.cyan}>{line.open}</Text>\n <Text color={colors.brightPurple}>{line.builder}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n"],"names":["__filename","__dirname","_jsx","_jsxs"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// OpenBuilder CLI - Built with Rollup
|
|
2
|
+
function getDefaultExportFromCjs (x) {
|
|
3
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function getAugmentedNamespace(n) {
|
|
7
|
+
if (n.__esModule) return n;
|
|
8
|
+
var f = n.default;
|
|
9
|
+
if (typeof f == "function") {
|
|
10
|
+
var a = function a () {
|
|
11
|
+
if (this instanceof a) {
|
|
12
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
13
|
+
}
|
|
14
|
+
return f.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
a.prototype = f.prototype;
|
|
17
|
+
} else a = {};
|
|
18
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
19
|
+
Object.keys(n).forEach(function (k) {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
21
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return n[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return a;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { getDefaultExportFromCjs as a, getAugmentedNamespace as g };
|
|
32
|
+
//# sourceMappingURL=_commonjsHelpers-DcsQGttR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers-DcsQGttR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,11 +3,9 @@ import { mkdir, writeFile } from 'node:fs/promises';
|
|
|
3
3
|
import { existsSync, rmSync, realpathSync } from 'node:fs';
|
|
4
4
|
import { join, resolve } from 'node:path';
|
|
5
5
|
import { randomBytes } from 'node:crypto';
|
|
6
|
-
import {
|
|
7
|
-
import { Fragment, useState, useRef, useEffect, useCallback } from 'react';
|
|
6
|
+
import { j as jsxRuntimeExports, r as reactExports, s as symbols, c as colors, l as layout } from './theme-BF4W2Gwm.js';
|
|
8
7
|
import { Box, Text, useApp, useStdout, useInput, render } from 'ink';
|
|
9
|
-
import { g as getVersionInfo, B as Banner } from './Banner-
|
|
10
|
-
import { s as symbols, c as colors, l as layout } from './theme-DhorI2Hb.js';
|
|
8
|
+
import { g as getVersionInfo, B as Banner } from './Banner-ClJs6QcI.js';
|
|
11
9
|
import 'ink-text-input';
|
|
12
10
|
import 'node:events';
|
|
13
11
|
import 'chalk';
|
|
@@ -16,6 +14,7 @@ import { i as isInsideMonorepo } from './repo-detector-B_oj696o.js';
|
|
|
16
14
|
import { isPnpmInstalled, cloneRepository, installDependencies, buildAgentCore } from './repo-cloner-CpOQjFSo.js';
|
|
17
15
|
import { p as pushDatabaseSchema, s as setupDatabase } from './database-setup-BYjIRAmT.js';
|
|
18
16
|
import { C as CLIError } from './cli-error-BjQwvWtK.js';
|
|
17
|
+
import './_commonjsHelpers-DcsQGttR.js';
|
|
19
18
|
import 'node:child_process';
|
|
20
19
|
import 'node:url';
|
|
21
20
|
import 'conf';
|
|
@@ -59,7 +58,7 @@ function ProgressStepper({ steps }) {
|
|
|
59
58
|
// Cell and connector sizing
|
|
60
59
|
const cellWidth = 10;
|
|
61
60
|
const connectorWidth = 7;
|
|
62
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsx(Box, { children: steps.map((step, index) => (jsxs(Fragment, { children: [jsx(Box, { width: cellWidth, justifyContent: "center", children: jsx(Text, { color: getStepColor(step.status), children: getStepSymbol(step.status) }) }), index < steps.length - 1 && (jsx(Text, { color: colors.dimGray, children: symbols.horizontalLine.repeat(connectorWidth) }))] }, step.id))) }), jsx(Box, { children: steps.map((step, index) => (jsxs(Fragment, { children: [jsx(Box, { width: cellWidth, justifyContent: "center", children: jsx(Text, { color: step.status === 'pending' ? colors.dimGray : colors.gray, dimColor: step.status === 'pending', children: step.label }) }), index < steps.length - 1 && (jsx(Box, { width: connectorWidth }))] }, step.id))) })] }));
|
|
61
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsxRuntimeExports.jsx(Box, { children: steps.map((step, index) => (jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [jsxRuntimeExports.jsx(Box, { width: cellWidth, justifyContent: "center", children: jsxRuntimeExports.jsx(Text, { color: getStepColor(step.status), children: getStepSymbol(step.status) }) }), index < steps.length - 1 && (jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: symbols.horizontalLine.repeat(connectorWidth) }))] }, step.id))) }), jsxRuntimeExports.jsx(Box, { children: steps.map((step, index) => (jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [jsxRuntimeExports.jsx(Box, { width: cellWidth, justifyContent: "center", children: jsxRuntimeExports.jsx(Text, { color: step.status === 'pending' ? colors.dimGray : colors.gray, dimColor: step.status === 'pending', children: step.label }) }), index < steps.length - 1 && (jsxRuntimeExports.jsx(Box, { width: connectorWidth }))] }, step.id))) })] }));
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
// Match the stepper width: cellWidth(10) * 4 + connectorWidth(7) * 3 = 61
|
|
@@ -74,13 +73,13 @@ const BOX_INNER_WIDTH = BOX_WIDTH - 4; // Account for "│ " and " │"
|
|
|
74
73
|
* └───────────────────────────────────────────────────────────┘
|
|
75
74
|
*/
|
|
76
75
|
function TaskStream({ stepId, tasks, onTypewriterComplete }) {
|
|
77
|
-
const [spinnerIndex, setSpinnerIndex] = useState(0);
|
|
78
|
-
const [cursorVisible, setCursorVisible] = useState(true);
|
|
79
|
-
const [typedChars, setTypedChars] = useState({});
|
|
80
|
-
const [completedTyping, setCompletedTyping] = useState(new Set());
|
|
81
|
-
const prevStepRef = useRef(stepId);
|
|
76
|
+
const [spinnerIndex, setSpinnerIndex] = reactExports.useState(0);
|
|
77
|
+
const [cursorVisible, setCursorVisible] = reactExports.useState(true);
|
|
78
|
+
const [typedChars, setTypedChars] = reactExports.useState({});
|
|
79
|
+
const [completedTyping, setCompletedTyping] = reactExports.useState(new Set());
|
|
80
|
+
const prevStepRef = reactExports.useRef(stepId);
|
|
82
81
|
// Reset typed chars when step changes
|
|
83
|
-
useEffect(() => {
|
|
82
|
+
reactExports.useEffect(() => {
|
|
84
83
|
if (stepId !== prevStepRef.current) {
|
|
85
84
|
setTypedChars({});
|
|
86
85
|
setCompletedTyping(new Set());
|
|
@@ -88,7 +87,7 @@ function TaskStream({ stepId, tasks, onTypewriterComplete }) {
|
|
|
88
87
|
}
|
|
89
88
|
}, [stepId]);
|
|
90
89
|
// Spinner animation - runs independently
|
|
91
|
-
useEffect(() => {
|
|
90
|
+
reactExports.useEffect(() => {
|
|
92
91
|
let mounted = true;
|
|
93
92
|
const animate = () => {
|
|
94
93
|
if (!mounted)
|
|
@@ -103,7 +102,7 @@ function TaskStream({ stepId, tasks, onTypewriterComplete }) {
|
|
|
103
102
|
};
|
|
104
103
|
}, []);
|
|
105
104
|
// Cursor blink - runs independently
|
|
106
|
-
useEffect(() => {
|
|
105
|
+
reactExports.useEffect(() => {
|
|
107
106
|
let mounted = true;
|
|
108
107
|
const blink = () => {
|
|
109
108
|
if (!mounted)
|
|
@@ -209,7 +208,7 @@ function TaskStream({ stepId, tasks, onTypewriterComplete }) {
|
|
|
209
208
|
const errorToType = primaryTask?.error && primaryTask.status === 'failed' ? primaryTask.error : null;
|
|
210
209
|
const textToType = errorToType;
|
|
211
210
|
const typeId = errorToType ? `error-${primaryTask?.id}` : null;
|
|
212
|
-
useEffect(() => {
|
|
211
|
+
reactExports.useEffect(() => {
|
|
213
212
|
if (!typeId || !textToType)
|
|
214
213
|
return;
|
|
215
214
|
const currentChars = typedChars[typeId] || 0;
|
|
@@ -233,15 +232,15 @@ function TaskStream({ stepId, tasks, onTypewriterComplete }) {
|
|
|
233
232
|
}, [typeId, textToType, typedChars[typeId || ''], completedTyping, onTypewriterComplete, primaryTask]);
|
|
234
233
|
// Empty state - show empty box to maintain layout
|
|
235
234
|
if (lines.length === 0) {
|
|
236
|
-
return (jsx(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: jsxs(Box, { flexDirection: "column", width: BOX_WIDTH, children: [jsxs(Text, { color: colors.dimGray, children: ["\u250C", '─'.repeat(BOX_WIDTH - 2), "\u2510"] }), jsxs(Box, { children: [jsx(Text, { color: colors.dimGray, children: "\u2502" }), jsx(Text, { children: ' '.repeat(BOX_WIDTH - 2) }), jsx(Text, { color: colors.dimGray, children: "\u2502" })] }), jsxs(Text, { color: colors.dimGray, children: ["\u2514", '─'.repeat(BOX_WIDTH - 2), "\u2518"] })] }) }));
|
|
235
|
+
return (jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: jsxRuntimeExports.jsxs(Box, { flexDirection: "column", width: BOX_WIDTH, children: [jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["\u250C", '─'.repeat(BOX_WIDTH - 2), "\u2510"] }), jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "\u2502" }), jsxRuntimeExports.jsx(Text, { children: ' '.repeat(BOX_WIDTH - 2) }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "\u2502" })] }), jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["\u2514", '─'.repeat(BOX_WIDTH - 2), "\u2518"] })] }) }));
|
|
237
236
|
}
|
|
238
|
-
return (jsx(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: jsxs(Box, { flexDirection: "column", width: BOX_WIDTH, children: [jsxs(Text, { color: colors.dimGray, children: ["\u250C", '─'.repeat(BOX_WIDTH - 2), "\u2510"] }), lines.map(line => {
|
|
237
|
+
return (jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: jsxRuntimeExports.jsxs(Box, { flexDirection: "column", width: BOX_WIDTH, children: [jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["\u250C", '─'.repeat(BOX_WIDTH - 2), "\u2510"] }), lines.map(line => {
|
|
239
238
|
const checkmarkStr = line.checkmark ? `${symbols.check} ` : '';
|
|
240
239
|
const content = `${line.prefix}${checkmarkStr}${line.displayedText}`;
|
|
241
240
|
const cursor = line.showCursor ? '▌' : '';
|
|
242
241
|
const paddingNeeded = Math.max(0, BOX_INNER_WIDTH - content.length - cursor.length);
|
|
243
|
-
return (jsxs(Box, { children: [jsx(Text, { color: colors.dimGray, children: "\u2502 " }), jsx(Text, { color: line.prefixColor, children: line.prefix }), line.checkmark && jsxs(Text, { color: colors.success, children: [symbols.check, " "] }), jsx(Text, { color: line.color, children: line.displayedText }), line.showCursor && jsx(Text, { color: colors.cyan, children: "\u258C" }), jsx(Text, { children: ' '.repeat(paddingNeeded) }), jsx(Text, { color: colors.dimGray, children: " \u2502" })] }, line.id));
|
|
244
|
-
}), jsxs(Text, { color: colors.dimGray, children: ["\u2514", '─'.repeat(BOX_WIDTH - 2), "\u2518"] })] }) }));
|
|
242
|
+
return (jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "\u2502 " }), jsxRuntimeExports.jsx(Text, { color: line.prefixColor, children: line.prefix }), line.checkmark && jsxRuntimeExports.jsxs(Text, { color: colors.success, children: [symbols.check, " "] }), jsxRuntimeExports.jsx(Text, { color: line.color, children: line.displayedText }), line.showCursor && jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: "\u258C" }), jsxRuntimeExports.jsx(Text, { children: ' '.repeat(paddingNeeded) }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: " \u2502" })] }, line.id));
|
|
243
|
+
}), jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["\u2514", '─'.repeat(BOX_WIDTH - 2), "\u2518"] })] }) }));
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
/**
|
|
@@ -257,13 +256,13 @@ function ConfigSummary({ items, title }) {
|
|
|
257
256
|
const divider = symbols.horizontalLine.repeat(dividerWidth);
|
|
258
257
|
// Find the longest label for alignment
|
|
259
258
|
const maxLabelLength = Math.max(...items.map(item => item.label.length));
|
|
260
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsx(Text, { color: colors.dimGray, children: divider }), title && (jsx(Box, { marginTop: 1, marginBottom: 1, children: jsx(Text, { color: colors.white, bold: true, children: title }) })), jsx(Box, { flexDirection: "column", alignItems: "flex-start", marginTop: title ? 0 : 1, children: items.map((item, index) => (jsxs(Box, { children: [jsx(Text, { color: colors.gray, children: item.label.padEnd(maxLabelLength + 3) }), jsx(Text, { color: colors.cyan, children: item.value })] }, index))) }), jsx(Box, { marginTop: 1, children: jsx(Text, { color: colors.dimGray, children: divider }) })] }));
|
|
259
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }), title && (jsxRuntimeExports.jsx(Box, { marginTop: 1, marginBottom: 1, children: jsxRuntimeExports.jsx(Text, { color: colors.white, bold: true, children: title }) })), jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "flex-start", marginTop: title ? 0 : 1, children: items.map((item, index) => (jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.gray, children: item.label.padEnd(maxLabelLength + 3) }), jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: item.value })] }, index))) }), jsxRuntimeExports.jsx(Box, { marginTop: 1, children: jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }) })] }));
|
|
261
260
|
}
|
|
262
261
|
/**
|
|
263
262
|
* Next steps display for completion screen
|
|
264
263
|
*/
|
|
265
264
|
function NextSteps({ command, url }) {
|
|
266
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: [jsxs(Box, { children: [jsx(Text, { color: colors.gray, children: "Run: " }), jsx(Text, { color: colors.cyan, bold: true, children: command })] }), jsxs(Box, { children: [jsx(Text, { color: colors.gray, children: "Open: " }), jsx(Text, { color: colors.cyan, children: url })] })] }));
|
|
265
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", marginTop: 1, children: [jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.gray, children: "Run: " }), jsxRuntimeExports.jsx(Text, { color: colors.cyan, bold: true, children: command })] }), jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.gray, children: "Open: " }), jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: url })] })] }));
|
|
267
266
|
}
|
|
268
267
|
/**
|
|
269
268
|
* Error display with message and recovery suggestions
|
|
@@ -271,7 +270,7 @@ function NextSteps({ command, url }) {
|
|
|
271
270
|
function ErrorSummary({ message, suggestions }) {
|
|
272
271
|
const dividerWidth = 44;
|
|
273
272
|
const divider = symbols.horizontalLine.repeat(dividerWidth);
|
|
274
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsx(Text, { color: colors.dimGray, children: divider }), message && (jsx(Box, { marginTop: 1, marginBottom: 1, children: jsxs(Text, { color: colors.error, bold: true, children: [symbols.cross, " ", message] }) })), jsx(Box, { flexDirection: "column", alignItems: "flex-start", marginTop: message ? 0 : 1, children: suggestions.map((suggestion, index) => (jsx(Box, { children: jsx(Text, { color: suggestion.startsWith(' ') ? colors.cyan : colors.gray, children: suggestion }) }, index))) }), jsx(Box, { marginTop: 1, children: jsx(Text, { color: colors.dimGray, children: divider }) })] }));
|
|
273
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }), message && (jsxRuntimeExports.jsx(Box, { marginTop: 1, marginBottom: 1, children: jsxRuntimeExports.jsxs(Text, { color: colors.error, bold: true, children: [symbols.cross, " ", message] }) })), jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "flex-start", marginTop: message ? 0 : 1, children: suggestions.map((suggestion, index) => (jsxRuntimeExports.jsx(Box, { children: jsxRuntimeExports.jsx(Text, { color: suggestion.startsWith(' ') ? colors.cyan : colors.gray, children: suggestion }) }, index))) }), jsxRuntimeExports.jsx(Box, { marginTop: 1, children: jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }) })] }));
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
/**
|
|
@@ -282,8 +281,8 @@ function BuildErrorView({ title, errorLines, suggestions = [], onExit }) {
|
|
|
282
281
|
const { exit } = useApp();
|
|
283
282
|
const { stdout } = useStdout();
|
|
284
283
|
const terminalWidth = stdout?.columns || 80;
|
|
285
|
-
const [scrollOffset, setScrollOffset] = useState(0);
|
|
286
|
-
const [showCopiedMessage, setShowCopiedMessage] = useState(false);
|
|
284
|
+
const [scrollOffset, setScrollOffset] = reactExports.useState(0);
|
|
285
|
+
const [showCopiedMessage, setShowCopiedMessage] = reactExports.useState(false);
|
|
287
286
|
// Fixed dimensions for compact view
|
|
288
287
|
const boxWidth = Math.min(70, Math.floor(terminalWidth * 0.6));
|
|
289
288
|
const maxVisibleLines = 12; // Show 12 lines of errors max
|
|
@@ -292,7 +291,7 @@ function BuildErrorView({ title, errorLines, suggestions = [], onExit }) {
|
|
|
292
291
|
// Get visible lines
|
|
293
292
|
const visibleLines = errorLines.slice(scrollOffset, scrollOffset + maxVisibleLines);
|
|
294
293
|
// Copy all error content to clipboard
|
|
295
|
-
const copyToClipboard = useCallback(async () => {
|
|
294
|
+
const copyToClipboard = reactExports.useCallback(async () => {
|
|
296
295
|
const content = [
|
|
297
296
|
`Build Error: ${title}`,
|
|
298
297
|
'─'.repeat(60),
|
|
@@ -376,12 +375,12 @@ function BuildErrorView({ title, errorLines, suggestions = [], onExit }) {
|
|
|
376
375
|
};
|
|
377
376
|
const divider = symbols.horizontalLine.repeat(boxWidth - 2);
|
|
378
377
|
const hasScroll = errorLines.length > maxVisibleLines;
|
|
379
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", width: "100%", children: [jsx(Text, { color: colors.dimGray, children: divider }), jsx(Box, { marginTop: 1, marginBottom: 1, width: boxWidth, justifyContent: "center", children: jsxs(Text, { color: colors.error, bold: true, children: [symbols.cross, " ", title] }) }), jsxs(Box, { flexDirection: "column", width: boxWidth, borderStyle: "round", borderColor: colors.error, paddingX: 1, paddingY: 0, children: [hasScroll && (jsx(Box, { justifyContent: "flex-end", marginBottom: 0, children: jsxs(Text, { color: colors.dimGray, dimColor: true, children: ["[", scrollOffset + 1, "-", Math.min(scrollOffset + maxVisibleLines, errorLines.length), "/", errorLines.length, "] \u2191\u2193"] }) })), visibleLines.length > 0 ? (visibleLines.map((line, index) => {
|
|
378
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", width: "100%", children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }), jsxRuntimeExports.jsx(Box, { marginTop: 1, marginBottom: 1, width: boxWidth, justifyContent: "center", children: jsxRuntimeExports.jsxs(Text, { color: colors.error, bold: true, children: [symbols.cross, " ", title] }) }), jsxRuntimeExports.jsxs(Box, { flexDirection: "column", width: boxWidth, borderStyle: "round", borderColor: colors.error, paddingX: 1, paddingY: 0, children: [hasScroll && (jsxRuntimeExports.jsx(Box, { justifyContent: "flex-end", marginBottom: 0, children: jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, dimColor: true, children: ["[", scrollOffset + 1, "-", Math.min(scrollOffset + maxVisibleLines, errorLines.length), "/", errorLines.length, "] \u2191\u2193"] }) })), visibleLines.length > 0 ? (visibleLines.map((line, index) => {
|
|
380
379
|
const truncatedLine = line.length > boxWidth - 4
|
|
381
380
|
? line.substring(0, boxWidth - 7) + '...'
|
|
382
381
|
: line;
|
|
383
|
-
return (jsx(Text, { color: getLineColor(line), wrap: "truncate", children: truncatedLine }, index));
|
|
384
|
-
})) : (jsx(Text, { color: colors.dimGray, children: "No error details captured" }))] }), suggestions.length > 0 && (jsx(Box, { flexDirection: "column", marginTop: 1, width: boxWidth, children: suggestions.map((suggestion, index) => (jsx(Text, { color: suggestion.startsWith(' ') ? colors.cyan : colors.gray, children: suggestion }, index))) })), jsx(Box, { marginTop: 1, children: jsx(Text, { color: colors.dimGray, children: divider }) }), jsx(Box, { marginTop: 1, justifyContent: "center", children: showCopiedMessage ? (jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " Copied to clipboard! Exiting..."] })) : (jsxs(Box, { children: [jsx(Text, { color: colors.dimGray, children: "[" }), jsx(Text, { color: colors.success, bold: true, children: "c" }), jsx(Text, { color: colors.dimGray, children: "]" }), jsx(Text, { color: colors.success, children: "copy & exit" }), jsx(Text, { children: " " }), jsx(Text, { color: colors.dimGray, children: "[" }), jsx(Text, { color: colors.cyan, children: "q" }), jsx(Text, { color: colors.dimGray, children: "]" }), jsx(Text, { color: colors.gray, children: "quit" }), hasScroll && (jsxs(Fragment
|
|
382
|
+
return (jsxRuntimeExports.jsx(Text, { color: getLineColor(line), wrap: "truncate", children: truncatedLine }, index));
|
|
383
|
+
})) : (jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "No error details captured" }))] }), suggestions.length > 0 && (jsxRuntimeExports.jsx(Box, { flexDirection: "column", marginTop: 1, width: boxWidth, children: suggestions.map((suggestion, index) => (jsxRuntimeExports.jsx(Text, { color: suggestion.startsWith(' ') ? colors.cyan : colors.gray, children: suggestion }, index))) })), jsxRuntimeExports.jsx(Box, { marginTop: 1, children: jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: divider }) }), jsxRuntimeExports.jsx(Box, { marginTop: 1, justifyContent: "center", children: showCopiedMessage ? (jsxRuntimeExports.jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " Copied to clipboard! Exiting..."] })) : (jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "[" }), jsxRuntimeExports.jsx(Text, { color: colors.success, bold: true, children: "c" }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "]" }), jsxRuntimeExports.jsx(Text, { color: colors.success, children: "copy & exit" }), jsxRuntimeExports.jsx(Text, { children: " " }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "[" }), jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: "q" }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "]" }), jsxRuntimeExports.jsx(Text, { color: colors.gray, children: "quit" }), hasScroll && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Text, { children: " " }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "[" }), jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: "\u2191\u2193" }), jsxRuntimeExports.jsx(Text, { color: colors.dimGray, children: "]" }), jsxRuntimeExports.jsx(Text, { color: colors.gray, children: "scroll" })] }))] })) })] }));
|
|
385
384
|
}
|
|
386
385
|
|
|
387
386
|
const INITIAL_STEPS = [
|
|
@@ -400,7 +399,7 @@ const INITIAL_TASKS = [
|
|
|
400
399
|
{ id: 'services', label: 'Building services', status: 'pending', stepId: 'ready' },
|
|
401
400
|
];
|
|
402
401
|
function useInitFlow() {
|
|
403
|
-
const [state, setState] = useState({
|
|
402
|
+
const [state, setState] = reactExports.useState({
|
|
404
403
|
phase: 'repo',
|
|
405
404
|
steps: INITIAL_STEPS,
|
|
406
405
|
tasks: INITIAL_TASKS,
|
|
@@ -409,67 +408,67 @@ function useInitFlow() {
|
|
|
409
408
|
isComplete: false,
|
|
410
409
|
});
|
|
411
410
|
// Step management
|
|
412
|
-
const setStepStatus = useCallback((stepId, status) => {
|
|
411
|
+
const setStepStatus = reactExports.useCallback((stepId, status) => {
|
|
413
412
|
setState(prev => ({
|
|
414
413
|
...prev,
|
|
415
414
|
steps: prev.steps.map(step => step.id === stepId ? { ...step, status } : step),
|
|
416
415
|
}));
|
|
417
416
|
}, []);
|
|
418
|
-
const activateStep = useCallback((stepId) => {
|
|
417
|
+
const activateStep = reactExports.useCallback((stepId) => {
|
|
419
418
|
setState(prev => ({
|
|
420
419
|
...prev,
|
|
421
420
|
phase: stepId,
|
|
422
421
|
steps: prev.steps.map(step => step.id === stepId ? { ...step, status: 'active' } : step),
|
|
423
422
|
}));
|
|
424
423
|
}, []);
|
|
425
|
-
const completeStep = useCallback((stepId) => {
|
|
424
|
+
const completeStep = reactExports.useCallback((stepId) => {
|
|
426
425
|
setStepStatus(stepId, 'completed');
|
|
427
426
|
}, [setStepStatus]);
|
|
428
|
-
const failStep = useCallback((stepId) => {
|
|
427
|
+
const failStep = reactExports.useCallback((stepId) => {
|
|
429
428
|
setStepStatus(stepId, 'error');
|
|
430
429
|
}, [setStepStatus]);
|
|
431
430
|
// Task management
|
|
432
|
-
const setTaskStatus = useCallback((taskId, status, detail) => {
|
|
431
|
+
const setTaskStatus = reactExports.useCallback((taskId, status, detail) => {
|
|
433
432
|
setState(prev => ({
|
|
434
433
|
...prev,
|
|
435
434
|
tasks: prev.tasks.map(task => task.id === taskId ? { ...task, status, detail: detail ?? task.detail } : task),
|
|
436
435
|
}));
|
|
437
436
|
}, []);
|
|
438
|
-
const startTask = useCallback((taskId, detail) => {
|
|
437
|
+
const startTask = reactExports.useCallback((taskId, detail) => {
|
|
439
438
|
setTaskStatus(taskId, 'running', detail);
|
|
440
439
|
}, [setTaskStatus]);
|
|
441
|
-
const completeTask = useCallback((taskId) => {
|
|
440
|
+
const completeTask = reactExports.useCallback((taskId) => {
|
|
442
441
|
setTaskStatus(taskId, 'completed');
|
|
443
442
|
}, [setTaskStatus]);
|
|
444
|
-
const failTask = useCallback((taskId, error) => {
|
|
443
|
+
const failTask = reactExports.useCallback((taskId, error) => {
|
|
445
444
|
setState(prev => ({
|
|
446
445
|
...prev,
|
|
447
446
|
tasks: prev.tasks.map(task => task.id === taskId ? { ...task, status: 'failed', error } : task),
|
|
448
447
|
}));
|
|
449
448
|
}, []);
|
|
450
449
|
// Get tasks for a specific step
|
|
451
|
-
const getTasksForStep = useCallback((stepId) => {
|
|
450
|
+
const getTasksForStep = reactExports.useCallback((stepId) => {
|
|
452
451
|
return state.tasks.filter(task => task.stepId === stepId);
|
|
453
452
|
}, [state.tasks]);
|
|
454
453
|
// Get tasks for the currently active step
|
|
455
|
-
const getActiveStepTasks = useCallback(() => {
|
|
454
|
+
const getActiveStepTasks = reactExports.useCallback(() => {
|
|
456
455
|
return state.tasks.filter(task => task.stepId === state.phase);
|
|
457
456
|
}, [state.tasks, state.phase]);
|
|
458
457
|
// Config management
|
|
459
|
-
const setConfig = useCallback((items) => {
|
|
458
|
+
const setConfig = reactExports.useCallback((items) => {
|
|
460
459
|
setState(prev => ({
|
|
461
460
|
...prev,
|
|
462
461
|
config: items,
|
|
463
462
|
}));
|
|
464
463
|
}, []);
|
|
465
464
|
// Error management
|
|
466
|
-
const setError = useCallback((message, suggestions) => {
|
|
465
|
+
const setError = reactExports.useCallback((message, suggestions) => {
|
|
467
466
|
setState(prev => ({
|
|
468
467
|
...prev,
|
|
469
468
|
error: { message, suggestions },
|
|
470
469
|
}));
|
|
471
470
|
}, []);
|
|
472
|
-
const setBuildError = useCallback((message, errorLines, suggestions) => {
|
|
471
|
+
const setBuildError = reactExports.useCallback((message, errorLines, suggestions) => {
|
|
473
472
|
setState(prev => ({
|
|
474
473
|
...prev,
|
|
475
474
|
error: {
|
|
@@ -482,14 +481,14 @@ function useInitFlow() {
|
|
|
482
481
|
},
|
|
483
482
|
}));
|
|
484
483
|
}, []);
|
|
485
|
-
const clearError = useCallback(() => {
|
|
484
|
+
const clearError = reactExports.useCallback(() => {
|
|
486
485
|
setState(prev => ({
|
|
487
486
|
...prev,
|
|
488
487
|
error: null,
|
|
489
488
|
}));
|
|
490
489
|
}, []);
|
|
491
490
|
// Completion
|
|
492
|
-
const markComplete = useCallback(() => {
|
|
491
|
+
const markComplete = reactExports.useCallback(() => {
|
|
493
492
|
setState(prev => ({
|
|
494
493
|
...prev,
|
|
495
494
|
isComplete: true,
|
|
@@ -498,7 +497,7 @@ function useInitFlow() {
|
|
|
498
497
|
}));
|
|
499
498
|
}, []);
|
|
500
499
|
// Reset
|
|
501
|
-
const reset = useCallback(() => {
|
|
500
|
+
const reset = reactExports.useCallback(() => {
|
|
502
501
|
setState({
|
|
503
502
|
phase: 'repo',
|
|
504
503
|
steps: INITIAL_STEPS,
|
|
@@ -537,7 +536,7 @@ function InitScreen({ onInit, onComplete, onError }) {
|
|
|
537
536
|
const { exit } = useApp();
|
|
538
537
|
const { stdout } = useStdout();
|
|
539
538
|
const flow = useInitFlow();
|
|
540
|
-
const [finalConfig, setFinalConfig] = useState(null);
|
|
539
|
+
const [finalConfig, setFinalConfig] = reactExports.useState(null);
|
|
541
540
|
// Get version info
|
|
542
541
|
const versionInfo = getVersionInfo();
|
|
543
542
|
// Calculate vertical centering
|
|
@@ -545,7 +544,7 @@ function InitScreen({ onInit, onComplete, onError }) {
|
|
|
545
544
|
const contentHeight = 20;
|
|
546
545
|
const topPadding = Math.max(0, Math.floor((terminalHeight - contentHeight) / 3));
|
|
547
546
|
// Run init flow
|
|
548
|
-
useEffect(() => {
|
|
547
|
+
reactExports.useEffect(() => {
|
|
549
548
|
const callbacks = {
|
|
550
549
|
activateStep: flow.activateStep,
|
|
551
550
|
completeStep: flow.completeStep,
|
|
@@ -595,7 +594,7 @@ function InitScreen({ onInit, onComplete, onError }) {
|
|
|
595
594
|
detail: task.detail,
|
|
596
595
|
error: task.error,
|
|
597
596
|
}));
|
|
598
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", paddingTop: topPadding, children: [jsx(Banner, {}), jsx(Box, { marginTop: 1, children: jsx(Text, { color: colors.gray, dimColor: true, children: versionInfo.display }) }), jsx(Box, { marginTop: 1 }), jsx(ProgressStepper, { steps: state.steps }), !state.isComplete && !state.error && (jsx(TaskStream, { stepId: state.phase, tasks: currentStepTasks })), state.error && state.error.buildError && (jsx(BuildErrorView, { title: state.error.message, errorLines: state.error.buildError.errorLines, suggestions: state.error.buildError.suggestions, onExit: () => exit() })), state.error && !state.error.buildError && (jsx(Box, { marginTop: 2, children: jsx(ErrorSummary, { message: state.error.message, suggestions: state.error.suggestions }) })), state.isComplete && !state.error && (jsxs(Box, { marginTop: 2, flexDirection: "column", alignItems: "center", children: [jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " Setup complete!"] }), jsx(Box, { marginTop: 1, flexDirection: "column", children: state.tasks.filter(t => t.status === 'completed').map(task => (jsxs(Box, { children: [jsx(Text, { color: colors.success, children: symbols.check }), jsxs(Text, { color: colors.gray, children: [" ", task.label] })] }, task.id))) }), jsx(Box, { marginTop: 1 }), jsx(ConfigSummary, { items: state.config }), jsx(NextSteps, { command: "openbuilder run", url: "http://localhost:3000" })] }))] }));
|
|
597
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", paddingTop: topPadding, children: [jsxRuntimeExports.jsx(Banner, {}), jsxRuntimeExports.jsx(Box, { marginTop: 1, children: jsxRuntimeExports.jsx(Text, { color: colors.gray, dimColor: true, children: versionInfo.display }) }), jsxRuntimeExports.jsx(Box, { marginTop: 1 }), jsxRuntimeExports.jsx(ProgressStepper, { steps: state.steps }), !state.isComplete && !state.error && (jsxRuntimeExports.jsx(TaskStream, { stepId: state.phase, tasks: currentStepTasks })), state.error && state.error.buildError && (jsxRuntimeExports.jsx(BuildErrorView, { title: state.error.message, errorLines: state.error.buildError.errorLines, suggestions: state.error.buildError.suggestions, onExit: () => exit() })), state.error && !state.error.buildError && (jsxRuntimeExports.jsx(Box, { marginTop: 2, children: jsxRuntimeExports.jsx(ErrorSummary, { message: state.error.message, suggestions: state.error.suggestions }) })), state.isComplete && !state.error && (jsxRuntimeExports.jsxs(Box, { marginTop: 2, flexDirection: "column", alignItems: "center", children: [jsxRuntimeExports.jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " Setup complete!"] }), jsxRuntimeExports.jsx(Box, { marginTop: 1, flexDirection: "column", children: state.tasks.filter(t => t.status === 'completed').map(task => (jsxRuntimeExports.jsxs(Box, { children: [jsxRuntimeExports.jsx(Text, { color: colors.success, children: symbols.check }), jsxRuntimeExports.jsxs(Text, { color: colors.gray, children: [" ", task.label] })] }, task.id))) }), jsxRuntimeExports.jsx(Box, { marginTop: 1 }), jsxRuntimeExports.jsx(ConfigSummary, { items: state.config }), jsxRuntimeExports.jsx(NextSteps, { command: "openbuilder run", url: "http://localhost:3000" })] }))] }));
|
|
599
598
|
}
|
|
600
599
|
|
|
601
600
|
/**
|
|
@@ -630,15 +629,15 @@ function StartPromptScreen({ onSelect }) {
|
|
|
630
629
|
return;
|
|
631
630
|
}
|
|
632
631
|
});
|
|
633
|
-
return (jsxs(Box, { flexDirection: "column", alignItems: "center", paddingTop: topPadding, children: [jsx(Banner, {}), jsx(Box, { marginTop: 2 }), jsx(Box, { flexDirection: "column", alignItems: "center", children: jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " OpenBuilder is ready!"] }) }), jsx(Box, { marginTop: 2 }), jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsx(Text, { color: colors.white, children: "Start OpenBuilder now?" }), jsx(Box, { marginTop: 1, children: jsxs(Text, { color: colors.dimGray, children: ["Press ", jsx(Text, { color: colors.cyan, bold: true, children: "Y" }), " or ", jsx(Text, { color: colors.cyan, bold: true, children: "Enter" }), " to start, ", jsx(Text, { color: colors.cyan, bold: true, children: "N" }), " or ", jsx(Text, { color: colors.cyan, bold: true, children: "Esc" }), " to exit"] }) })] }), jsx(Box, { marginTop: 2 }), jsx(Box, { flexDirection: "column", alignItems: "center", children: jsxs(Text, { color: colors.dimGray, children: ["To start later, run: ", jsx(Text, { color: colors.cyan, children: "openbuilder run" })] }) })] }));
|
|
632
|
+
return (jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", paddingTop: topPadding, children: [jsxRuntimeExports.jsx(Banner, {}), jsxRuntimeExports.jsx(Box, { marginTop: 2 }), jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "center", children: jsxRuntimeExports.jsxs(Text, { color: colors.success, bold: true, children: [symbols.check, " OpenBuilder is ready!"] }) }), jsxRuntimeExports.jsx(Box, { marginTop: 2 }), jsxRuntimeExports.jsxs(Box, { flexDirection: "column", alignItems: "center", children: [jsxRuntimeExports.jsx(Text, { color: colors.white, children: "Start OpenBuilder now?" }), jsxRuntimeExports.jsx(Box, { marginTop: 1, children: jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["Press ", jsxRuntimeExports.jsx(Text, { color: colors.cyan, bold: true, children: "Y" }), " or ", jsxRuntimeExports.jsx(Text, { color: colors.cyan, bold: true, children: "Enter" }), " to start, ", jsxRuntimeExports.jsx(Text, { color: colors.cyan, bold: true, children: "N" }), " or ", jsxRuntimeExports.jsx(Text, { color: colors.cyan, bold: true, children: "Esc" }), " to exit"] }) })] }), jsxRuntimeExports.jsx(Box, { marginTop: 2 }), jsxRuntimeExports.jsx(Box, { flexDirection: "column", alignItems: "center", children: jsxRuntimeExports.jsxs(Text, { color: colors.dimGray, children: ["To start later, run: ", jsxRuntimeExports.jsx(Text, { color: colors.cyan, children: "openbuilder run" })] }) })] }));
|
|
634
633
|
}
|
|
635
634
|
|
|
636
635
|
/**
|
|
637
636
|
* Init App component that manages the init flow screens
|
|
638
637
|
*/
|
|
639
638
|
function InitApp({ onInit, onComplete, onError }) {
|
|
640
|
-
const [screen, setScreen] = useState('init');
|
|
641
|
-
const [config, setConfig] = useState(null);
|
|
639
|
+
const [screen, setScreen] = reactExports.useState('init');
|
|
640
|
+
const [config, setConfig] = reactExports.useState(null);
|
|
642
641
|
const handleInitComplete = (initConfig) => {
|
|
643
642
|
setConfig(initConfig);
|
|
644
643
|
// Show the start prompt screen
|
|
@@ -650,9 +649,9 @@ function InitApp({ onInit, onComplete, onError }) {
|
|
|
650
649
|
}
|
|
651
650
|
};
|
|
652
651
|
if (screen === 'prompt' && config) {
|
|
653
|
-
return jsx(StartPromptScreen, { onSelect: handleStartChoice });
|
|
652
|
+
return jsxRuntimeExports.jsx(StartPromptScreen, { onSelect: handleStartChoice });
|
|
654
653
|
}
|
|
655
|
-
return (jsx(InitScreen, { onInit: onInit, onComplete: handleInitComplete, onError: onError }));
|
|
654
|
+
return (jsxRuntimeExports.jsx(InitScreen, { onInit: onInit, onComplete: handleInitComplete, onError: onError }));
|
|
656
655
|
}
|
|
657
656
|
/**
|
|
658
657
|
* Render the TUI init screen
|
|
@@ -662,7 +661,7 @@ async function runInitTUI(options) {
|
|
|
662
661
|
return new Promise((resolve, reject) => {
|
|
663
662
|
let result = null;
|
|
664
663
|
let error = null;
|
|
665
|
-
const { unmount, waitUntilExit } = render(jsx(InitApp, { onInit: options.onInit, onComplete: (config, shouldStart) => {
|
|
664
|
+
const { unmount, waitUntilExit } = render(jsxRuntimeExports.jsx(InitApp, { onInit: options.onInit, onComplete: (config, shouldStart) => {
|
|
666
665
|
result = { config, shouldStart };
|
|
667
666
|
// Give time for final render before unmounting
|
|
668
667
|
setTimeout(() => {
|
|
@@ -758,7 +757,7 @@ async function initTUICommand(options) {
|
|
|
758
757
|
console.clear();
|
|
759
758
|
console.log('\n Starting OpenBuilder...\n');
|
|
760
759
|
// Import and run the start command (full TUI with web app + runner)
|
|
761
|
-
const { startCommand } = await import('./start-
|
|
760
|
+
const { startCommand } = await import('./start-B4P27nZ7.js');
|
|
762
761
|
await startCommand({});
|
|
763
762
|
}
|
|
764
763
|
else {
|
|
@@ -1124,4 +1123,4 @@ async function executeInitFlow(options, callbacks) {
|
|
|
1124
1123
|
}
|
|
1125
1124
|
|
|
1126
1125
|
export { initTUICommand };
|
|
1127
|
-
//# sourceMappingURL=init-tui-
|
|
1126
|
+
//# sourceMappingURL=init-tui-DDxZYe9B.js.map
|