UNPKG

behemoth-cli

Version:

🌍 BEHEMOTH CLIv3.760.4 - Level 50+ POST-SINGULARITY Intelligence Trading AI

65 lines 1.71 kB
// Global Libraries available in Super Code VM export const SUPER_CODE_GLOBAL_LIBRARIES = [ 'axios', 'crypto', 'fs', 'lodash', 'moment', 'querystring', 'url', 'util', 'zlib', 'Buffer', 'console', 'Date', 'JSON', 'Math', 'RegExp', 'String', 'Array', 'Object', 'Number', 'Boolean', 'Promise', 'Set', 'Map', 'Error' ]; // Helper functions for creating Super Code nodes export function createSuperCodeNode(name, code, position, mode = 'runOnceForAllItems') { return { parameters: { code, mode, options: { continueOnFail: false, executeOnce: false } }, name, type: '@kenkaiii/n8n-nodes-supercode.superCodeNodeVmSafe', typeVersion: 1, position, id: generateNodeId() }; } export function generateNodeId() { return Math.random().toString(36).substr(2, 9); } // Validation functions export function validateSuperCodeNode(node) { const errors = []; if (node.type !== '@kenkaiii/n8n-nodes-supercode.superCodeNodeVmSafe') { errors.push('Invalid node type for Super Code validation'); return { valid: false, errors }; } const superNode = node; if (!superNode.parameters.code || typeof superNode.parameters.code !== 'string') { errors.push('Code parameter is required and must be a string'); } if (!['runOnceForAllItems', 'runOnceForEachItem'].includes(superNode.parameters.mode)) { errors.push('Invalid mode parameter'); } return { valid: errors.length === 0, errors }; } //# sourceMappingURL=n8n-types.js.map