File tree Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Expand file tree Collapse file tree 5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 55 "description" : " " ,
66 "version" : " 1.0.0" ,
77 "private" : true ,
8+ "type" : " module" ,
89 "scripts" : {
910 "build" : " tsc" ,
1011 "start" : " npm run build && node dist/index.js" ,
Original file line number Diff line number Diff line change 1- import { fetchLatestQuestions } from './services/stackoverflow' ;
2- import { formatBody } from './utils/htmlFormatter' ;
3- import { sendQuestion } from './services/notifier' ;
4- import { loadSentIds , saveSentIds } from './services/persistence' ;
1+ import { fetchLatestQuestions } from './services/stackoverflow.js ' ;
2+ import { formatBody } from './utils/htmlFormatter.js ' ;
3+ import { sendQuestion } from './services/notifier.js ' ;
4+ import { loadSentIds , saveSentIds } from './services/persistence.js ' ;
55
66const sent = await loadSentIds ( ) ;
77const questions = await fetchLatestQuestions ( ) ;
Original file line number Diff line number Diff line change 11import { WebhookClient , EmbedBuilder } from "discord.js" ;
22
3- import { Question } from "./stackoverflow" ;
4- import { env } from "../config/env" ;
3+ import { Question } from "./stackoverflow.js " ;
4+ import { env } from "../config/env.js " ;
55
66const webhook = new WebhookClient ( {
77 id : env . DISCORD_WEBHOOK_ID ,
Original file line number Diff line number Diff line change 11import fs from 'node:fs/promises' ;
22import cp from 'node:child_process' ;
33import path from 'node:path' ;
4+ import { fileURLToPath } from 'node:url' ;
5+
6+ const __filename = fileURLToPath ( import . meta. url ) ;
7+ const __dirname = path . dirname ( __filename ) ;
48
59const DATA_FILE = path . resolve ( __dirname , '../../data/sentIds.json' ) ;
610
Original file line number Diff line number Diff line change 1- import { env } from "../config/env" ;
1+ import { env } from "../config/env.js " ;
22
33export interface Question {
44 question_id : number ;
You can’t perform that action at this time.
0 commit comments