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

37 lines
1.6 KiB
JavaScript

(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./utils"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCronExpression = void 0;
const utils_1 = require("./utils");
const toCronExpression = (item) => {
const randomSecond = (0, utils_1.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 = (0, utils_1.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();
};
exports.toCronExpression = toCronExpression;
});
//# sourceMappingURL=cron.js.map