doc-detective-common v1.22.0
Doc Detective Common
Shared resources for Doc Detective projects.
Install
npm i doc-detective-commonInit
const common = require("doc-detective-common");Methods
.validate(schemaKey: string, object: object)
Validate that object matches the specified schema definition.
Returns an object with the following schema:
{
"valid": boolean,
"errors": [
{
"instancePath": string,
"schemaPath": string,
"keyword": string,
"params": [{Object}],
"message": string
}
]
}Usage
const schemaKey = "runShell_v1";
const object = {
action: "runShell",
command: "echo $username",
};
console.log(common.validate(schemaKey, object));.readFile(fileURL)
Load file contents from a URL or a file path. If a JSON or YAML file, returns an object. If a different file, returns a string.
Objects
.schemas
JSON schema definitions for various objects used throughout Doc Detective.
Schema objects are located in the /schemas directory and made available through the .schemas object.
{
"analytics_v1": {Object},
"checkLink_v1": {Object},
"click_v1": {Object},
"find_v1": {Object},
"goTo_v1": {Object},
"httpRequest_v1": {Object},
"matchText_v1": {Object},
"moveMouse_v1": {Object},
"runShell_v1": {Object},
"screenshot_v1": {Object},
"scroll_v1": {Object},
"startRecording_v1": {Object},
"stopRecording_v1": {Object},
"type_v1": {Object},
"wait_v1": {Object}
}9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago