Machines.validate()

Validate the specified machine definition.

Note that this expects the expanded version of a machine (i.e. `inputs` and `exits` are arrays, they have id properties, and exit examples are called "outputExample")

Usage

Hover over inputs/exits for more info.

var Machines = require('machinepack-machines');


// Validate the specified machine definition.

Machines.validate({

machineDef: '===',

ensureSuccessOutput: false,

ensureCacheable: false,

successExitId: 'success',

}).execSync();

Inputs

machineDef required

The machine to validate.

'==='
ensureSuccessOutput

If set, the machine definition will be checked to make sure it has a success exit with an inferable type schema.

false
ensureCacheable

If set, the machine definition will be checked to make sure it has `cacheable: true`.

false
successExitId

The exit id of the `success` exit (you should generally leave this option blank)

'success'

Exits

error

An unexpected error occurred.

success

OK.

[ {} ]