fix(FN-952): activate projects after CLI registration
- Set project status to 'active' after registration in runInit (kb init) - Set project status to 'active' after registration in runProjectAdd (kb project add) - Set project status to 'active' after interactive registration in resolveProjectDirectory - Add updateProject mock to init.test.ts, project.test.ts, and project-resolver.test.ts
This commit is contained in:
@@ -263,6 +263,9 @@ export async function resolveProject(options: ResolveOptions = {}): Promise<Reso
|
||||
isolationMode: "in-process",
|
||||
});
|
||||
|
||||
// Activate the project (registration sets it to 'initializing')
|
||||
await central.updateProject(newProject.id, { status: "active" });
|
||||
|
||||
console.log(`\n ✓ Registered project "${newProject.name}"`);
|
||||
return createResolvedProject(newProject);
|
||||
} catch (err: any) {
|
||||
@@ -606,6 +609,9 @@ export async function registerProjectInteractive(
|
||||
isolationMode: options.isolation ?? "in-process",
|
||||
});
|
||||
|
||||
// Activate the project (registration sets it to 'initializing')
|
||||
await central.updateProject(project.id, { status: "active" });
|
||||
|
||||
return createResolvedProject(project);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user