New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

croncat

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

croncat - npm Package Compare versions

Comparing version 1.7.0-rc1 to 1.7.0-rc2

2

package.json
{
"name": "croncat",
"version": "1.7.0-rc1",
"version": "1.7.0-rc2",
"description": "cron.cat CLI and Agent Runner",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -112,5 +112,2 @@ import * as config from './configuration'

await checkAgentTaskBalance()
// Always ping heartbeat here, checks config
await util.pingHeartbeat()
}

@@ -143,2 +140,3 @@ agentBalanceCheckIdx++

} catch (ae) {
util.dbug(ae)
agentSettings = {}

@@ -145,0 +143,0 @@ // if no status, trigger a delayed retry

@@ -20,2 +20,6 @@ require('dotenv').config()

export const LOG_LEVEL = process.env.LOG_LEVEL || 'info'
export const HEARTBEAT = process.env.HEARTBEAT === 'true' ? true : false
export const HEARTBEAT_URL = process.env.HEARTBEAT_URL
export const SLACK_TOKEN = process.env.SLACK_TOKEN
export const SLACK_CHANNEL = process.env.SLACK_CHANNEL
export const BETA_FEATURES = process.env.BETA_FEATURES === 'true' ? true : false

@@ -22,0 +26,0 @@ export const WAIT_INTERVAL_MS = process.env.WAIT_INTERVAL_MS ? parseInt(`${process.env.WAIT_INTERVAL_MS}`) : 30000

@@ -14,5 +14,5 @@ import * as config from './configuration'

tasks.run()
// do the moar thinsg
// TODO: Remove once feature is fully launched in mainnet
if (config.BETA_FEATURES) triggers.run()
triggers.run()
}

@@ -24,2 +24,12 @@

// Setup heartbeat monitor if configured
if (config.HEARTBEAT) {
// loop and check agent status until its available
async function heartbeatPing() {
await util.pingHeartbeat()
setTimeout(heartbeatPing, config.WAIT_INTERVAL_MS * 2)
}
heartbeatPing()
}
if (isActive) runSubLoops()

@@ -26,0 +36,0 @@ else {

@@ -70,5 +70,5 @@ import * as config from './configuration'

await notifySlack(`*Attention!* Please add more funds to your account to continue sending transactions.\nCurrent Account Balance: *${utils.format.formatNearAmount(balance)}*`)
await util.notifySlack(`*Attention!* Please add more funds to your account to continue sending transactions.\nCurrent Account Balance: *${utils.format.formatNearAmount(balance)}*`)
}
}
}

@@ -10,3 +10,2 @@ import * as config from './configuration'

const agentId = config.AGENT_ACCOUNT_ID
const agentStatus = agent.currentStatus()
let skipThisIteration = false

@@ -27,4 +26,4 @@ let totalTasks = 0

totalTasks = parseInt(taskRes[0])
if (taskRes[1] === '0') console.log(`${chalk.gray(new Date().toISOString())} ${chalk.gray('[' + manager.account.connection.networkId.toUpperCase() + ' ' + agentStatus + ']')} Tasks: ${chalk.red(totalTasks)}, Current Slot: ${chalk.red('Paused')}`)
else console.log(`${chalk.gray(new Date().toISOString())} ${chalk.gray('[' + manager.account.connection.networkId.toUpperCase() + ' ' + agentStatus + ']')} Tasks: ${chalk.blueBright(totalTasks)}, Current Slot: ${chalk.yellow(taskRes[1])}`)
if (taskRes[1] === '0') console.log(`${chalk.gray(new Date().toISOString())} ${chalk.gray('[' + manager.account.connection.networkId.toUpperCase() + ' ' + agentId + ']')} Tasks: ${chalk.red(totalTasks)}, Current Slot: ${chalk.red('Paused')}`)
else console.log(`${chalk.gray(new Date().toISOString())} ${chalk.gray('[' + manager.account.connection.networkId.toUpperCase() + ' ' + agentId + ']')} Tasks: ${chalk.blueBright(totalTasks)}, Current Slot: ${chalk.yellow(taskRes[1])}`)

@@ -48,4 +47,4 @@ util.dbug('taskRes', taskRes)

})
util.dbug(res)
util.dbug(`${chalk.yellowBright('TX:' + res.transaction_outcome.id)}`)
// util.dbug(res)
if (res && res.transaction_outcome && res.transaction_outcome.id) util.dbug(`${chalk.yellowBright('TX:' + res.transaction_outcome.id)}`)
} catch (e) {

@@ -52,0 +51,0 @@ util.dbug('proxy_call issue', e)

@@ -27,3 +27,3 @@ import * as config from './configuration'

export const pingHeartbeat = async () => {
if (config.HEARTBEAT === 'true') {
if (config.HEARTBEAT && config.HEARTBEAT_URL) {
try {

@@ -30,0 +30,0 @@ await axios.get(config.HEARTBEAT_URL)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc