[x] accept just one CLI command to do so, something like: configm server --port XXX
Modify the ConfigMateProvider.ts to:
[x] interact with an API instead of a CLI
Sample request/response objects
Request:
Route: /api/check Method: POST Payload:
{
"rulebook": "/path/to/rulebook"
}
Response:
[
{
"passed": true, // The rule is being met
"reponse_comment": "Error message produced"
"token_list": [ // List of text artifacts involved in rule with location information, this information can be used to highlight or underscore these artifacts based on the value of "passed", when hovering over this text artifacts, we can display the usual error message vscode displays for those things using the "response comment".
{file,row,col,length}, // Maybe also a type... (Value, FieldName, Literal)
{file,row,col,length},
]
},
{
// ...
},
]
Mock ConfigMate Program
Modify the mock ConfigMate.go program in /bin to:
configm server --port XXX
Modify the ConfigMateProvider.ts to:
Sample request/response objects
Request:
Route:
/api/check
Method:POST
Payload:Response: