XIBLEDOCS

In order for XIBLE to find installed nodes, a certain structure is required. The structure for these nodes is described in the following sections.

For nodepacks, a combination of nodes, checkout the nodepacks guide.

Directory

The directory structure for a node is defined as follows;

  • {nodename}/
    • structure.json
    • index.js
    • routes/ (optional)
      • flow.js
      • global.js
    • editor/ (optional)
      • index.htm
      • ...

Check out the nodepack structure page for a full description of a nodepack structure. On that page, note the requirements for node names part of a nodepack.

Implementation examples

structure.json

The structure.json is the file that lets XIBLE recognize the directory where the structure.json resides in as a XIBLE node.

Parameters

path type description
name String The name of your node. If this node is part of a nodepack, the node name must start with the nodepack name followed by a dot. For example, the nodepack "timing" contains a node "timing.delay"
type String The type of node. Must be one of;
  • object; This type of node references an object (any type of data really) which can be used in other nodes.
  • action; This type of node takes an action. For instance: modifying the filesystem, logging to console, changing the state of a switch, etc.
  • event; A node which will be triggered by an event.
description String The description for your node.
inputs Object A list of all inputs for the node.
  inputs.type String | null The type of the input. Only connectors coming from an output with the same type can be hooked up, unless the output is of type 'null'.
Note that outputs that do not have a type assigned after the flow is saved, will not return any values when an instance is running.
  inputs.description String Description of the input. Visible in the editor by opening the detail view on the node.
  inputs.assignsInputTypes String[] Changes the type of the input as defined in this value (by name) to the type of this input.
  inputs.assignsOutputTypes String[] Changes the type of the output as defined in this value (by name) to the type of this input.
  inputs.maxConnectors Number Specifies the maximum amount of connectors that may connected to this input. Defaults to infinite.
outputs Object A list of all outputs for the node.
  outputs.type String | null The type of the output. Only connectors coming from an input with the same type can be hooked up, unless the input is of type 'null'.
  outputs.description String Description of the outputs. Visible in the editor by opening the detail view on the node.
  outputs.maxConnectors Number Specifies the maximum amount of connectors that may connected to this output. Defaults to infinite.
dataStructure Object A list of all data fields which a user can set on the node within a flow. Further information including the full parameters list can be found in the data guide. These values are exposed to the node through the node.getData() method.
vault String[] Specifies data fields to store in the vault. Just like non-vaulted fields, they are available in the node.data map

Changes

version availability
>= 0.1.0 General availability.
>= 0.2.0 Added inputs.singleType.
>= 0.6.0 Added inputs.assignsOutputType.
>= 0.8.0 Added inputs.assignsInputType.
>= 0.10.0
  • Deprecated singular assignsInputType and assignsOutputType in favor of their plural forms.
  • Added maxConnectors on both the input and output side.
>= 0.24.0
  • Introduced the 'dataStructure' object. (#95)

Synopsis

{  "name": String,  "type": ["object", "action", "event"],  "description": String,  "inputs": {    [String]: {      "type": String | null,      ["description"]: String,      ["assignsInputTypes"]: [        String,        ...      ]      ["assignsOutputTypes"]: [        String,        ...      ],      ["maxConnectors"]: Number    },    ...  },  "outputs": {    [String]: {      "type": String | null,      ["description"]: String,      ["maxConnectors"]: Number    },    ...  },  "dataStructure": {    [String]: {      "type": String,      ["required"]: Boolean    },    ...  },  ["vault"]: [    String,    ...  ]}