From f85265a56833c3db257974cb97fc0cad619af227 Mon Sep 17 00:00:00 2001 From: Kieran Klukas <92754843+kcoderhtml@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:52:07 -0400 Subject: [PATCH] chore: rip out a bunch of stuff to make way for slack edge --- bun.lockb | Bin 115223 -> 117934 bytes package.json | 21 +++++- src/index.ts | 152 +++++++++---------------------------------- src/lib/templates.ts | 3 - 4 files changed, 49 insertions(+), 127 deletions(-) diff --git a/bun.lockb b/bun.lockb index 003f4fea2a862d046888c2b7a1ab83e2698b68ee..3c3fdeb622e1d1909d01c728bc865036f91d14fd 100755 GIT binary patch delta 22139 zcmeHvcU)9Q_x{e6RaeCh(wiWP(qWgPi>TPHy-|#1g%z;?0v0s75H+^ff}>u=ipE%D z>?Imwi3!G@#6*dWBqnOCiAgju`g_hTpzo{s<@2w8~A?rd~bBBz{7@4MfTt%mA1pY0gBjhPn?os7xRnCTVK>9eyhLEYM?5@gK zRr;&4fhwO1vc9e0CnZpD5wZaaIIhYas$8YYIgs^{K2en!s!UX6f+}~wz8cUwjDOUi zb>Q}p={1%3G;4Mm`5-$hH!nSh&t)}I*1!PNigUk5mr~KG;8ay_NYqx407*rgR2cwCPV<0-kp;)p zeCr^|lx#~*u60b#$Xsit?9BSA-X&GfY7HEkk&~NuM&VTorn&LqRr=Ygs(NEGvoo@- zFb(Nc{(UvyK2<*QRIKUXrKIOr#sv<^O3NRTpGO|i<>hBv12b}U5#EYDqbU;CCU7dx z!AG&DIwaYFp3EATsk7-esS$@E$q{=Y$)M-RNb)yT#`!7^+Xaa>7X(708w%31l+m*q zoJQAHG??5T*+j|TLY1SedBd{Oa&?x}RBLu#uFk`s^xDAlSy>}8VEI@}PCm8RIx;^u z!=lqgHPz{yQIJ0*^-Lp3>X{mlWWir3fFwU>=OlOr@Y{ACwoc6zE2AMv*OHr`nTj$k z898~DAtS9Lv(hZN!*seaEfgcHkffIysML`HPEN=|9_oE-kWS|X`7Bvt#dQPKA?$@ba`8X!QE;Q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L;PkH-F7 zg6;V!?3Oo|q=u#AEGhQIA?d7+-nT!**^Rm?HW6b}_%)r?g)-Hr-JiS=cD#+B=Gf_U zHEZIGw=ZH4>Ei$f7$$T8fv2*PB$(6AZG*$pQnu`^oi&LmH!YC zPopxr{=2wq_Y>{bBy6hphZuglIiRWEpK*67_oKKka*S*(Qm`9ZH6C&R23&!8Q zEc=Stj6nRwJjd!ZZaX5}#==!ohnB}%#M$ewH(Gtu1r>FkuSQ}Y!xA6LldjKLJrY%|!x<;GNtQUPEyZMAm z#?P$$_`%J~XV2`}BVvptBkr8WAwljIx-1jNI-L39M`8{1N>saKLgKhLJQL^Zd3cCL zA7Y1(+5X#4HMVBD=;uca*0MzPJZXxPrYetM!|7BwicW`yIpee_j&6Eun)Ulo^EQ6m zrRmq|)N551AJV!hJ^^SaZeb`~eBSnu^$*(~qT5kz@F=`Cx_3RQUBufHVPkjet;o5i0%1q=Yu8t-M)pP2pB@ZDtFem z=i#QGS4Z6&w-qJyWB_Z;t+ToS2BM6gka^Mbc0zNrH$Gh(8pe;ztSNgZr>y$u1)5cS z8p2mKdgF3pXZ8D0Y$!hV_s_y3BjZP9#wRR((e|X9gZ^O~(JuelnbGc{@lWJ(!cmT@GRYB5<33Cd8NV#k?q-V<2VVXB9hA@=7%?-as3D^H5vkfM5IgJ-9xow8wRVv7F2 zWywJIg!Jo{b}kH~fKQT<%`ijqvvF8`t*3epno-8@*$he?>{M?~&#P!tgxUDTn8Jxvn*MEpT<#kqxJIg`MjGPG`$47w)gxHn2(DkrBvn zMaG$X|2j5#7%#Ph(-Wy4Lwoddoc`9a+2D1-?JHtGzI&|m#x$-x!OR@IU*K4bLQjI7MDV>9xam;Ah*b(Gbw4ly6Kcm->qh8$*9 LN|H9RA&veIGqHp% diff --git a/package.json b/package.json index cf8bf60..3f07130 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,10 @@ "keywords": [], "author": "Jasper Mayone ", "dependencies": { +<<<<<<< HEAD "@prisma/client": "^5.16.1", +======= +>>>>>>> 707274a (chore: rip out a bunch of stuff to make way for slack edge) "@slack/bolt": "^3.18.0", "@slack/web-api": "^7.0.4", "@types/express": "^4.17.21", @@ -29,6 +32,10 @@ "colors": "^1.4.0", "cron": "^3.1.7", "dotenv": "^16.4.5", +<<<<<<< HEAD +======= + "elysia": "^1.0.26", +>>>>>>> 707274a (chore: rip out a bunch of stuff to make way for slack edge) "express": "^4.19.2", "form-data": "^4.0.0", "js-yaml": "^4.1.0", @@ -37,6 +44,10 @@ "nodemon": "^3.0.3", "postgres": "^3.4.4", "response-time": "^2.3.2", +<<<<<<< HEAD +======= + "slack-edge": "^0.13.2", +>>>>>>> 707274a (chore: rip out a bunch of stuff to make way for slack edge) "tsx": "^4.9.3", "yaml": "^2.4.5" }, @@ -45,13 +56,21 @@ "@types/js-yaml": "^4.0.9", "@types/node-statsd": "^0.1.6", "@types/response-time": "^2.3.8", +<<<<<<< HEAD "prisma": "^5.16.1", "ts-node": "^10.9.2", "tsx": "^4.9.3", +======= + "ts-node": "^10.9.2", +>>>>>>> 707274a (chore: rip out a bunch of stuff to make way for slack edge) "typescript": "^5.4.5" }, "engines": { "node": ">=20.0.0", "pnpm": ">=9.4.0" } -} \ No newline at end of file +<<<<<<< HEAD +} +======= +} +>>>>>>> 707274a (chore: rip out a bunch of stuff to make way for slack edge) diff --git a/src/index.ts b/src/index.ts index f7cb58c..58c9738 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,8 @@ -import dotenv from "dotenv"; -dotenv.config(); - -import { PrismaClient } from "@prisma/client"; -import { App, ExpressReceiver } from "@slack/bolt"; -import axios from "axios"; +import { SlackApp } from "slack-edge"; import colors from "colors"; -import { CronJob } from "cron"; -import express from "express"; -import responseTime from "response-time"; +import CronJob from "cron"; + +import { Elysia } from "elysia"; import { indexEndpoint } from "./endpoints"; import { healthEndpoint } from "./endpoints/health"; @@ -15,126 +10,45 @@ import { t } from "./lib/templates"; import metrics from "./metrics"; import { blog, slog } from "./util/Logger"; -const receiver = new ExpressReceiver({ - signingSecret: process.env.SLACK_SIGNING_SECRET!, -}); - -const app = new App({ - token: process.env.SLACK_BOT_TOKEN!, - appToken: process.env.SLACK_APP_TOKEN!, - signingSecret: process.env.SLACK_SIGNING_SECRET!, - receiver, +const app = new SlackApp({ + env: { + SLACK_BOT_TOKEN: process.env.SLACK_BOT_TOKEN!, + SLACK_SIGNING_SECRET: process.env.SLACK_SIGNING_SECRET!, + SLACK_APP_TOKEN: process.env.SLACK_APP_TOKEN!, + SLACK_LOGGING_LEVEL: "INFO", + }, + startLazyListenerAfterAck: true }); -const prisma = new PrismaClient(); - -app.event(/.*/, async ({ event, client }) => { +app.event("team_join", async ({ context, payload }) => { try { - metrics.increment(`slack.event.${event.type}`); - switch (event.type) { - case "team_join": - break; - } + metrics.increment(`slack.event.${payload.type}`); } catch (error) { blog(`Error in event handler: ${error}`, "error"); metrics.increment("slack.event.error"); } }); -app.action(/.*?/, async (args) => { - try { - const { ack, respond, payload, client, body } = args; - const user = body.user.id; - - await ack(); +const elysia = new Elysia() + .get("/", indexEndpoint) + .get("/ping", healthEndpoint) + .get("/up", healthEndpoint) + .listen(3000); - // @ts-ignore - metrics.increment(`slack.action.${payload.value}`); - - // @ts-ignore - switch (payload.action_id) { - case "initial": - metrics.increment("slack.action.initial"); - break; - } - } catch (error) { - blog(`Error in action handler: ${error}`, "error"); - metrics.increment("slack.action.error"); - } -}); - -app.command(/.*?/, async ({ ack, body, client }) => { - try { - await ack(); - metrics.increment(`slack.command.${body.command}`); - // This is not used - } catch (error) { - blog(`Error in command handler: ${error}`, "error"); - metrics.increment("slack.command.error"); - } -}); - -receiver.router.use(express.json()); -receiver.router.get("/", indexEndpoint); -receiver.router.get("/ping", healthEndpoint); -receiver.router.get("/up", healthEndpoint); +export default { + port: 3000, + async fetch(request: Request) { + return await app.run(request); + }, +} -receiver.router.use( - responseTime((req, res, time) => { - const stat = (req.method + "/" + req.url?.split("/")[1]) - .toLowerCase() - .replace(/[:.]/g, "") - .replace(/\//g, "_"); +let env = process.env.NODE_ENV; +slog(t("app.startup", { environment: env }), "info"); - const httpCode = res.statusCode; - const timingStatKey = `http.response.${stat}`; - const codeStatKey = `http.response.${stat}.${httpCode}`; - metrics.timing(timingStatKey, time); - metrics.increment(codeStatKey, 1); - }) +console.log( + colors.bgCyan(`⚡️ Bolt app is running in env ${process.env.NODE_ENV}`) ); -app.use(async ({ payload, next }) => { - metrics.increment(`slack.request.${payload.type}`); - await next(); -}); - -// Add metric interceptors for axios -axios.interceptors.request.use((config: any) => { - config.metadata = { startTs: performance.now() }; - return config; -}); - -axios.interceptors.response.use((res: any) => { - const stat = (res.config.method + "/" + res.config.url?.split("/")[1]) - .toLowerCase() - .replace(/[:.]/g, "") - .replace(/\//g, "_"); - - const httpCode = res.status; - const timingStatKey = `http.request.${stat}`; - const codeStatKey = `http.request.${stat}.${httpCode}`; - metrics.timing( - timingStatKey, - performance.now() - res.config.metadata.startTs - ); - metrics.increment(codeStatKey, 1); - - return res; -}); - -const logStartup = async (app: App) => { - let env = process.env.NODE_ENV; - slog(t("app.startup", { environment: env }), "info"); -}; - -app.start(process.env.PORT || 3000).then(async () => { - await logStartup(app); - console.log( - colors.bgCyan(`⚡️ Bolt app is running in env ${process.env.NODE_ENV}`) - ); -}); - // Heartbeat new CronJob( "0 * * * * *", @@ -146,13 +60,5 @@ new CronJob( "America/New_York" ); -// new CronJob( -// "0 * * * * *", -// function() -// null, -// true, -// "America/New_York" -// ); - const client: any = app.client; export { app, client }; diff --git a/src/lib/templates.ts b/src/lib/templates.ts index 4d147ab..72c58f0 100644 --- a/src/lib/templates.ts +++ b/src/lib/templates.ts @@ -29,9 +29,6 @@ function flatten(obj: any, prefix: string = "") { const templates = flatten(templatesRaw); -const pfpFile = fs.readFileSync("./src/lib/arcadius.yaml", "utf8"); -export const pfps = parse(pfpFile); - export function t(template: template, data: data) { // return (randomChoice(templates[template]) as string).replace(/\${(.*?)}/g, (_, key) => (data as any)[key]) return t_format(t_fetch(template), data);