Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Description
As part of trying to unblock/retain some of the in-progress work being done in #2061
Currently all gdrive workspace scripts are executed using spawned commands from the terminal, e.g.
This PR refactors to separate the command line interface (CLI) from main methods (lib), and exposes the lib methods so that they can be imported and called from code.
This should in theory make them slightly quick to execute (spawning child processes takes some time, although there are some memory management trade-offs depending on local system), but more importantly can be bundled into a build (future desktop app requirement).
Review Notes
Should simply need to test the
yarn workflow sync
command still downloads from google drive as expected. Would be useful to confirm the--content-watch
configuration also works as well as multiple deployment sourcesDev Notes
The majority of code changes are simply splitting cli+lib code from one file to two. The more considered changes are those to the providers, and how spawnSync commands have been replaced by import
Git Issues
Closes #
Screenshots/Videos
If useful, provide screenshot or capture to highlight main changes