diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f52668b..8b8b6cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 22.x - name: Installling dependencies run: npm install diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9d6904f..775f7f9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 22.x - name: Installling dependencies run: npm install diff --git a/.nvmrc b/.nvmrc index 85aee5a..92f279e 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20 \ No newline at end of file +v22 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 426678b..139cbcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.9.0-bookworm +FROM node:22.5.1-bookworm WORKDIR /app diff --git a/package-lock.json b/package-lock.json index 5275f13..d278896 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "qrcode": "^1.5.3", "sanitize-html": "^2.13.0", "telegraf": "^4.16.3", - "tempura": "^0.4.0" + "tempura": "^0.4.1" }, "devDependencies": { "@teknologi-umum/eslint-config-base": "^0.0.11", @@ -3018,9 +3018,10 @@ } }, "node_modules/tempura": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tempura/-/tempura-0.4.0.tgz", - "integrity": "sha512-ghCAK7t3Yuy40NUA/pmS1aDY8M5MfZT4+S465S8YvwwDdgk3jLm/5BGwtMG/rMICDYY8T7Owe1qm91ArBOKd6w==", + "version": "0.4.1", + "resolved": "https://npmjs.teknologiumum.com/tempura/-/tempura-0.4.1.tgz", + "integrity": "sha512-NQ4Cs23jM6UUp3CcS5vjmyjTC6dtA5EsflBG2cyG0wZvP65AV26tJ920MGvTRYIImCY13RBpOhc7q4/pu+FG5A==", + "license": "MIT", "engines": { "node": ">=10" } @@ -5495,9 +5496,9 @@ } }, "tempura": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tempura/-/tempura-0.4.0.tgz", - "integrity": "sha512-ghCAK7t3Yuy40NUA/pmS1aDY8M5MfZT4+S465S8YvwwDdgk3jLm/5BGwtMG/rMICDYY8T7Owe1qm91ArBOKd6w==" + "version": "0.4.1", + "resolved": "https://npmjs.teknologiumum.com/tempura/-/tempura-0.4.1.tgz", + "integrity": "sha512-NQ4Cs23jM6UUp3CcS5vjmyjTC6dtA5EsflBG2cyG0wZvP65AV26tJ920MGvTRYIImCY13RBpOhc7q4/pu+FG5A==" }, "test-exclude": { "version": "6.0.0", diff --git a/package.json b/package.json index 56b7242..47a457a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "qrcode": "^1.5.3", "sanitize-html": "^2.13.0", "telegraf": "^4.16.3", - "tempura": "^0.4.0" + "tempura": "^0.4.1" }, "devDependencies": { "@teknologi-umum/eslint-config-base": "^0.0.11", diff --git a/src/services/eval/index.js b/src/services/eval/index.js index 762b884..7f1fa7b 100644 --- a/src/services/eval/index.js +++ b/src/services/eval/index.js @@ -1,9 +1,4 @@ import { safeEval } from "./parser.js"; -import { - resolveCryptoCurrencies, - resolveCurrencyRates, - resolveStocks -} from "./superpowers.js"; import { getCommandArgs } from "#utils/command.js"; import { logger } from "#utils/logger/logtail.js"; @@ -16,9 +11,12 @@ async function evalCommand(context) { const source = getCommandArgs("eval", context); const output = await safeEval(source, [ - resolveCurrencyRates, - resolveStocks, - resolveCryptoCurrencies + // XXX(reinaldy): Since we're saving cost by reducing the number of VPS we own, + // we're disabling these features. They're making a HTTP call to one of our + // internal API, which is not available in the current setup. + // resolveCurrencyRates, + // resolveStocks, + // resolveCryptoCurrencies ]); await context.replyWithMarkdown(`