Compare commits

...

4 Commits

Author SHA1 Message Date
Gitea Actions
abdc3cb6db ci: Bump version to 0.9.96 [skip ci] 2026-01-13 00:52:54 +05:00
7a1bd50119 unit test repairs
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 17m42s
2026-01-12 11:51:48 -08:00
Gitea Actions
87d75d0571 ci: Bump version to 0.9.95 [skip ci] 2026-01-13 00:04:10 +05:00
faf2900c28 unit test repairs
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m43s
2026-01-12 10:58:00 -08:00
7 changed files with 41 additions and 7 deletions

View File

@@ -628,6 +628,37 @@ pm2 restart all
### Step 13: Test Error Tracking
You can test Bugsink is working before configuring the flyer-crawler application.
Switch to the bugsink user and open a Python shell:
```bash
sudo su - bugsink
source venv/bin/activate
bugsink-manage shell
```
In the Python shell, send a test message using the **backend DSN** from Step 11:
```python
import sentry_sdk
sentry_sdk.init("https://YOUR_BACKEND_KEY@bugsink.yourdomain.com/1")
sentry_sdk.capture_message("Test message from Bugsink setup")
exit()
```
Exit back to root:
```bash
exit
```
Check the Bugsink UI - you should see the test message appear in the `flyer-crawler-backend` project.
### Step 14: Test from Flyer-Crawler Application (After App Setup)
Once the flyer-crawler application is installed and configured with the DSNs from Step 12:
```bash
cd /opt/flyer-crawler
npx tsx scripts/test-bugsink.ts

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "flyer-crawler",
"version": "0.9.94",
"version": "0.9.96",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "flyer-crawler",
"version": "0.9.94",
"version": "0.9.96",
"dependencies": {
"@bull-board/api": "^6.14.2",
"@bull-board/express": "^6.14.2",

View File

@@ -1,7 +1,7 @@
{
"name": "flyer-crawler",
"private": true,
"version": "0.9.94",
"version": "0.9.96",
"type": "module",
"scripts": {
"dev": "concurrently \"npm:start:dev\" \"vite\"",

View File

@@ -73,7 +73,7 @@ vi.mock('../middleware/multer.middleware', () => {
})),
handleMulterError: vi.fn((err: any, _req: any, res: any, next: any) => {
// Only handle multer-specific errors, pass others to the error handler
if (err instanceof multer.MulterError) {
if (err && err.name === 'MulterError') {
return res.status(400).json({ success: false, error: { message: err.message } });
}
// Pass non-multer errors to the next error handler

View File

@@ -72,7 +72,8 @@ describe('ExpiryRepository', () => {
const result = await repo.addInventoryItem(
'user-1',
{
// item_name intentionally omitted to test master item lookup
// item_name is required by type but will be overwritten by master item lookup
item_name: '',
master_item_id: 100,
quantity: 2,
unit: 'liters',

View File

@@ -3,6 +3,8 @@ import { mockLogger } from '../utils/mockLogger';
// Globally mock the logger service so individual test files don't have to.
// This ensures 'import { logger } from ...' always returns the mock.
// IMPORTANT: Must also export createScopedLogger as it's used by aiService.server.ts
vi.mock('../../services/logger.server', () => ({
logger: mockLogger,
}));
createScopedLogger: vi.fn(() => mockLogger),
}));

View File

@@ -400,7 +400,7 @@ const { mockServerLogger, mockCreateScopedLogger } = vi.hoisted(() => {
};
});
vi.mock(import('../../services/logger.server'), () => ({
vi.mock('../../services/logger.server', () => ({
logger: mockServerLogger,
createScopedLogger: mockCreateScopedLogger,
}));