xinelements-hbssync
v1.0.7
Published
Temporarily hosts XIN Elements templates locally and updates the target BRXM instance when changes are found.
Downloads
3
Readme
XIN Elements HBS Sync
This utility allows you to temporarily mirror the Template Container Documents that live in your XIN Elements brXM instance. Whenever the files change the template is updated in the CMS.
After you exit the synchroniser the templates are removed from your local machine as the purpose of the tool is to help easily edit and navigate templates stored in your CMS, not to store the templates locally as the CMS is the source of truth for this information.
To use this tool, create a folder, with a package.json
as follows (please change the version to the latest).
{
"dependencies": {
"xinelements-hbssync": "^1.0.3"
},
"devDependencies": {
"core-js": "3.23.3"
}
}
Then run:
$ npx hbssync
This should create a new folder called mirror/
with the contents of all template container document variations
on your local disk.
Configurations
You can impact how the script works by updating the values below:
const Config = {
outputPath: process.env.OUTPUT_PATH ?? './mirror',
user: process.env.BRXM_USER ?? 'admin',
password: process.env.BRXM_PASSWORD ?? 'admin',
host: process.env.BRXM_HOST ?? 'http://localhost:8080',
remote: process.env.BRXM_REMOTE === 'true'
}
Set BRXM_REMOTE
to true
if you're connecting to an instance running in a Docker container, this changes
the path at which the endpoints live.