diff --git a/src/utils/cron.ts b/src/utils/cron.ts index a11f46f..ed3df73 100644 --- a/src/utils/cron.ts +++ b/src/utils/cron.ts @@ -1,6 +1,6 @@ import { CronJob } from 'cron'; -import logger from '../log'; +import logger from '../log.js'; export function createCron( name: string, diff --git a/src/utils/healthcheck.ts b/src/utils/healthcheck.ts index e954d09..8e0d8a4 100644 --- a/src/utils/healthcheck.ts +++ b/src/utils/healthcheck.ts @@ -1,9 +1,9 @@ import checkDiskSpace from 'check-disk-space'; -import { FS_FREE_SPACE_MIN } from '../config'; -import logger from '../log'; -import { checkResourceUtilisation } from './resourceUtil'; -import sendWebhookMessage from './webhook'; +import { FS_FREE_SPACE_MIN } from '../config.js'; +import logger from '../log.js'; +import { checkResourceUtilisation } from './resourceUtil.js'; +import sendWebhookMessage from './webhook.js'; export async function runHealthCheck(): Promise { logger.info('Running health check'); diff --git a/src/utils/resourceUtil.ts b/src/utils/resourceUtil.ts index 2f790ec..0fa83b5 100644 --- a/src/utils/resourceUtil.ts +++ b/src/utils/resourceUtil.ts @@ -1,8 +1,8 @@ import { spawn } from 'child_process'; import { cpus, freemem, loadavg, totalmem } from 'os'; -import { HIGH_LOAD_CRITICAL } from '../config'; -import sendWebhookMessage from './webhook'; +import { HIGH_LOAD_CRITICAL } from '../config.js'; +import sendWebhookMessage from './webhook.js'; export async function checkResourceUtilisation(): Promise { const loadAvg = loadavg(); diff --git a/src/utils/webhook.ts b/src/utils/webhook.ts index 6fc553d..a9a2b97 100644 --- a/src/utils/webhook.ts +++ b/src/utils/webhook.ts @@ -2,8 +2,13 @@ import AsyncRetry from 'async-retry'; import Axios from 'axios'; -import { NODE_NAME, PDUTY_ROUTING_KEY, PING_ID, WEBHOOK_URL } from '../config'; -import logger from '../log'; +import { + NODE_NAME, + PDUTY_ROUTING_KEY, + PING_ID, + WEBHOOK_URL, +} from '../config.js'; +import logger from '../log.js'; export default async function sendWebhookMessage({ name,