eisbuk / EisBuk

Manage bookings for ice skating lessons
GNU Affero General Public License v3.0
0 stars 1 forks source link

Split backup restore into cli and lib parts + create wrappers for `rush ...` usage #866

Open ikusteu opened 10 months ago

ikusteu commented 10 months ago

Currently we're using rush seed-firestore:<eisbuk|igorice> which are actually two different (but very similar commands) by running node backup-restore (backup-restore being cli.js). The problem with that approach is: we can't pass any arguments, hence the two different commands. I would prefer to be able to run rush seed-firestore -o <igorice|eisbuk> which would then be a single command. Additionally, as mentioned in #865 it would be nice to split the backing up and restoring (seeding) into two different commands and, ideally, I would like to be able to pass some arguments to both (so that we don't have to hard-code each and every variant of each command.

In order for commands to be able to receive arguments, it would make more sense to run them as js scripts, rather than bash commands, therefore, it would be nice to be able to use the backup-restore functionality, but write a wrapper around it (hence the suggestion for the lib side of the package).

Tasks