-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Everything except the dash input (#490)
* WIP refactoring arg parsing and inputs # Conflicts: # pkg/contract.go # pkg/testing/os.go # Conflicts: # internal/os.go # Conflicts: # pkg/cmd/gen.go # pkg/input/fs.go # pkg/input/reader.go * WIP getting it all rejiggered # Conflicts: # pkg/cmd/internal/fs.go # pkg/cmd/internal/parse.go # pkg/cmd/internal/parse_test.go # pkg/cmd/internal/reader.go # pkg/contract.go # Conflicts: # pkg/contract.go # pkg/plugin/aggregate.go # pkg/plugin/aggregate_test.go # pkg/plugin/github/release.go # pkg/plugin/path.go # pkg/testing/plugin.go # pkg/testing/target.go # Conflicts: # pkg/cmd/internal/fs_test.go # Conflicts: # pkg/cmd/gen.go * WIP fiddling with mocks # Conflicts: # pkg/cmd/internal/fs.go # pkg/cmd/internal/parse.go # pkg/cmd/internal/parse_test.go # pkg/cmd/internal/reader.go # pkg/testing/os.go # Conflicts: # pkg/cmd/internal/fs_test.go * Input parsing tests # Conflicts: # pkg/cmd/internal/fs_test.go * dfskjdl # Conflicts: # pkg/cmd/gen.go * Meh # Conflicts: # pkg/contract.go # pkg/plugin/aggregate.go # pkg/plugin/github/release.go # pkg/plugin/path_test.go # Conflicts: # pkg/cmd/gen.go * Added panic for unimplemented functions in MockGenerator The MockGenerator now panics if the StringFunc or ExecuteFunc are not implemented. This change ensures that these methods are properly set before being called, preventing silent failures. The default implementation of ExecuteFunc in NewMockGenerator has been removed as it is no longer needed with this new check. * Added context to generator function calls The generator function in the plugin package now accepts a context as its first argument. This change has been reflected across all usages of this function, including tests. Additionally, minor adjustments were made to import statements and method parameters for consistency and readability. * Updated error messages and plugin search logic The changes include an update to the error message in e2e tests for better clarity. A new function 'Find' has been added to lookup plugins based on a predicate, improving the plugin search mechanism. The string representation of 'fromPath' has been simplified by removing unnecessary prefix. In typescript.go, the generator now uses the new 'Find' function for searching suitable plugins, enhancing code readability and efficiency. Corresponding test cases have also been updated to reflect these changes. * Updated TypeScript generator logic The TypeScript generator logic has been simplified. The 'Choose' function, which was previously used to select a generator from an available list, has been removed. This change simplifies the code and reduces potential error scenarios. Additionally, the declaration of the 'TypeScript' variable has been moved up for better visibility in the code structure.
- Loading branch information
1 parent
f566251
commit 88444f8
Showing
16 changed files
with
99 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.