Skip to content
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

Fix and Improve Script Exports and Imports #435

Merged

Conversation

phalestrivir
Copy link
Contributor

This PR makes a few updates to help fix and improve script exports and imports. The main changes include:

  1. Adding the option to import and export scripts by id.
  2. Adding the option to not include library scripts in exports of single scripts using the --no-deps flag. Similarly adds the option on single script imports using the same flag to not import library dependencies if so desired.
  3. Fixing many bugs related to script extraction. For example, there were certain cases where importing wouldn't function correctly due to being unable to find the extracted script(s). For exports, library scripts weren't being extracted correctly either. Therefore, an overhaul was done to try and help simplify the extraction process to that it can work for multiple scripts if dealing with library scripts both on export and import.
  4. Fixing the watch option for script imports since I discovered many errors with it. One big one was if there were several scripts for a single json file (e.g. when exporting scripts with library scripts) that only one of the scripts would correctly be watched. This was fixed by creating mappings before watching begins to map extracted script files with their corresponding json files so it functions correctly.
  5. Fixing a small bug with config imports where, if the working directory started with . or ./ it would usually fail due to being unable to locate the expected files it was looking for.
  6. Various other refactoring changes to help improve the code related to scripts, including reducing redundancy and some typo fixes.

There is a PR in frodo-lib (with the same name as this one) that this PR relies on due to a few changes made there.

…aths, watching, etc. Add flag to optionally exclude library scripts on import/export. Add flag to optionally export/import scripts by id.
@vscheuber vscheuber merged commit 45fbd80 into rockcarver:main Aug 16, 2024
8 of 9 checks passed
@phalestrivir phalestrivir deleted the bugfix/fix-script-exports-and-imports branch August 16, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants