Split rootPath from packageJsonPath basically, since we can now local the config somewhere else via --config option, we want to search for the closest seed.config.ts first, then, for a package.json as fallback for the root folder.
Fix double error messages when command throw errors, we basically handled the failure twice before instead of doing it once.
Fix command spinner not always cleanly stopping when exception was throwed
Fix npx tsx ./folder/seed.mts and npx @snaplet/sync --config ./folder/seed.config.ts sync
Early and cleanly exit the sync by throwing error if we see that we won't be able to generate because missing config file/folders
Fix sync ensure that the user is logged in before running (I'm not sure this is correct, maybe we should just skip all the "prediction/api related" stuff in that case ?)
Make sure ensureDotSnapletPath does actually create the folder if it doesn't exist
Several users has been reporting error with the config in the cli. Those errors weren't very explicit, this is an attempt at making them more explicit, and more controlled. It also fixes some bugs.
Changes
rootPath
frompackageJsonPath
basically, since we can now local the config somewhere else via--config
option, we want to search for the closestseed.config.ts
first, then, for apackage.json
as fallback for the root folder.npx tsx ./folder/seed.mts
andnpx @snaplet/sync --config ./folder/seed.config.ts sync
sync
by throwing error if we see that we won't be able to generate because missing config file/folderssync
ensure that the user is logged in before running (I'm not sure this is correct, maybe we should just skip all the "prediction/api related" stuff in that case ?)ensureDotSnapletPath
does actually create the folder if it doesn't existSeveral users has been reporting error with the config in the cli. Those errors weren't very explicit, this is an attempt at making them more explicit, and more controlled. It also fixes some bugs.
https://www.loom.com/share/6051e974d8cc47c8bcac8cb3658f974c