Closed prcolaco closed 4 years ago
Improved original idea after stepping into the problem that the mapping in master of zeus-sdk/zeus-cmd
wasn't updated as of the latest release in npmjs. This was causing me to not be able to compile, due to packages being different.
So I thought that this should be an important thing, to be able to update the zeus base mappings, without interfering with users local mappings...
Now the local mappings file stays only with deployed packages by the user, and the _mapping.js load() (yeah mapping.js moved to helpers) joins the defaults (/defaults/mapping.json
) to the local mappings in ~/.zeus/mapping.json
.
This is the best of both worlds, as defaults can be changed and the user can override by deploying their own packages.
Very cool! Not losing the mapping file is a nice add.
If you're good with the PR I can go ahead and create an internal PR / add documentation.
I've created the PR internally! Will let you know what becomes of it
Thank you as always for your contribution
merged internally, thank you for the PR!
I found handy, since we have a storage directory in
~/.zeus/
(default), to have our mapping there in amapping.json
file so that the user can install new versions ofzeus-cmd
without losing his deployment mappings. This feels also like a cleaner approach instead of changing the distributedmapping.js
source file. Also fixed the temp cleanup when anunbox
command gets interrupted by user or by an exception, by providing a handler that always runs the cleanup. At least in mac I found that many temporary directories were left behind, so those few lines 12-17 solve that.