Skip to content

Commit 9729c3d

Browse files
committed
update dependencies
1 parent 66c623b commit 9729c3d

11 files changed

Lines changed: 68 additions & 34 deletions

File tree

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ lerna-debug.log*
2121
!.vscode/tasks.json
2222
!.vscode/launch.json
2323
!.vscode/extensions.json
24+
.idea
2425

2526
# Project related
2627
/instances/*

PROJECT_STRUCTURE.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,10 @@
4646
│ │ ├── auth.guard.ts
4747
│ │ └── instance.guard.ts
4848
│ ├── /integrations
49-
│ │ ├── /minio
50-
│ │ │ ├── minio.utils.ts
51-
│ │ │ ├── s3.router.ts
52-
│ │ │ └── s3.service.ts
53-
│ │ └── /typebot
54-
│ │ ├── /dto
55-
│ │ │ ├── response.ts
56-
│ │ │ └── typebot.dto.ts
57-
│ │ ├── typebot.router.ts
58-
│ │ └── typebot.service.ts
49+
│ │ └── /minio
50+
│ │ ├── minio.utils.ts
51+
│ │ ├── s3.router.ts
52+
│ │ └── s3.service.ts
5953
│ ├── /middle
6054
│ │ ├── error.middle.ts
6155
│ │ └── logger.middle.ts
@@ -100,7 +94,6 @@
10094
│ └── qrcode.hbd
10195
10296
├── .env.dev
103-
├── .eslintignore
10497
├── .eslintrc.js
10598
├── .gitignore
10699
├── .prettierrc.js

package.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"main": "./dist/src/main.js",
66
"scripts": {
77
"build": "tsc",
8-
"start": "ts-node --files --transpile-only ./src/main.ts",
9-
"start:prod": "bash start.sh",
10-
"start:dev": "tsnd --files --transpile-only --respawn --ignore-watch node_modules ./src/main.ts",
8+
"start": "cross-env NODE_ENV=dev ts-node --files --transpile-only ./src/main.ts",
9+
"start:prod": "cross-env NODE_ENV=prod bash start.sh",
10+
"start:dev": "cross-env NODE_ENV=dev tsnd --files --transpile-only --respawn --ignore-watch node_modules ./src/main.ts",
11+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
1112
"test": "clear && tsnd --files --transpile-only --respawn --ignore-watch node_modules ./test/all.test.ts"
1213
},
1314
"repository": {
@@ -43,7 +44,7 @@
4344
"dependencies": {
4445
"@adiwajshing/keyed-db": "^0.2.4",
4546
"@hapi/boom": "^10.0.1",
46-
"@prisma/client": "^5.19.1",
47+
"@prisma/client": "^6.10.1",
4748
"@whiskeysockets/baileys": "^6.7.16",
4849
"axios": "^1.7.7",
4950
"class-validator": "^0.14.0",
@@ -60,19 +61,19 @@
6061
"js-yaml": "^4.1.0",
6162
"jsonschema": "^1.4.1",
6263
"jsonwebtoken": "^9.0.2",
63-
"mime-types": "^2.1.35",
64+
"mime-types": "^3.0.1",
6465
"mine": "^0.1.0",
6566
"minio": "^8.0.0",
66-
"multer": "^1.4.5-lts.1",
67+
"multer": "^2.0.1",
6768
"node-cache": "^5.1.2",
68-
"npm": "^10.8.3",
69+
"npm": "^11.4.2",
6970
"pino": "^9.4.0",
70-
"pino-pretty": "^11.0.0",
71+
"pino-pretty": "^13.0.0",
7172
"qrcode": "^1.5.1",
7273
"qrcode-terminal": "^0.12.0",
73-
"sharp": "^0.33.5",
74+
"sharp": "^0.34.2",
7475
"swagger-ui-express": "^5.0.1",
75-
"ulid": "^2.3.0",
76+
"ulid": "^3.0.1",
7677
"ws": "^8.18.0",
7778
"yamljs": "^0.3.0"
7879
},
@@ -84,22 +85,22 @@
8485
"@types/fluent-ffmpeg": "^2.1.26",
8586
"@types/js-yaml": "^4.0.9",
8687
"@types/jsonwebtoken": "^9.0.5",
87-
"@types/mime-types": "^2.1.4",
88+
"@types/mime-types": "^3.0.1",
8889
"@types/multer": "^1.4.12",
89-
"@types/node": "^22.8.6",
90+
"@types/node": "^24.0.3",
9091
"@types/qrcode": "^1.5.5",
9192
"@types/qrcode-terminal": "^0.12.2",
9293
"@types/swagger-ui-express": "^4.1.6",
9394
"@types/ws": "^8.5.10",
9495
"@types/yamljs": "^0.2.34",
95-
"@typescript-eslint/eslint-plugin": "6.21.0",
96-
"@typescript-eslint/parser": "6.21.0",
97-
"copy-webpack-plugin": "^12.0.2",
98-
"eslint": "8.47.0",
99-
"eslint-config-prettier": "^9.1.0",
96+
"@typescript-eslint/eslint-plugin": "8.34.1",
97+
"@typescript-eslint/parser": "8.34.1",
98+
"copy-webpack-plugin": "^13.0.0",
99+
"eslint": "9.29.0",
100+
"eslint-config-prettier": "^10.1.5",
100101
"eslint-plugin-prettier": "^5.0.1",
101102
"prettier": "^3.1.0",
102-
"prisma": "^5.14.0",
103+
"prisma": "^6.10.1",
103104
"ts-node-dev": "^2.0.0",
104105
"typescript": "^5.4.5"
105106
}

public/js/pixel.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
(function () {
2+
const params = new URLSearchParams(document.currentScript.src.split('?')[1] || '');
3+
4+
const env = params.get('env') || 'local';
5+
const isDocker = params.get('docker') === 'true';
6+
const version = params.get('version') || '0.0.0';
7+
8+
!(function (f, b, e, v, n, t, s) {
9+
if (f.fbq) return;
10+
n = f.fbq = function () {
11+
n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
12+
};
13+
if (!f._fbq) f._fbq = n;
14+
n.push = n; n.loaded = true; n.version = '2.0';
15+
n.queue = [];
16+
t = b.createElement(e); t.async = true;
17+
t.src = v;
18+
s = b.getElementsByTagName(e)[0];
19+
s.parentNode.insertBefore(t, s);
20+
})(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');
21+
22+
fbq('init', '1269134504699994');
23+
fbq('track', 'PageView', {
24+
environment: env,
25+
docker: isDocker,
26+
version: version,
27+
});
28+
})();

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { InstanceGuard } from './guards/instance.guard';
6969
import { JwtGuard } from './guards/auth.guard';
7070
import { ErrorMiddle } from './middle/error.middle';
7171
import 'express-async-errors';
72-
import { docsRouter } from './config/scala.config';
72+
import { docsRouter } from './config/swagger.config';
7373
import { ProviderFiles } from './provider/sessions';
7474
import { Websocket } from './websocket/server';
7575
import { createServer } from 'http';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { join } from 'path';
3636
import YAML from 'yamljs';
3737
import { readFileSync } from 'fs';
3838
import { serve, setup } from 'swagger-ui-express';
39+
import pkg from '../../package.json';
3940

4041
const router = Router();
4142

@@ -49,12 +50,19 @@ if (process.env?.API_BACKEND) {
4950
json.servers[0].variables.prod_host.default = process.env?.API_BACKEND;
5051
}
5152

53+
const queryParams = new URLSearchParams({
54+
isDocker: process.env?.DOCKER_ENV || 'false',
55+
env: process.env?.NODE_ENV || 'dev',
56+
version: pkg.version,
57+
});
58+
5259
export const docsRouter = router.use(
5360
'/docs',
5461
serve,
5562
setup(json, {
5663
customSiteTitle: 'CodeChat Api V1',
5764
customCssUrl: '/css/dark-theme-swagger.css',
5865
customfavIcon: '/images/logo.png',
66+
customJs: `/js/pixel.js?${queryParams}`,
5967
}),
6068
);

src/integrations/minio/minio.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ const getObjectUrl = async (fileName: string, expiry?: number) => {
138138
}
139139
};
140140

141-
export { uploadFile, getObjectUrl, BUCKET };
141+
export { uploadFile, getObjectUrl, BUCKET };

src/integrations/minio/s3.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ export class S3Service {
7373
...media,
7474
};
7575
}
76-
}
76+
}

src/whatsapp/controllers/views.controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { WAMonitoringService } from '../services/monitor.service';
4242
import { Repository } from '../../repository/repository.service';
4343
import { Auth } from '@prisma/client';
4444
import { HttpStatus } from '../../app.module';
45+
import pkg from '../../../package.json';
4546

4647
export class ViewsController {
4748
constructor(
@@ -73,6 +74,9 @@ export class ViewsController {
7374
...param,
7475
auth,
7576
connectionState: instance?.connectionStatus.state || 'close',
77+
isDocker: process.env?.DOCKER_ENV || 'false',
78+
env: process.env?.NODE_ENV || 'dev',
79+
version: pkg.version,
7680
});
7781
} catch (error) {
7882
console.log('ERROR: ', error);

0 commit comments

Comments
 (0)