mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
feat: enhance project initialization and improve logging in auto mode service
- Added a default categories.json file to the project initialization structure. - Improved code formatting and readability in the auto-mode-service.ts file by restructuring console log statements and method calls. - Updated feature status checks to include "backlog" in addition to "pending" and "ready".
This commit is contained in:
@@ -26,6 +26,12 @@ export function initAllowedPaths(): void {
|
||||
if (dataDir) {
|
||||
allowedPaths.add(path.resolve(dataDir));
|
||||
}
|
||||
|
||||
// Always allow the workspace directory (where projects are created)
|
||||
const workspaceDir = process.env.WORKSPACE_DIR;
|
||||
if (workspaceDir) {
|
||||
allowedPaths.add(path.resolve(workspaceDir));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +64,9 @@ export function validatePath(filePath: string): string {
|
||||
const resolved = path.resolve(filePath);
|
||||
|
||||
if (!isPathAllowed(resolved)) {
|
||||
throw new Error(`Access denied: ${filePath} is not in an allowed directory`);
|
||||
throw new Error(
|
||||
`Access denied: ${filePath} is not in an allowed directory`
|
||||
);
|
||||
}
|
||||
|
||||
return resolved;
|
||||
|
||||
Reference in New Issue
Block a user