Trustack Procedure Tester CLI Tool - https://trustack.io
This repo contains the a command line tool for testing locally developed Trustack Procedures. The tool will simulate how a Procedure is run on a Trustack Exec node, allowing the developer to test and troubleshoot their Procedure without deploying to the Trustack decentralized cloud network.
npm install proc-tester
Usage can be seen using the --help
option, which is posted here below:
Usage: proc-tester [options]
Options:
--version Show version number [boolean]
-p, --procedue Procedure code file path.
-i, --input Input.json path.
-s, --secret Secret.json path.
-h, --help Show help [boolean]
Examples:
index.js -p ./Procedure_Root_Folder -i ./input.json -s ./secret.json
* Will locally test a Trustack Procedure, according to the provided inputs.
* @param {string} inputFile Path to the `input.json` file.
* @param {string} secretFile Path to the `secret.json` file.
* @param {string} procPath Path to the Procedure root folder. Procedure entry must be `index.js`.
* @returns {Promise} Promise wrapped output from the procedure.
Example Usage:
const { procTester } = require('trst-proc-tester');
let output = await procTester(inputFile, secretFile, procPath);
See Procedure Examples in the trustack-sdk repo for how to write Procedures.
See CONTRIBUTING
This project is MIT licensed. For the full license, see LICENSE.
TBD
The primary contact for this project is [@fcbrandon].
Copyright (C) 2021 Brandon Caldwell - All Rights Reserved