Skip to content

Commit b316e6f

Browse files
committed
feat: breaking changes bug fixes and improvements
1 parent 7b46e64 commit b316e6f

6 files changed

Lines changed: 9 additions & 13 deletions

File tree

.env.example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PROJECT_THRESHOLD_MEMORY=1024
77
PROJECT_MAX_MEMORY=2048 # 2GB
88
PROJECT_AUTO_DOWNLOAD_MEDIA=true
99
PROJECT_MAX_DOWNLOAD_MEDIA=25 # 25MB
10+
NODE_ENV=development
1011

1112
P_QUEUE_CONCURRENCY_COUNT=2
1213

@@ -16,10 +17,6 @@ PHISHTANK_AUTO_UPDATE=true
1617

1718
SENTRY_DNS=
1819

19-
# whether to enable debug mode
20-
# in debug mode, additional logging is enabled
21-
DEBUG=true
22-
2320
# the command prefix used to trigger bot commands
2421
COMMAND_PREFIX=!
2522

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ Canis supports multiple AI providers out of the box:
8383
| `PHISHTANK_UPDATE_HOUR` || Hour to run daily update (UTC) | `3` |
8484
| `PHISHTANK_AUTO_UPDATE` || Automatically update PhishTank data | `true` |
8585
| `SENTRY_DNS` || Sentry DSN for error tracking | |
86-
| `DEBUG` | | Enable debug mode for extra logging | `true` |
86+
| `NODE_ENV` || Environment | `development` |
8787
| `COMMAND_PREFIX` || The command prefix used by the bot | `!` |
8888
| `COMMAND_PREFIX_LESS` || Allow commands without prefix | `true` |
89-
| `PORT` | | Port for running the server | `3000` |
89+
| `PORT` || Port for running the server | `3000` |
9090
| `PUPPETEER_EXEC_PATH` || Path to Chrome/Edge/Brave/Firefox for Puppeteer | `/opt/google/chrome/google-chrome` |
9191
| `AUTO_RELOAD` || Reload command files automatically when edited | `false` |
92-
| `DATABASE_URL` | | MySQL database connection URL | `mysql://root@127.0.0.1:3306/project_canis` |
93-
| `REDIS_URL` | | Redis connection URL | `redis://127.0.0.1:6379` |
92+
| `DATABASE_URL` || MySQL database connection URL | `mysql://root@127.0.0.1:3306/project_canis` |
93+
| `REDIS_URL` || Redis connection URL | `redis://127.0.0.1:6379` |
9494
| `AI_PROVIDER` || Preferred AI provider (`groq`, `openrouter`, etc.) | `groq` |
9595
| `OPEN_ROUTER_API_KEY` || API key for OpenRouter | |
9696
| `OPEN_ROUTER_MODEL` || OpenRouter model to use | `moonshotai/kimi-k2:free` |

src/components/utils/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import log from "npmlog";
22

3-
if (process.env.DEBUG === "false") {
3+
if (process.env.NODE_ENV === "production") {
44
const methodsToPatch = ["error", "warn"];
55

66
for (const method of methodsToPatch) {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import dotenv from "dotenv";
2-
dotenv.config({ quiet: true, debug: process.env.DEBUG === "true" });
2+
dotenv.config({ quiet: true, debug: process.env.NODE_ENV === "production" });
33

44
import "./instrument";
55
import { registerCronJobs } from "./cron";

src/instrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ Sentry.init({
55
// Setting this option to true will send default PII data to Sentry.
66
// For example, automatic IP address collection on events
77
sendDefaultPii: false,
8-
enabled: process.env.DEBUG !== "true",
8+
enabled: process.env.NODE_ENV === "production",
99
});

tests/sentry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import dotenv from "dotenv";
2-
dotenv.config({ quiet: true, debug: process.env.DEBUG === "true" });
2+
dotenv.config();
33
import * as Sentry from "@sentry/node";
44

55
Sentry.init({
66
dsn: process.env.SENTRY_DNS || "",
77
// Setting this option to true will send default PII data to Sentry.
88
// For example, automatic IP address collection on events
99
sendDefaultPii: false,
10-
enabled: process.env.DEBUG !== "true",
1110
});
1211

1312
const test =

0 commit comments

Comments
 (0)