Skip to content

Commit

Permalink
fix: 🚑 imports: append required .js ext
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTheRobot committed Dec 18, 2023
1 parent aed9d78 commit 2299c54
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/utils/cron.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CronJob } from 'cron';

import logger from '../log';
import logger from '../log.js';

export function createCron(
name: string,
Expand Down
8 changes: 4 additions & 4 deletions src/utils/healthcheck.ts
Original file line number Diff line number Diff line change
@@ -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<void> {
logger.info('Running health check');
Expand Down
4 changes: 2 additions & 2 deletions src/utils/resourceUtil.ts
Original file line number Diff line number Diff line change
@@ -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<void> {
const loadAvg = loadavg();
Expand Down
9 changes: 7 additions & 2 deletions src/utils/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2299c54

Please sign in to comment.