1.16.0 • Published 1 day ago

doc-detective-common v1.16.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

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));

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

1 day ago

1.16.0-rc.1

4 days ago

1.16.0-rc.0

5 days ago

1.15.0

1 month ago

1.15.0-dev.1

1 month ago

1.15.0-dev.0

1 month ago

1.14.0

2 months ago

1.13.1

2 months ago

1.13.0

3 months ago

1.13.0-dev.0

3 months ago

1.12.0

3 months ago

1.12.0-dev.2

3 months ago

1.12.0-dev.1

4 months ago

1.12.0-dev.0

4 months ago

1.11.0

4 months ago

1.11.0-dev.3

4 months ago

1.11.0-dev.2

5 months ago

1.11.0-dev

5 months ago

1.11.0-dev.1

5 months ago

1.11.0-dev.0

5 months ago

1.5.0-setup.1

7 months ago

1.5.0-setup.0

7 months ago

1.9.0

7 months ago

1.8.0

7 months ago

1.7.0-dir.0

7 months ago

1.7.0

7 months ago

1.6.0

7 months ago

1.5.0

7 months ago

1.4.0

8 months ago

1.3.1

8 months ago

1.3.0

9 months ago

1.5.0-beta.0

7 months ago

1.6.0-hostname.0

7 months ago

1.5.0-beta.1

7 months ago

1.6.0-hostname.1

7 months ago

1.6.0-hostname.2

7 months ago

1.10.0-dev.0

6 months ago

1.9.0-record.0

7 months ago

1.8.0-px.1

7 months ago

1.5.0-autotest.1

7 months ago

1.8.0-px.0

7 months ago

1.5.0-autotest.0

7 months ago

1.5.0-autotest.2

7 months ago

1.4.0-beta.0

8 months ago

1.10.0

6 months ago

1.2.11

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.9

1 year ago

1.2.10

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago