This is a command line interface (CLI) that allows you to sync the schema of one Parse instance to another. This is helpful for keeping the schema of multiple Parse instances in sync.
- Clone this repository to your local machine
- Run
npm install
to install the required dependencies
To use the CLI, run the following command:
$ node index --srcAppId <source app ID> --srcMasterKey <source master key> --srcUrl <source URL> --dstAppId <destination app ID> --dstMasterKey <destination master key> --dstUrl <destination URL>
Here's an explanation of the different arguments:
srcAppId
: The app ID of the source Parse instancesrcMasterKey
: The master key of the source Parse instancesrcUrl
: The URL of the source Parse instancedstAppId
: The app ID of the destination Parse instancedstMasterKey
: The master key of the destination Parse instancedstUrl
: The URL of the destination Parse instance
There is an additional option you can use:
--force
: This option will replace a field if it has changed. However, it will also remove all data in that field. Use with caution.
To run the unit tests, you will need to set the environment variables for the source and destination Parse instances. Here's how to do it:
- Create a
.env
file in the root of the project directory - Add the following lines to the file:
SRC_APP_ID=<source app ID>
SRC_MASTER_KEY=<source master key>
SRC_URL=<source URL>
DST_APP_ID=<destination app ID>
DST_MASTER_KEY=<destination master key>
DST_URL=<destination URL>
- Replace the values with the appropriate values for your Parse instances
- Run
npm test
to run the unit tests with the environment variables set