Mirth Poly
This is only a proof of concept at the moment.
This produces an export of a channel in a detailed directory structure like this:
- channel_name - the top directory
- destinationConnectors - directory containing a subdirectory for each destination connector
- sourceConnector - directory containing the source connector
- transformers
- main.js
- test.js
- transformers.json
- channel.json - the full channel export in JSON format
- deployScript.js
- postprocessingScript.js
- undeployScript.js
- transformers
To try it out:
- npm install
- (windows) node .\src\index.js --username admin --password admin -h 127.0.0.1 --notls
- (linux) node ./src/index.js --username admin --password admin -h 127.0.0.1 --notls
- node ./src/index.js # show help
Params/Options:
Usage: --username <mirthUserName> --password <mirthUserPassword>
Options:
--help Show help [boolean]
--version Show version number [boolean]
-u, --username Mirth User Name [string] [required]
-p, --password Mirth User Password [string] [required]
-h, --host Mirth Host [string] [default: "127.0.0.1"]
-o, --port Mirth Port [string] [default: "8443"]
-n, --notls Disable TLS Check - required for self signed untrusted cert
[boolean] [default: false]
-d, --outpath Path to write files to [string] [default: "./mirthSrc"]
Examples:
Example: 'mirth-poly --username admin --password admin --host 10.100.96.61
--port 8443 --notls'
Test Functions
getCodeTemplateLibraries() - downloads CodeTemplates.xmlprocessCodeTemplateLibraries() - processes CodeTemplates.xml into files and foldersgetChannels() - downloads Channels.xmlprocessChannels() - processes Channels.xml into files and folders - Not complete yettestMirthApi() - just test the mirth apimain() - calls 1-4 in the correct order and waits as needed- Test Deserialize/Serialize Code Template Libraries -
node src\test\MirthCodeLibrary.test.js