-
Notifications
You must be signed in to change notification settings - Fork 3
fix(backend): fix a lot small issue in backend #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
689406e
2b1172e
e4e78c7
7584ea6
556ea93
63c7ef8
7edf582
10a6e1e
b0edd28
f34ef7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,7 +5,6 @@ | |||||||||||||||||
import { UXSMSHandler } from 'src/build-system/handlers/ux/sitemap-structure'; | ||||||||||||||||||
import { UXDMDHandler } from 'src/build-system/handlers/ux/datamap'; | ||||||||||||||||||
import { BackendRequirementHandler } from 'src/build-system/handlers/backend/requirements-document'; | ||||||||||||||||||
import { FileFAHandler } from 'src/build-system/handlers/file-manager/file-arch'; | ||||||||||||||||||
import { BuilderContext, GlobalDataKeys } from 'src/build-system/context'; | ||||||||||||||||||
import { v4 as uuidv4 } from 'uuid'; // UUID generator for unique identifiers | ||||||||||||||||||
import { | ||||||||||||||||||
|
@@ -37,18 +36,20 @@ | |||||||||||||||||
const backendRequirements = this.readMockFile( | ||||||||||||||||||
path.join(__dirname, 'test_files', 'Backend_Requirements_Node.md'), | ||||||||||||||||||
); | ||||||||||||||||||
const fileStructure = this.readMockFile( | ||||||||||||||||||
path.join(__dirname, 'test_files', 'File_Structure_Generation.md'), | ||||||||||||||||||
); | ||||||||||||||||||
const fileArchitecture = this.readMockFile( | ||||||||||||||||||
path.join(__dirname, 'test_files', 'File_Arch.md'), | ||||||||||||||||||
); | ||||||||||||||||||
|
||||||||||||||||||
//To do integrate FileStructureAndArchitectureHandler | ||||||||||||||||||
const fileStructureAndArchitectureHandler = this.readMockFile( | ||||||||||||||||||
path.join(__dirname, 'test_files', 'File_Structure_Architecture_Node.md'), | ||||||||||||||||||
); | ||||||||||||||||||
this.mockNodeData.set(UXSMSHandler, uxSitemapStructure); | ||||||||||||||||||
this.mockNodeData.set(UXDMDHandler, uxDataMapDocument); | ||||||||||||||||||
this.mockNodeData.set(BackendRequirementHandler, backendRequirements); | ||||||||||||||||||
this.mockNodeData.set(FileFAHandler, fileArchitecture); | ||||||||||||||||||
this.buildVirtualDirectory(fileStructure); | ||||||||||||||||||
// this.mockNodeData.set( | ||||||||||||||||||
// fileStructureAndArchitectureHandler, | ||||||||||||||||||
// FileStructureAndArchitectureHandler, | ||||||||||||||||||
// ); | ||||||||||||||||||
Comment on lines
+47
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix parameter order in commented-out mockNodeData.set() call. The parameter order appears to be reversed compared to the pattern used in other mockNodeData.set() calls. It should be handler class first, then data. - // this.mockNodeData.set(
- // fileStructureAndArchitectureHandler,
- // FileStructureAndArchitectureHandler,
- // );
+ // this.mockNodeData.set(
+ // FileStructureAndArchitectureHandler,
+ // fileStructureAndArchitectureHandler,
+ // ); 📝 Committable suggestion
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
// this.buildVirtualDirectory(fileStructure); | ||||||||||||||||||
|
||||||||||||||||||
copyProjectTemplate( | ||||||||||||||||||
path.join(__dirname, '..', '..', '..', '..', 'template', 'react-ts'), | ||||||||||||||||||
|
@@ -103,7 +104,7 @@ | |||||||||||||||||
const absolutePath = resolve(filePath); // Resolve the file path | ||||||||||||||||||
return readFileSync(absolutePath, 'utf-8'); // Read the file content | ||||||||||||||||||
} catch (err) { | ||||||||||||||||||
console.error(`Error reading file at ${filePath}:`, err); | ||||||||||||||||||
return ''; // Return an empty string if file read fails | ||||||||||||||||||
} | ||||||||||||||||||
} | ||||||||||||||||||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Implement the integration TODO for FileStructureAndArchitectureHandler.
The code defines a variable to hold the content of the new combined file structure and architecture file, but the TODO comment indicates this integration is incomplete. This is an important part of the restructuring mentioned in the PR objectives.
🏁 Script executed:
Length of output: 1258
Action Required: Complete the Integration of FileStructureAndArchitectureHandler
The file still contains a TODO comment and only a temporary variable assignment for reading the file content. Although the handler exists in the codebase (as seen in multiple locations), its integration into
backend/src/build-system/__tests__/mock/MockBuilderContext.ts
remains incomplete. Please implement the following:FileStructureAndArchitectureHandler
as outlined in the PR objectives.🧰 Tools
🪛 GitHub Check: autofix
[warning] 41-41:
'fileStructureAndArchitectureHandler' is assigned a value but never used. Allowed unused vars must match /^_/u