-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Build compendium pack for macros as leveldb
Support for NeDB is currently broken, and perhaps set to be removed, in Foundry v13. Switch from NeDB to LevelDB for the macros. This couldn't be done before because foundryvtt-cli would only process directories of json files. The macros are generated dynamically and don't exist as json files. So instead json was generated and then put into an old-style nedb file that foundry would need to convert. But the foundryvtt-cli code can now be used to pack objects. So use that, which means it's not even necessary to make json out of the macros. All the js files for the macros were copied out of their locations in the submodule and into a temp directory, then read from there. No need to for that. They will just be read from their source locations. The macro data fields hadn't been updated in while. Fix some things for V12: Don't set `author` to a random ID, just omit it. Add a correct `compendiumUuid` link in `_stats`. Add `systemId`, `createdTime`, and `modifiedTime` too. Get rid of `actorIds`, doesn't exist. The gitlab link added to the end of the macros wasn't valid, fix that. The map of every macro name to its icon was reconstructed one item at a time, for each macro. Just make it once at module start. After building the packs into a temp directory, it would nuke the entire `dist` directory before copying the temp directory into dist. Change it to just delete `dist/packs`, since nothing in this program touches files outside of `packs`. No need to delete the module.json or js code, etc. Also fix a bug where the build code would create a "generated" directory in the parent of the workbench checkout. E.g., in the user's home directory.
- Loading branch information
Showing
2 changed files
with
110 additions
and
138 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