Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getComponent = (): NofloComponent => {
const c: NofloComponent = new noflo.Component()
/* META */
c.description = 'For a prompt, collect statements numbering up to a given maximum (or unlimited) from a list of participants'
c.icon = 'compress'
/* IN PORTS */
c.inPorts.add('max_responses', {
datatype: 'all', // string or number
description: 'the number of responses to stop collecting at, use "*" for any amount',
required: true
})
c.inPorts.add('max_time', {
datatype: 'int',
description: 'the number of seconds to wait until stopping this process automatically',
required: true
})
exports.getComponent = () => {
const c = new NoFlo.Component();
c.description = 'Get domain by id';
c.icon = 'user';
c.inPorts.add(PORT_IN, {
datatype: 'object',
description: 'Object with all parsed values.'
});
c.inPorts.add(PORT_REDIS, {
datatype: 'object',
description: 'Redis client'
});
c.outPorts.add(PORT_OUT, {
datatype: 'object'
});
var getComponent = function () {
var c = new noflo.Component();
c.description = 'Format a list of pairwise votes to a single string message';
c.icon = 'compress';
c.inPorts.add(MAIN_INPUT_STRING, {
datatype: 'array',
description: 'the list of reactions to format',
required: true
});
c.inPorts.add('anonymize', {
datatype: 'boolean',
description: 'whether to remove the information associating votes with people'
});
c.outPorts.add('formatted', {
datatype: 'string'
});
c.process(process);
return c;
exports.getComponent = () => {
const c = new NoFlo.Component();
c.description = 'Get Post Format by Action id';
c.icon = 'user';
c.inPorts.add(PORT_ACTION, {
datatype: 'object',
description: 'Object with all parsed values.'
});
c.inPorts.add(PORT_REDIS, {
datatype: 'object',
description: 'Redis client'
});
c.outPorts.add(PORT_OUT, {
datatype: 'object'
});
var getComponent = function () {
var c = new noflo.Component();
c.description = 'Format a list of pairwise freeform responses to a single string message';
c.icon = 'compress';
c.inPorts.add(MAIN_INPUT_STRING, {
datatype: 'array',
description: 'the list of reactions to format',
required: true
});
c.inPorts.add('anonymize', {
datatype: 'boolean',
description: 'whether to remove the information associating responses with people'
});
c.outPorts.add('formatted', {
datatype: 'string'
});
c.process(process);
return c;
exports.getComponent = () => {
const c = new NoFlo.Component();
c.description = 'Get all actions by agent id';
c.icon = 'user';
c.inPorts.add(PORT_IN, {
datatype: 'object',
description: 'Object with all parsed values.'
});
c.inPorts.add(PORT_DOMAIN, {
datatype: 'boolean',
description: 'Actioin Exists'
});
c.inPorts.add(PORT_REDIS, {
datatype: 'object',
description: 'Redis client'
exports.getComponent = () => {
const c = new noflo.Component();
c.icon = 'expand';
c.description = `This component receives data on a single input port and
sends the same data out to all connected output ports`;
c.inPorts.add('in', {
datatype: 'all',
description: 'Packet to be forwarded',
});
c.outPorts.add('out', {
datatype: 'all',
});
return c.process((input, output) => {
const data = input.get('in');
output.sendDone({ out: data });
exports.getComponent = () => {
const c = new noflo.Component();
c.description = 'Returns the value of a global variable.';
c.icon = 'usd';
c.inPorts.add('name', {
description: 'The name of the global variable.',
datatype: 'string',
});
c.outPorts.add('value', {
description: 'The value of the variable.',
});
c.outPorts.add('error', {
description: 'Any errors that occured reading the variables value.',
datatype: 'object',
});
exports.getComponent = () => {
const c = new NoFlo.Component();
c.description = 'Get Saying by id';
c.icon = 'user';
c.inPorts.add(PORT_IN, {
datatype: 'object',
description: 'Object with all parsed values.'
});
c.inPorts.add(PORT_REDIS, {
datatype: 'object',
description: 'Redis client'
});
c.outPorts.add(PORT_OUT, {
datatype: 'object'
});
const getComponent = () => {
const c = new noflo.Component()
c.description = ''
c.icon = 'handshake-o'
c.inPorts.add('mongo_uri', {
datatype: 'string',
description: 'The mongodb uri to connect to',
required: true
})
c.inPorts.add('database_name', {
datatype: 'string',
description: 'The name of the database',
required: true
})
c.inPorts.add('collection_name', {
datatype: 'string',
description: 'The name of the collection',
required: true