Skip to content

Commit 56978d0

Browse files
authored
Merge pull request #148 from BinaryStudioAcademy/development
feat: development to production thjs-0
2 parents 21d2a17 + 1675db0 commit 56978d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4913
-4173
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.11
1+
22.15

apps/backend/eslint.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import baseConfig from '../../eslint.config.js';
22

3-
/** @typedef {import("eslint").Linter.FlatConfig} */
4-
let FlatConfig;
3+
/** @typedef {import("eslint").Linter.Config} */
4+
let Config;
55

6-
/** @type {FlatConfig} */
6+
/** @type {Config} */
77
const ignoresConfig = {
88
ignores: ['build']
99
};
1010

11-
/** @type {FlatConfig[]} */
11+
/** @type {Config[]} */
1212
const overridesConfigs = [
1313
{
1414
files: ['knexfile.ts'],
@@ -48,7 +48,7 @@ const overridesConfigs = [
4848
}
4949
];
5050

51-
/** @type {FlatConfig[]} */
51+
/** @type {Config[]} */
5252
const config = [...baseConfig, ignoresConfig, ...overridesConfigs];
5353

5454
export default config;

apps/backend/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { join } from 'node:path';
22
import { fileURLToPath } from 'node:url';
33
import { pathsToModuleNameMapper } from 'ts-jest';
44

5-
import tsconfigJson from './tsconfig.json' assert { type: 'json' };
5+
import tsconfigJson from './tsconfig.json' with { type: 'json' };
66

77
const sourcePath = join(fileURLToPath(import.meta.url), '../');
88

apps/backend/lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { default as baseConfig } from '../../lint-staged.config.js';
1+
import baseConfig from '../../lint-staged.config.js';
22

33
/** @type {import('lint-staged').Config} */
44
const config = {

apps/backend/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@thread-js/backend",
33
"private": true,
44
"engines": {
5-
"node": "20.11.x",
6-
"npm": "10.2.x"
5+
"node": "22.15.x",
6+
"npm": "10.9.x"
77
},
88
"type": "module",
99
"scripts": {
@@ -25,29 +25,29 @@
2525
"test:auth": "npm run test -- --verbose --rootDir=tests/modules/auth/"
2626
},
2727
"dependencies": {
28-
"@fastify/static": "7.0.4",
28+
"@fastify/static": "8.1.1",
2929
"@thread-js/shared": "*",
3030
"convict": "6.2.4",
31-
"dotenv": "16.4.5",
32-
"fastify": "4.27.0",
31+
"dotenv": "16.5.0",
32+
"fastify": "5.3.2",
3333
"knex": "3.1.0",
34-
"objection": "3.1.4",
35-
"pg": "8.12.0",
36-
"pino": "9.1.0",
37-
"qs": "6.12.1"
34+
"objection": "3.1.5",
35+
"pg": "8.15.6",
36+
"pino": "9.6.0",
37+
"qs": "6.14.0"
3838
},
3939
"devDependencies": {
40-
"@faker-js/faker": "8.4.1",
40+
"@faker-js/faker": "9.7.0",
4141
"@jest/globals": "29.7.0",
4242
"@types/convict": "6.1.6",
43-
"@types/jest": "29.5.12",
44-
"@types/pg": "8.11.6",
45-
"@types/qs": "6.9.15",
43+
"@types/jest": "29.5.14",
44+
"@types/pg": "8.11.14",
45+
"@types/qs": "6.9.18",
4646
"cross-env": "7.0.3",
4747
"jest": "29.7.0",
48-
"pino-pretty": "11.2.0",
49-
"ts-jest": "29.1.4",
48+
"pino-pretty": "13.0.0",
49+
"ts-jest": "29.3.2",
5050
"ts-paths-esm-loader": "1.4.3",
51-
"tsx": "4.15.1"
51+
"tsx": "4.19.4"
5252
}
5353
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
type DefaultApiHandlerOptions = {
2-
body?: unknown;
3-
params?: unknown;
4-
query?: unknown;
5-
};
6-
71
type ControllerAPIHandlerOptions<
82
T extends DefaultApiHandlerOptions = DefaultApiHandlerOptions
93
> = {
@@ -12,4 +6,10 @@ type ControllerAPIHandlerOptions<
126
query: T['query'];
137
};
148

9+
type DefaultApiHandlerOptions = {
10+
body?: unknown;
11+
params?: unknown;
12+
query?: unknown;
13+
};
14+
1515
export { type ControllerAPIHandlerOptions };
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export { type ControllerAPIHandler } from './controller-api-handler.type.js';
21
export { type ControllerAPIHandlerOptions } from './controller-api-handler-options.type.js';
32
export { type ControllerAPIHandlerResponse } from './controller-api-handler-response.type.js';
3+
export { type ControllerAPIHandler } from './controller-api-handler.type.js';
44
export { type ControllerModule } from './controller-module.type.js';
55
export { type ControllerRouteParameters } from './controller-route-parameters.type.js';

apps/backend/src/libs/modules/database/database.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import LibraryKnex from 'knex';
2-
import { Model, knexSnakeCaseMappers } from 'objection';
2+
import { knexSnakeCaseMappers, Model } from 'objection';
33

44
import { AppEnvironment } from '~/libs/enums/enums.js';
55
import { type ValueOf } from '~/libs/types/types.js';

apps/backend/src/libs/modules/database/libs/types/repository.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ type Repository<T> = {
22
create(_payload: Omit<T, 'createdAt' | 'id' | 'updatedAt'>): Promise<T>;
33
deleteById(_id: number): Promise<number>;
44
getAll(): Promise<T[]>;
5-
getById(_id: number): Promise<T | null>;
5+
getById(_id: number): Promise<null | T>;
66
updateById(_id: number, _payload: Partial<T>): Promise<T>;
77
};
88

apps/backend/src/libs/modules/server-application/libs/types/server-application-route-parameters.type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
type FastifyReply,
33
type FastifyRequest,
4-
type RouteGenericInterface,
5-
type preHandlerHookHandler
4+
type preHandlerHookHandler,
5+
type RouteGenericInterface
66
} from 'fastify';
77

88
import { type HTTPMethod } from '~/libs/modules/http/http.js';

0 commit comments

Comments
 (0)