diff --git a/lib/backup/README.md b/lib/backup/README.md new file mode 100644 index 0000000..8142277 --- /dev/null +++ b/lib/backup/README.md @@ -0,0 +1,12 @@ +## Backup a Reso Cert API server +```bash +node index.js backup -u -p -d -w +``` + +`-d` and`-w` are optional flags that specify whether to 'only backup DD/DA reports (`-d`)' or to 'only backup webAPI reports (`-w`)'. Omitting/Including both will back up everything. + +### Example usage: + +```bash +reso-certification-utils backup -u http://localhost -p ~/Downloads +``` \ No newline at end of file diff --git a/lib/restore-utils/README.md b/lib/restore-utils/README.md index fc00ab5..11bc674 100644 --- a/lib/restore-utils/README.md +++ b/lib/restore-utils/README.md @@ -66,3 +66,15 @@ The following directory structure is assumed: + providerUoiN-providerUsiN ``` +## Restore from a server backup +```bash +reso-certification-utils restore -u -p --restoreFromBackup +``` + +The `--restoreFromBackup` or `-r` flag tells the tool to restore from the backed-up server data rather than raw reports. + +### Example usage: + +```bash +reso-certification-utils restore -u http://localhost -p ~/Downloads/reso-server-backup/data_dictionary-1.7 -r +``` \ No newline at end of file diff --git a/lib/transform/transformations/README.md b/lib/transform/transformations/README.md new file mode 100644 index 0000000..f281560 --- /dev/null +++ b/lib/transform/transformations/README.md @@ -0,0 +1,20 @@ +## Run a transformation on all reports of a given cert API server +```bash +node index.js transform -u -p -r -b -e +``` + +The `-b` or `--backup` flag creates a backup of all the DD/DA reports from the given server before starting the transformation. + +The `-p` or `--pathToBackup` option is required when using the backup flag. + +The `-r` or `--rescore` flag is a transformation that adjusts the EMPTY_LIST/NULL_VALUE counts, rescores the report, and posts them back to the cert API server. + +The `-e` or `--runEtl` flag is another transformation that takes in a DA report, converts it to raw form, and runs the ETL method on the report. This transformation will always be run last if more than one transformation is provided. + +__Note:__ It is advisable to always create a backup before running any transformations. + +### Example usage + +```bash +node index.js transform -u http://localhost -r -e -b -p ~/Documents +``` \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7c4a857..06650f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "dotenv": "^16.0.1", "fs-extra": "^10.0.0", "mocha": "^9.1.3", - "reso-certification-etl": "github:RESOStandards/reso-certification-etl#1b8485ec32ef5ae6340361f853726a17e54ce515", + "reso-certification-etl": "github:RESOStandards/reso-certification-etl", "yargs": "^16.2.0" }, "bin": { @@ -4676,7 +4676,7 @@ "reso-certification-etl": { "version": "git+ssh://git@github.com/RESOStandards/reso-certification-etl.git#1b8485ec32ef5ae6340361f853726a17e54ce515", "integrity": "sha512-jIIMk/DZNK+JsSCwr0bEpyh1Pbk/afRMO3doDq9izEOuJ8dtyum1c0TP2XsYfVuQGF1Op8hkBrPvNj6YWmP+Cg==", - "from": "reso-certification-etl@github:RESOStandards/reso-certification-etl#1b8485ec32ef5ae6340361f853726a17e54ce515" + "from": "reso-certification-etl@github:RESOStandards/reso-certification-etl" }, "resolve-from": { "version": "4.0.0",