Skip to content

Commit 65a5c83

Browse files
chore: 🤖 bump dependencies
1 parent 45822a5 commit 65a5c83

File tree

13 files changed

+4859
-4524
lines changed

13 files changed

+4859
-4524
lines changed

‎package.json‎

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -38,57 +38,57 @@
3838
},
3939
"dependencies": {
4040
"@golevelup/ts-jest": "^0.3.3",
41-
"@nestjs/axios": "^3.0.2",
42-
"@nestjs/common": "^10.3.7",
43-
"@nestjs/config": "^3.2.2",
44-
"@nestjs/core": "^10.3.7",
45-
"@nestjs/passport": "^10.0.3",
46-
"@nestjs/platform-express": "^10.3.7",
47-
"@nestjs/schedule": "^4.0.2",
48-
"@nestjs/swagger": "^7.3.1",
49-
"@nestjs/typeorm": "^10.0.2",
41+
"@nestjs/axios": "^4.0.1",
42+
"@nestjs/common": "^11.1.6",
43+
"@nestjs/config": "^4.0.2",
44+
"@nestjs/core": "^11.1.6",
45+
"@nestjs/passport": "^11.0.5",
46+
"@nestjs/platform-express": "^11.1.6",
47+
"@nestjs/schedule": "^6.0.1",
48+
"@nestjs/swagger": "^11.2.0",
49+
"@nestjs/typeorm": "^11.0.0",
5050
"@polymeshassociation/fireblocks-signing-manager": "^2.5.0",
51-
"@polymeshassociation/hashicorp-vault-signing-manager": "^3.4.0",
52-
"@polymeshassociation/local-signing-manager": "^3.3.0",
51+
"@polymeshassociation/hashicorp-vault-signing-manager": "^3.5.0",
52+
"@polymeshassociation/local-signing-manager": "^3.5.2",
5353
"@polymeshassociation/polymesh-sdk": "28.0.0",
5454
"@polymeshassociation/polymesh-types": "^6.2.0",
55-
"@polymeshassociation/signing-manager-types": "^3.2.0",
55+
"@polymeshassociation/signing-manager-types": "^3.4.2",
5656
"class-transformer": "0.5.1",
5757
"class-validator": "^0.14.0",
58-
"joi": "17.4.0",
59-
"json-stable-stringify": "^1.0.2",
58+
"joi": "18.0.1",
59+
"json-stable-stringify": "^1.3.0",
6060
"lodash": "4.17.21",
6161
"passport": "^0.7.0",
6262
"passport-custom": "^1.1.1",
6363
"passport-headerapikey": "^1.2.2",
64-
"pg": "^8.11.5",
64+
"pg": "^8.16.3",
6565
"reflect-metadata": "0.2.2",
6666
"rhea-promise": "^3.0.1",
6767
"rimraf": "3.0.2",
68-
"rxjs": "^7.5.7",
69-
"swagger-ui-express": "5.0.0",
70-
"typeorm": "^0.3.17"
68+
"rxjs": "^7.8.2",
69+
"swagger-ui-express": "5.0.1",
70+
"typeorm": "^0.3.27"
7171
},
7272
"devDependencies": {
7373
"@babel/plugin-transform-modules-commonjs": "7.22.11",
74-
"@commitlint/cli": "^17.7.1",
75-
"@commitlint/config-conventional": "^17.7.0",
76-
"@nestjs/cli": "^10.1.17",
77-
"@nestjs/schematics": "^10.0.2",
78-
"@nestjs/testing": "^10.2.4",
74+
"@commitlint/cli": "^20.1.0",
75+
"@commitlint/config-conventional": "^20.0.0",
76+
"@nestjs/cli": "^11.0.10",
77+
"@nestjs/schematics": "^11.0.8",
78+
"@nestjs/testing": "^11.1.6",
7979
"@semantic-release/changelog": "^6.0.3",
80-
"@semantic-release/exec": "^6.0.3",
81-
"@semantic-release/npm": "^11.0.0",
82-
"@types/axios": "^0.14.0",
83-
"@types/cron": "^1.7.3",
84-
"@types/express": "4.17.17",
85-
"@types/jest": "29.5.4",
86-
"@types/jest-when": "^3.5.2",
87-
"@types/json-stable-stringify": "^1.0.34",
80+
"@semantic-release/exec": "^7.1.0",
81+
"@semantic-release/npm": "^12.0.2",
82+
"@types/axios": "^0.14.4",
83+
"@types/cron": "^2.4.3",
84+
"@types/express": "5.0.3",
85+
"@types/jest": "30.0.0",
86+
"@types/jest-when": "^3.5.5",
87+
"@types/json-stable-stringify": "^1.2.0",
8888
"@types/lodash": "^4.14.197",
8989
"@types/node": "^18.15.11",
90-
"@types/passport": "^1.0.11",
91-
"@types/supertest": "2.0.12",
90+
"@types/passport": "^1.0.17",
91+
"@types/supertest": "6.0.3",
9292
"@typescript-eslint/eslint-plugin": "6.9.1",
9393
"@typescript-eslint/parser": "6.9.1",
9494
"@zerollup/ts-transform-paths": "1.7.11",
@@ -104,16 +104,17 @@
104104
"eslint-plugin-simple-import-sort": "10.0.0",
105105
"husky": "8.0.3",
106106
"jest": "29.7.0",
107-
"jest-when": "^3.6.0",
107+
"jest-when": "^3.7.0",
108108
"lint-staged": "14.0.1",
109+
"path-to-regexp": "^8.3.0",
109110
"prettier": "2.8.8",
110111
"prettier-eslint": "15.0.1",
111112
"prettier-eslint-cli": "7.1.0",
112-
"semantic-release": "^22.0.0",
113-
"supertest": "6.1.3",
114-
"ts-jest": "29.1.1",
115-
"ts-loader": "9.4.4",
116-
"ts-node": "10.9.1",
113+
"semantic-release": "^24.2.9",
114+
"supertest": "7.1.4",
115+
"ts-jest": "29.4.4",
116+
"ts-loader": "9.5.4",
117+
"ts-node": "10.9.2",
117118
"tsconfig-paths": "^4.2.0",
118119
"typescript": "4.8.2"
119120
},

‎src/assets/models/transfer-restriction-claim-value.model.ts‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@ import { StatAccreditedClaimModel } from '~/assets/models/stat-claim-accredited.
1414
import { StatAffiliateClaimModel } from '~/assets/models/stat-claim-affiliate.model';
1515
import { StatJurisdictionClaimModel } from '~/assets/models/stat-claim-jurisdiction.model';
1616
import { ApiPropertyOneOf } from '~/common/decorators';
17-
import { FromEntity } from '~/common/decorators/transformation';
17+
import { FromBigNumber, FromEntity } from '~/common/decorators/transformation';
1818

1919
export class TransferRestrictionClaimValueModel {
2020
declare readonly type: TransferRestrictionType.ClaimCount;
2121

2222
@ApiProperty({
2323
description: 'The claim count/percentage restriction value',
2424
example: '10',
25-
type: 'object',
25+
type: 'string',
2626
})
27+
@FromBigNumber()
2728
readonly min: BigNumber;
2829

2930
@ApiProperty({
3031
description: 'The maximum claim count/percentage restriction value',
3132
example: '40',
32-
type: 'object',
33+
type: 'string',
3334
})
35+
@FromBigNumber()
3436
readonly max: BigNumber;
3537

3638
@ApiProperty({
@@ -43,11 +45,7 @@ export class TransferRestrictionClaimValueModel {
4345

4446
@ApiPropertyOneOf({
4547
description: 'The claim associated with the transfer restriction',
46-
union: [
47-
StatAccreditedClaimModel,
48-
StatAffiliateClaimModel,
49-
StatJurisdictionClaimModel,
50-
],
48+
union: [StatAccreditedClaimModel, StatAffiliateClaimModel, StatJurisdictionClaimModel],
5149
})
5250
@Type(() => StatClaimModel, {
5351
keepDiscriminatorProperty: true,

‎src/auth/strategies/api-key.strategy.ts‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,26 @@ import { HeaderAPIKeyStrategy } from 'passport-headerapikey';
55
import { AuthService } from '~/auth/auth.service';
66
import { AuthStrategy } from '~/auth/strategies/strategies.consts';
77
import { AppUnauthorizedError } from '~/common/errors';
8+
import { UserModel } from '~/users/model/user.model';
89

910
export const apiKeyHeader = 'x-api-key';
1011

11-
// eslint-disable-next-line @typescript-eslint/ban-types
12-
type Callback = (err: Error | null, user?: Object, info?: Object) => void;
13-
1412
/**
1513
* authenticate with an API key
1614
*/
1715
@Injectable()
1816
export class ApiKeyStrategy extends PassportStrategy(HeaderAPIKeyStrategy, AuthStrategy.ApiKey) {
19-
constructor(private authService: AuthService) {
20-
super({ header: apiKeyHeader }, false, (apiKey: string, done: Callback) => {
21-
const user = this.authService.validateApiKey(apiKey);
22-
if (!user) {
23-
return done(new AppUnauthorizedError('API key not found'), undefined);
24-
}
25-
return done(null, user);
26-
});
17+
constructor(private readonly authService: AuthService) {
18+
super({ header: apiKeyHeader, prefix: '' }, false);
19+
}
20+
21+
public async validate(apiKey: string): Promise<UserModel> {
22+
const user = await this.authService.validateApiKey(apiKey);
23+
24+
if (!user) {
25+
throw new AppUnauthorizedError('API key not found');
26+
}
27+
28+
return user;
2729
}
2830
}
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { Injectable } from '@nestjs/common';
22
import { PassportStrategy } from '@nestjs/passport';
3-
import { Strategy, VerifyCallback } from 'passport-custom';
3+
import { Strategy } from 'passport-custom';
44

55
import { AuthStrategy } from '~/auth/strategies/strategies.consts';
6-
import { defaultUser } from '~/users/user.consts';
76

87
/**
98
* authenticates with a default user
@@ -12,9 +11,7 @@ import { defaultUser } from '~/users/user.consts';
1211
*/
1312
@Injectable()
1413
export class OpenStrategy extends PassportStrategy(Strategy, AuthStrategy.Open) {
15-
constructor() {
16-
const verifyEveryone: VerifyCallback = (req, done) => done(null, defaultUser);
17-
18-
super(verifyEveryone);
14+
public validate(): boolean {
15+
return true;
1916
}
2017
}

‎src/authorizations/models/authorization-request.model.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class AuthorizationRequestModel {
4545
'<tr><td>Portfolio Custody</td><td>Portfolio</td></tr>' +
4646
'</tbody>' +
4747
'</table>',
48-
type: 'Authorization',
4948
examples: {
5049
type: 'PortfolioCustody',
5150
value: {

‎src/claims/claims.service.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { TransactionsService } from '~/transactions/transactions.service';
2424
export class ClaimsService {
2525
constructor(
2626
private readonly polymeshService: PolymeshService,
27-
private transactionsService: TransactionsService
27+
private readonly transactionsService: TransactionsService
2828
) {}
2929

3030
public async findIssuedByDid(

‎src/common/decorators/swagger.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ export const ApiArrayResponseReplaceModelProperties = <T, K extends keyof T>(
150150
);
151151
};
152152

153-
type ApiPropertyOneOfOptions = Omit<ApiPropertyOptions, 'oneOf' | 'type'> & {
153+
type ApiPropertyOneOfOptions = Omit<
154+
ApiPropertyOptions,
155+
'oneOf' | 'type' | 'additionalProperties' | 'selfRequired' | 'properties' | 'required'
156+
> & {
154157
union: (Omit<SchemaObject, 'oneOf'> | Type)[];
155158
};
156159

‎src/common/models/results.model.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ApiProperty } from '@nestjs/swagger';
55
import { FromEntityObject } from '~/common/decorators/transformation';
66

77
export class ResultsModel<DataType> {
8-
@ApiProperty({ type: 'generic array' })
8+
@ApiProperty({ type: 'array' })
99
@FromEntityObject()
1010
readonly results: DataType[];
1111

‎src/developer-testing/developer-testing.service.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { KeyringPair } from '@polkadot/keyring/types';
66
import { BigNumber } from '@polymeshassociation/polymesh-sdk';
77
import { Account, Identity } from '@polymeshassociation/polymesh-sdk/types';
88
import { Request } from 'express';
9-
import pathToRegexp from 'path-to-regexp';
9+
import { pathToRegexp } from 'path-to-regexp';
1010

1111
import { AccountsService } from '~/accounts/accounts.service';
1212
import { AppInternalError } from '~/common/errors';
@@ -146,7 +146,7 @@ export class DeveloperTestingService {
146146
return {
147147
path,
148148
// convert swagger syntax
149-
matcher: pathToRegexp(path.replace(/\{(.*?)\}/g, ':$1')),
149+
matcher: pathToRegexp(path.replace(/\{(.*?)\}/g, ':$1')).regexp,
150150
covered: false,
151151
};
152152
});

‎src/metadata/metadata.util.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ export async function createMetadataDetailsModel(
2626
lockedUntil = valueDetails.lockedUntil;
2727
}
2828

29-
metadataValue = new MetadataValueModel({ value, expiry, lockStatus, lockedUntil });
29+
metadataValue = new MetadataValueModel({
30+
value: value!,
31+
expiry: expiry!,
32+
lockStatus: lockStatus!,
33+
lockedUntil,
34+
});
3035
}
3136

3237
return new MetadataDetailsModel({ id, type, asset: assetId, name, specs, value: metadataValue });

0 commit comments

Comments
 (0)