genbox 1.0.5 → 1.0.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/dist/commands/init.js +25 -14
- package/package.json +2 -1
package/dist/commands/init.js
CHANGED
|
@@ -153,24 +153,15 @@ exports.initCommand = new commander_1.Command('init')
|
|
|
153
153
|
}
|
|
154
154
|
console.log(chalk_1.default.blue('Initializing Genbox...'));
|
|
155
155
|
console.log('');
|
|
156
|
-
// Get
|
|
156
|
+
// Get initial exclusions from CLI options only
|
|
157
157
|
let exclude = [];
|
|
158
158
|
if (options.exclude) {
|
|
159
159
|
exclude = options.exclude.split(',').map((d) => d.trim()).filter(Boolean);
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
const excludeDirs = await prompts.input({
|
|
163
|
-
message: 'Directories to exclude (comma-separated, or empty to skip):',
|
|
164
|
-
default: '',
|
|
165
|
-
});
|
|
166
|
-
exclude = excludeDirs
|
|
167
|
-
? excludeDirs.split(',').map((d) => d.trim()).filter(Boolean)
|
|
168
|
-
: [];
|
|
169
|
-
}
|
|
170
|
-
// Scan project (skip scripts initially - we'll ask about them later)
|
|
161
|
+
// Scan project first (skip scripts initially)
|
|
171
162
|
const spinner = (0, ora_1.default)('Scanning project...').start();
|
|
172
163
|
const scanner = new scanner_1.ProjectScanner();
|
|
173
|
-
|
|
164
|
+
let scan = await scanner.scan(process.cwd(), { exclude, skipScripts: true });
|
|
174
165
|
spinner.succeed('Project scanned');
|
|
175
166
|
// Display scan results
|
|
176
167
|
console.log('');
|
|
@@ -187,7 +178,27 @@ exports.initCommand = new commander_1.Command('init')
|
|
|
187
178
|
const frameworkStr = scan.frameworks.map(f => f.name).join(', ');
|
|
188
179
|
console.log(` ${chalk_1.default.dim('Frameworks:')} ${frameworkStr}`);
|
|
189
180
|
}
|
|
190
|
-
|
|
181
|
+
// For multi-repo: show apps and let user select which to include
|
|
182
|
+
const isMultiRepoStructure = scan.structure.type === 'hybrid';
|
|
183
|
+
let selectedApps = scan.apps;
|
|
184
|
+
if (isMultiRepoStructure && scan.apps.length > 0 && !nonInteractive) {
|
|
185
|
+
console.log('');
|
|
186
|
+
console.log(chalk_1.default.blue('=== Apps Detected ==='));
|
|
187
|
+
const appChoices = scan.apps.map(app => ({
|
|
188
|
+
name: `${app.name} (${app.type}${app.framework ? `, ${app.framework}` : ''})`,
|
|
189
|
+
value: app.name,
|
|
190
|
+
checked: app.type !== 'library', // Default select non-libraries
|
|
191
|
+
}));
|
|
192
|
+
const selectedAppNames = await prompts.checkbox({
|
|
193
|
+
message: 'Select apps to include:',
|
|
194
|
+
choices: appChoices,
|
|
195
|
+
});
|
|
196
|
+
// Filter scan.apps to only selected ones
|
|
197
|
+
selectedApps = scan.apps.filter(a => selectedAppNames.includes(a.name));
|
|
198
|
+
// Update scan with filtered apps
|
|
199
|
+
scan = { ...scan, apps: selectedApps };
|
|
200
|
+
}
|
|
201
|
+
else if (scan.apps.length > 0) {
|
|
191
202
|
console.log(` ${chalk_1.default.dim('Apps:')} ${scan.apps.length} discovered`);
|
|
192
203
|
for (const app of scan.apps.slice(0, 5)) {
|
|
193
204
|
console.log(` - ${app.name} (${app.type}${app.framework ? `, ${app.framework}` : ''})`);
|
|
@@ -261,7 +272,7 @@ exports.initCommand = new commander_1.Command('init')
|
|
|
261
272
|
}
|
|
262
273
|
v3Config.defaults.size = serverSize;
|
|
263
274
|
// Git repository setup - different handling for multi-repo vs single-repo
|
|
264
|
-
const isMultiRepo =
|
|
275
|
+
const isMultiRepo = isMultiRepoStructure;
|
|
265
276
|
if (isMultiRepo) {
|
|
266
277
|
// Multi-repo workspace: detect git repos in app directories
|
|
267
278
|
const appGitRepos = detectAppGitRepos(scan.apps, process.cwd());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Genbox CLI - AI-Powered Development Environments",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"chalk": "^5.6.2",
|
|
60
60
|
"commander": "^14.0.2",
|
|
61
61
|
"dotenv": "^17.2.3",
|
|
62
|
+
"fast-glob": "^3.3.3",
|
|
62
63
|
"inquirer": "^13.0.2",
|
|
63
64
|
"js-yaml": "^4.1.1",
|
|
64
65
|
"ora": "^9.0.0"
|