Skip to content

Commit e5c9b0f

Browse files
authored
Merge pull request #1789 from rocket-admin/backend_up_npm_libs
up npm libs
2 parents ab511ab + ed160fa commit e5c9b0f

50 files changed

Lines changed: 1751 additions & 1952 deletions

File tree

Some content is hidden

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

autoadmin-ws-server/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
"lint:fix": "biome check --write src/"
1313
},
1414
"dependencies": {
15-
"@hono/node-server": "^1.19.9",
16-
"hono": "^4.12.3",
15+
"@hono/node-server": "^2.0.3",
16+
"hono": "^4.12.21",
1717
"jsonwebtoken": "^9.0.3",
18-
"lru-cache": "^11.2.6",
19-
"nanoid": "^5.1.6",
18+
"lru-cache": "^11.5.0",
19+
"nanoid": "^5.1.11",
2020
"pino": "^10.3.1",
21-
"ws": "^8.19.0",
22-
"zod": "^4.3.6"
21+
"ws": "^8.20.1",
22+
"zod": "^4.4.3"
2323
},
2424
"devDependencies": {
25-
"@biomejs/biome": "2.4.4",
25+
"@biomejs/biome": "2.4.15",
2626
"@types/jsonwebtoken": "^9.0.10",
2727
"@types/node": "^22.10.2",
2828
"@types/ws": "^8.18.1",
29-
"tsx": "^4.21.0",
30-
"typescript": "^5.9.3"
29+
"tsx": "^4.22.3",
30+
"typescript": "^6.0.3"
3131
},
3232
"pnpm": {
3333
"onlyBuiltDependencies": [

autoadmin-ws-server/pnpm-lock.yaml

Lines changed: 187 additions & 200 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,88 +21,88 @@
2121
"typeorm": "ts-node -r tsconfig-paths/register ../node_modules/.bin/typeorm",
2222
"migration:generate": "pnpm run typeorm migration:generate -d dist/src/shared/config/datasource.config.js",
2323
"migration:create": "pnpm run typeorm migration:create -d dist/src/shared/config/datasource.config.js",
24-
"migration:run": "pnpm run typeorm migration:run -d dist/src/shared/config/datasource.config.js",
24+
"migration:run": "pnpm run typeorm migration:run -d dist/src/shared/config/datasource.config.js --transaction=each",
2525
"migration:revert": "pnpm run typeorm -- migration:revert -d dist/src/shared/config/datasource.config.js",
2626
"knip": "knip"
2727
},
2828
"dependencies": {
2929
"@amplitude/node": "1.10.2",
30-
"@aws-sdk/client-dynamodb": "^3.1032.0",
31-
"@aws-sdk/client-s3": "^3.1037.0",
32-
"@aws-sdk/lib-dynamodb": "^3.1037.0",
33-
"@aws-sdk/s3-request-presigner": "^3.1037.0",
34-
"@cedar-policy/cedar-wasm": "^4.9.1",
35-
"@clickhouse/client": "^1.18.2",
30+
"@aws-sdk/client-dynamodb": "^3.1050.0",
31+
"@aws-sdk/client-s3": "^3.1050.0",
32+
"@aws-sdk/lib-dynamodb": "^3.1050.0",
33+
"@aws-sdk/s3-request-presigner": "^3.1050.0",
34+
"@cedar-policy/cedar-wasm": "^4.11.0",
35+
"@clickhouse/client": "^1.18.5",
3636
"@elastic/elasticsearch": "8.18.1",
37-
"@electric-sql/pglite": "^0.4.0",
38-
"@faker-js/faker": "^10.3.0",
39-
"@langchain/aws": "^1.3.3",
40-
"@langchain/core": "^1.1.33",
41-
"@nestjs/common": "11.1.17",
42-
"@nestjs/core": "11.1.17",
43-
"@nestjs/platform-express": "11.1.17",
44-
"@nestjs/schedule": "^6.1.1",
45-
"@nestjs/swagger": "^11.2.6",
37+
"@electric-sql/pglite": "^0.4.5",
38+
"@faker-js/faker": "^10.4.0",
39+
"@langchain/aws": "^1.3.8",
40+
"@langchain/core": "^1.1.47",
41+
"@nestjs/common": "11.1.21",
42+
"@nestjs/core": "11.1.21",
43+
"@nestjs/platform-express": "11.1.21",
44+
"@nestjs/schedule": "^6.1.3",
45+
"@nestjs/swagger": "^11.4.3",
4646
"@nestjs/throttler": "^6.5.0",
47-
"@nestjs/typeorm": "^11.0.0",
47+
"@nestjs/typeorm": "^11.0.1",
4848
"@rocketadmin/shared-code": "workspace:*",
4949
"@sentry/minimal": "^6.19.7",
50-
"@sentry/node": "10.44.0",
51-
"@toon-format/toon": "^2.1.0",
50+
"@sentry/node": "10.53.1",
51+
"@toon-format/toon": "^2.3.0",
5252
"@types/crypto-js": "^4.2.2",
5353
"@types/jsonwebtoken": "^9.0.10",
5454
"@types/multer": "^2.1.0",
55-
"@types/nodemailer": "^7.0.11",
55+
"@types/nodemailer": "^8.0.0",
5656
"@types/nunjucks": "^3.2.6",
5757
"@types/qrcode": "^1.5.6",
5858
"@zapier/secret-scrubber": "^1.1.6",
5959
"argon2": "0.44.0",
60-
"axios": "^1.15.0",
60+
"axios": "^1.16.1",
6161
"basic-auth": "2.0.1",
6262
"bcrypt": "6.0.0",
6363
"body-parser": "^2.2.2",
64-
"cassandra-driver": "^4.8.0",
64+
"cassandra-driver": "^4.9.0",
6565
"class-transformer": "0.5.1",
6666
"class-validator": "^0.15.1",
6767
"cookie-parser": "^1.4.7",
6868
"crypto-js": "4.2.0",
69-
"csv": "^6.5.0",
70-
"dotenv": "17.3.1",
69+
"csv": "^6.5.1",
70+
"dotenv": "17.4.2",
7171
"express": "5.2.1",
7272
"helmet": "8.1.0",
7373
"i18n-iso-countries": "^7.14.0",
7474
"ip-range-check": "0.2.0",
7575
"json2csv": "^5.0.7",
7676
"json5": "^2.2.3",
7777
"jsonwebtoken": "^9.0.3",
78-
"knex": "3.1.0",
79-
"lru-cache": "^11.2.7",
80-
"mongodb": "^7.1.1",
81-
"nanoid": "5.1.7",
82-
"node-sql-parser": "^5.3.0",
83-
"nodemailer": "^8.0.4",
78+
"knex": "3.2.10",
79+
"lru-cache": "^11.5.0",
80+
"mongodb": "^7.2.0",
81+
"nanoid": "5.1.11",
82+
"node-sql-parser": "^5.4.0",
83+
"nodemailer": "^8.0.7",
8484
"nunjucks": "^3.2.4",
8585
"otplib": "^12.0.1",
86-
"p-queue": "9.1.0",
87-
"pg-connection-string": "^2.12.0",
86+
"p-queue": "9.3.0",
87+
"pg-connection-string": "^2.13.0",
8888
"qrcode": "^1.5.4",
8989
"reflect-metadata": "0.2.2",
9090
"rimraf": "6.1.3",
9191
"rxjs": "7.8.2",
92-
"safe-regex2": "^5.1.0",
92+
"safe-regex2": "^5.1.1",
9393
"secure-json-parse": "4.1.0",
94-
"typeorm": "0.3.28",
94+
"typeorm": "1.0.0",
9595
"typeorm-pglite": "^0.3.4",
96-
"uuid": "^13.0.0",
97-
"validator": "^13.15.26",
96+
"uuid": "^14.0.0",
97+
"validator": "^13.15.35",
9898
"winston": "3.19.0",
9999
"zod": "^4.4.3"
100100
},
101101
"devDependencies": {
102-
"@ava/typescript": "6.0.0",
103-
"@nestjs/cli": "^11.0.16",
104-
"@nestjs/schematics": "11.0.9",
105-
"@nestjs/testing": "^11.1.17",
102+
"@ava/typescript": "7.0.0",
103+
"@nestjs/cli": "^11.0.21",
104+
"@nestjs/schematics": "11.1.0",
105+
"@nestjs/testing": "^11.1.21",
106106
"@types/bcrypt": "^6.0.0",
107107
"@types/body-parser": "^1.19.6",
108108
"@types/cookie-parser": "^1.4.10",
@@ -112,14 +112,14 @@
112112
"@types/node": "^24.10.1",
113113
"@types/supertest": "^7.2.0",
114114
"@types/validator": "^13.15.10",
115-
"ava": "6.4.1",
116-
"knip": "^5.88.0",
117-
"nock": "^14.0.11",
115+
"ava": "8.0.1",
116+
"knip": "^6.14.1",
117+
"nock": "^14.0.15",
118118
"redis": "^5.12.1",
119119
"supertest": "^7.2.2",
120-
"ts-loader": "^9.5.4",
120+
"ts-loader": "^9.5.7",
121121
"ts-node": "^10.9.2",
122122
"tsconfig-paths": "^4.2.0",
123-
"typescript": "^5.9.3"
123+
"typescript": "^6.0.3"
124124
}
125125
}

backend/src/entities/cedar-authorization/cedar-authorization.service.ts

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
import * as cedarWasm from '@cedar-policy/cedar-wasm/nodejs';
12
import { HttpException, HttpStatus, Inject, Injectable, Logger, OnModuleInit } from '@nestjs/common';
2-
import { Messages } from '../../exceptions/text/messages.js';
3-
import { Cacher } from '../../helpers/cache/cacher.js';
43
import { IGlobalDatabaseContext } from '../../common/application/global-database-context.interface.js';
54
import { BaseType } from '../../common/data-injection.tokens.js';
5+
import { Messages } from '../../exceptions/text/messages.js';
6+
import { Cacher } from '../../helpers/cache/cacher.js';
67
import { GroupEntity } from '../group/group.entity.js';
78
import { IComplexPermission } from '../permission/permission.interface.js';
89
import {
10+
CEDAR_ACTION_TYPE,
11+
CEDAR_USER_TYPE,
912
CedarAction,
1013
CedarResourceType,
1114
CedarValidationRequest,
12-
CEDAR_ACTION_TYPE,
13-
CEDAR_USER_TYPE,
1415
} from './cedar-action-map.js';
1516
import { ICedarAuthorizationService } from './cedar-authorization.service.interface.js';
1617
import { buildCedarEntities } from './cedar-entity-builder.js';
1718
import { parseCedarPolicyToClassicalPermissions } from './cedar-policy-parser.js';
1819
import { CEDAR_SCHEMA } from './cedar-schema.js';
19-
import * as cedarWasm from '@cedar-policy/cedar-wasm/nodejs';
2020

2121
@Injectable()
2222
export class CedarAuthorizationService implements ICedarAuthorizationService, OnModuleInit {
@@ -61,14 +61,32 @@ export class CedarAuthorizationService implements ICedarAuthorizationService, On
6161
const needsSentinel = action === CedarAction.DashboardCreate || !dashboardId;
6262
const effectiveDashboardId = needsSentinel ? '__new__' : dashboardId;
6363
resourceId = `${connectionId}/${effectiveDashboardId}`;
64-
return this.evaluate(userId, connectionId, action, resourceType, resourceId, tableName, effectiveDashboardId, undefined);
64+
return this.evaluate(
65+
userId,
66+
connectionId,
67+
action,
68+
resourceType,
69+
resourceId,
70+
tableName,
71+
effectiveDashboardId,
72+
undefined,
73+
);
6574
}
6675
case 'panel': {
6776
resourceType = CedarResourceType.Panel;
6877
const needsSentinel = action === CedarAction.PanelCreate || !panelId;
6978
const effectivePanelId = needsSentinel ? '__new__' : panelId;
7079
resourceId = `${connectionId}/${effectivePanelId}`;
71-
return this.evaluate(userId, connectionId, action, resourceType, resourceId, tableName, undefined, effectivePanelId);
80+
return this.evaluate(
81+
userId,
82+
connectionId,
83+
action,
84+
resourceType,
85+
resourceId,
86+
tableName,
87+
undefined,
88+
effectivePanelId,
89+
);
7290
}
7391
default:
7492
return false;
@@ -219,7 +237,7 @@ export class CedarAuthorizationService implements ICedarAuthorizationService, On
219237
private async assertUserNotSuspended(userId: string): Promise<void> {
220238
const user = await this.globalDbContext.userRepository.findOne({
221239
where: { id: userId },
222-
select: ['id', 'suspended'],
240+
select: { id: true, suspended: true },
223241
});
224242
if (user?.suspended) {
225243
throw new HttpException(
@@ -325,5 +343,4 @@ export class CedarAuthorizationService implements ICedarAuthorizationService, On
325343
}
326344
}
327345
}
328-
329346
}

backend/src/entities/connection/use-cases/test-connection.use.case.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
isRedisConnectionUrl,
55
} from '@rocketadmin/shared-code/dist/src/data-access-layer/shared/create-data-access-object.js';
66
import { ConnectionTypesEnum } from '@rocketadmin/shared-code/dist/src/shared/enums/connection-types-enum.js';
7-
import { getRepository } from 'typeorm';
87
import AbstractUseCase from '../../../common/abstract-use.case.js';
98
import { IGlobalDatabaseContext } from '../../../common/application/global-database-context.interface.js';
109
import { BaseType } from '../../../common/data-injection.tokens.js';
@@ -16,7 +15,6 @@ import { slackPostMessage } from '../../../helpers/slack/slack-post-message.js';
1615
import { CreateConnectionDs } from '../application/data-structures/create-connection.ds.js';
1716
import { TestConnectionResultDs } from '../application/data-structures/test-connection-result.ds.js';
1817
import { UpdateConnectionDs } from '../application/data-structures/update-connection.ds.js';
19-
import { ConnectionEntity } from '../connection.entity.js';
2018
import { decryptConnectionCredentialsAsync } from '../utils/decrypt-connection-credentials-async.js';
2119
import { isHostAllowed } from '../utils/is-host-allowed.js';
2220
import { processAWSConnection } from '../utils/process-aws-connection.util.js';
@@ -66,7 +64,7 @@ export class TestConnectionUseCase
6664
};
6765
}
6866
if (isConnectionTypeAgent(toUpdate.type)) {
69-
const qb = await getRepository(ConnectionEntity)
67+
const qb = this._dbContext.connectionRepository
7068
.createQueryBuilder('connection')
7169
.leftJoinAndSelect('connection.agent', 'agent')
7270
.where('connection.id = :id', { id: connectionId });

backend/src/entities/email/email/email.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Inject, Injectable } from '@nestjs/common';
22
import * as Sentry from '@sentry/node';
33
import Mail from 'nodemailer/lib/mailer/index.js';
4-
import SMTPTransport from 'nodemailer/lib/smtp-transport';
4+
import SMTPTransport from 'nodemailer/lib/smtp-transport/index.js';
55
import * as nunjucks from 'nunjucks';
66
import PQueue from 'p-queue';
77
import { BaseType } from '../../../common/data-injection.tokens.js';

backend/src/entities/email/transporter/email-transporter-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@nestjs/common';
22
import nodemailer from 'nodemailer';
3-
import SMTPTransport from 'nodemailer/lib/smtp-transport';
3+
import SMTPTransport from 'nodemailer/lib/smtp-transport/index.js';
44
import { isSaaS } from '../../../helpers/app/is-saas.js';
55
import { IMessage } from '../email/email.interface.js';
66
import { EmailConfigService } from '../email-config/email-config.service.js';

backend/src/entities/email/transporter/email-transporter.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import SMTPTransport from 'nodemailer/lib/smtp-transport';
1+
import SMTPTransport from 'nodemailer/lib/smtp-transport/index.js';
22
import { IMessage } from '../email/email.interface.js';
33

44
export interface IEmailTransporterInterface {

backend/src/entities/secret-access-log/repository/secret-access-log-repository.extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const secretAccessLogRepositoryExtension: ISecretAccessLogRepository = {
2828
where: {
2929
secretId,
3030
},
31-
relations: ['user'],
31+
relations: { user: true },
3232
order: {
3333
accessedAt: 'DESC',
3434
},

backend/src/entities/table-schema/repository/custom-table-schema-change-repository-extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const customTableSchemaChangeRepositoryExtension: ITableSchemaChangeRepos
2929
async findByIdWithRelations(id: string): Promise<TableSchemaChangeEntity | null> {
3030
return await this.findOne({
3131
where: { id },
32-
relations: ['connection', 'author', 'previousChange'],
32+
relations: { connection: true, author: true, previousChange: true },
3333
});
3434
},
3535

0 commit comments

Comments
 (0)