fix(CLI): Use correct relative path for gatsby postinstall#90
fix(CLI): Use correct relative path for gatsby postinstall#90
Conversation
Code Review Agent Run #0ae670Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Changelist by BitoThis pull request implements the following key changes.
|
Interaction Diagram by BitosequenceDiagram
participant Dev as Developer
participant CLI as flagpack.js<br/>🔄 Updated | ●●○ Medium
participant Meow as Meow CLI Parser
participant CopyFunc as copyFrameworkAware<br/>🔄 Updated | ●●○ Medium
participant PathResolver as path.resolve
participant FSExtra as fs-extra.copy
participant FileSystem as Gatsby Project FileSystem
Dev->>CLI: Execute react-flagpack --framework=gatsby
CLI->>Meow: Parse CLI flags
Meow-->>CLI: Return parsed flags
CLI->>CopyFunc: Call with framework gatsby
CopyFunc->>PathResolver: Resolve ./static/flags (FIXED)
Note over CopyFunc, PathResolver: Changed from /static/flags<br/>to ./static/flags for relative path
PathResolver-->>CopyFunc: Return project-relative path
CopyFunc->>FSExtra: Copy dist/flags to destination
FSExtra->>FileSystem: Write flags to ./static/flags
FileSystem-->>FSExtra: Write complete
FSExtra-->>CopyFunc: Success callback
CopyFunc-->>Dev: Log success message
Critical path: Developer -> flagpack.js -> copyFrameworkAware -> path.resolve -> fs-extra.copy -> Gatsby Project FileSystem
If the interaction diagram doesn't appear, refresh the page to render it. You can disable interaction diagrams by customizing agent settings. Refer to documentation. |
This pull request makes a minor correction to the destination path used when copying flag assets for Gatsby projects in the
copyFrameworkAwarefunction. The change ensures the path gets treated as a relative path, instead of an absolute path which caused thepostinstallscript to fail in Gatsby projects.copyFrameworkAwareto use./static/flagsinstead of/static/flagsincli/flagpack.js.Closes #83
Summary by Bito