Files
Martien 5605b9b49a Initial commit: n8n Strike API node
- Add Strike API credentials configuration
- Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates)
- Add comprehensive operation descriptions for all resources
- Include CLAUDE.MD documentation
- Set up build configuration with TypeScript, ESLint, and Prettier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 11:00:38 +01:00

23 lines
1002 B
JavaScript

import { randomInt } from './utils';
export const toCronExpression = (item) => {
const randomSecond = randomInt(60);
if (item.mode === 'everyMinute')
return `${randomSecond} * * * * *`;
if (item.mode === 'everyHour')
return `${randomSecond} ${item.minute} * * * *`;
if (item.mode === 'everyX') {
if (item.unit === 'minutes')
return `${randomSecond} */${item.value} * * * *`;
const randomMinute = randomInt(60);
if (item.unit === 'hours')
return `${randomSecond} ${randomMinute} */${item.value} * * *`;
}
if (item.mode === 'everyDay')
return `${randomSecond} ${item.minute} ${item.hour} * * *`;
if (item.mode === 'everyWeek')
return `${randomSecond} ${item.minute} ${item.hour} * * ${item.weekday}`;
if (item.mode === 'everyMonth')
return `${randomSecond} ${item.minute} ${item.hour} ${item.dayOfMonth} * *`;
return item.cronExpression.trim();
};
//# sourceMappingURL=cron.js.map