doc-detective-common

1.21.0 • Public • Published

Doc Detective Common

Current version NPM Shield Discord Shield

Shared resources for Doc Detective projects.

Install

npm i doc-detective-common

Init

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}
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.110next
1.5.0-beta.11beta
1.22.0-onFail.00onFail
1.21.0-openapi.140openapi
1.16.0-rc.10rc
1.21.061latest
1.21.1-dev.21dev

Version History

VersionDownloads (Last 7 Days)Published
1.21.1-dev.21
1.21.1-dev.11
1.21.1-dev.00
1.22.0-onFail.10
1.22.0-onFail.00
1.21.061
1.21.0-openapi.140
1.21.0-openapi.130
1.21.0-openapi.120
1.21.0-openapi.110
1.21.0-openapi.100
1.21.0-openapi.91
1.21.0-openapi.80
1.21.0-openapi.70
1.21.0-openapi.60
1.21.0-openapi.51
1.21.0-openapi.40
1.21.0-openapi.31
1.21.0-openapi.20
1.21.0-openapi.10
1.21.0-openapi.00
1.20.020
1.19.32
1.19.3-dev.00
1.19.20
1.19.10
1.19.1-dev.10
1.19.1-dev.00
1.19.00
1.18.20
1.18.10
1.18.01
1.18.0-dev.31
1.18.0-dev.20
1.18.0-dev.11
1.18.0-dev.01
1.17.00
1.17.0-dev.13
1.17.0-dev.00
1.15.1-dev.30
1.15.1-dev.20
1.15.1-dev.01
1.16.20
1.16.2-dev.11
1.16.2-dev.00
1.16.10
1.16.1-dev.20
1.16.1-dev.10
1.16.1-dev.00
1.16.00
1.16.0-rc.10
1.16.0-rc.00
1.15.00
1.15.0-dev.10
1.15.0-dev.00
1.14.00
1.13.13
1.13.00
1.13.0-dev.00
1.12.00
1.12.0-dev.20
1.12.0-dev.10
1.12.0-dev.00
1.11.00
1.11.0-dev.30
1.11.0-dev.21
1.11.0-dev.10
1.11.0-dev.01
1.11.0-dev0
1.10.03
1.10.0-dev.02
1.9.0-record.00
1.9.00
1.8.0-px.10
1.8.0-px.00
1.8.01
1.7.0-dir.00
1.7.00
1.6.0-hostname.21
1.6.0-hostname.10
1.6.0-hostname.00
1.6.01
1.5.0-autotest.20
1.5.0-autotest.11
1.5.0-autotest.01
1.5.00
1.5.0-setup.10
1.5.0-setup.00
1.5.0-beta.11
1.5.0-beta.00
1.4.00
1.4.0-beta.00
1.3.12
1.3.00
1.2.110
1.2.100
1.2.93
1.2.80
1.2.70
1.2.60
1.2.53
1.2.40
1.2.30
1.2.10
1.1.00
1.0.30
1.0.03

Package Sidebar

Install

npm i doc-detective-common

Weekly Downloads

124

Version

1.21.0

License

MIT

Unpacked Size

802 kB

Total Files

82

Last publish

Collaborators

  • hawkeyexl