You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(platformifier): use fs.FS and return file map
Abstract the filesystem using Go's standard fs.FS interface and change
Platformify() to return a map[string][]byte of generated files instead
of writing them to disk. This enables callers (like source-integration-
apps) to operate on in-memory filesystems and handle file output
themselves.
Changes:
- internal/utils: all file functions take fs.FS as first parameter,
use fs.WalkDir/fs.ReadFile instead of os equivalents
- internal/question/models: WorkingDirectory becomes fs.FS, add Cwd
string field for the OS path
- internal/question/*: update all callers for new utils signatures
- platformifier: interface returns (map[string][]byte, error),
generic/django/laravel collect files in map instead of writing
- platformifier: remove custom FS interface (fs.go), mock (fs_mock_test),
mock generator (platformifier_mock_test), and nextjs platformifier
- platformifier: adapt all tests to use fstest.MapFS and new interface
- commands/platformify.go: write returned file map to disk
- validator: use os.DirFS for FindAllFiles call
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments