Skip to content

Commit

Permalink
Merge pull request #930 from multiversx/development
Browse files Browse the repository at this point in the history
Development to main
  • Loading branch information
danielailie authored Mar 8, 2023
2 parents 13e2bfc + a1a7b12 commit 7ab43e6
Show file tree
Hide file tree
Showing 242 changed files with 5,462 additions and 6,085 deletions.
7,421 changes: 4,031 additions & 3,390 deletions package-lock.json

Large diffs are not rendered by default.

70 changes: 34 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,36 @@
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"copy-env": "cp .env.example .env",
"copy-pem": "mkdir -p dist && cp -u ./wallet.pem ./dist/wallet.pem | true",
"test": "jest",
"test": "jest --detectOpenHandles",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"clear_jest": "jest --clearCache",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "NODE_ENV=test-e2e jest --config ./test/jest-e2e.json --forceExit --maxWorkers=4",
"typeorm": "ts-node --require ts-node/register ./node_modules/typeorm/cli.js --config src/ormconfig.ts",
"generate-migration": "npm run typeorm -- migration:generate -n",
"typeorm": "ts-node --require ts-node/register ./node_modules/typeorm/cli.js -d src/datasource.ts",
"generate-migration": "npm run typeorm -- migration:generate src/db/migrations/$npm_config_name",
"run-migrations": "npm run typeorm migration:run",
"revert-migrations": "npm run typeorm migration:revert"
},
"dependencies": {
"@elastic/elasticsearch": "7.12.0",
"@elrondnetwork/erdnest": "0.1.84",
"@golevelup/nestjs-rabbitmq": "3.4.0",
"@multiversx/sdk-core": "^11.1.3",
"@multiversx/sdk-core": "11.2.0",
"@multiversx/sdk-native-auth-server": "1.0.5",
"@multiversx/sdk-nestjs": "0.4.16",
"@multiversx/sdk-network-providers": "^1.2.1",
"@nestjs-query/query-graphql": "0.30.0",
"@nestjs/common": "8.4.7",
"@nestjs/config": "2.0.0",
"@nestjs/core": "8.4.7",
"@nestjs/graphql": "9.1.2",
"@nestjs/jwt": "8.0.0",
"@nestjs/microservices": "8.4.7",
"@nestjs/mongoose": "8.0.1",
"@nestjs/passport": "8.2.2",
"@nestjs/platform-express": "8.4.7",
"@nestjs/schedule": "1.1.0",
"@nestjs/typeorm": "8.0.3",
"@nestjs/apollo": "^10.1.7",
"@nestjs/common": "9.3.9",
"@nestjs/config": "^2.3.0",
"@nestjs/core": "9.3.9",
"@nestjs/graphql": "10.2.0",
"@nestjs/jwt": "^10.0.1",
"@nestjs/microservices": "9.3.9",
"@nestjs/mongoose": "9.2.1",
"@nestjs/passport": "9.0.1",
"@nestjs/platform-express": "9.3.2",
"@nestjs/schedule": "2.2.0",
"@nestjs/typeorm": "9.0.1",
"@types/cache-manager": "3.4.0",
"agentkeepalive": "4.2.1",
"amqp-connection-manager": "3.7.0",
Expand All @@ -54,62 +54,60 @@
"axios": "0.21.4",
"axios-retry": "3.1.8",
"bignumber.js": "9.0.1",
"cache-manager": "3.6.1",
"cache-manager-redis-store": "2.0.0",
"clarifai-nodejs-grpc": "8.0.0",
"class-transformer": "0.4.0",
"class-validator": "0.13.2",
"class-validator": "0.14.0",
"config": "3.3.6",
"dataloader": "2.0.0",
"errorhandler": "1.5.1",
"form-data": "4.0.0",
"graphql": "15.8.0",
"graphql": "16.6.0",
"graphql-fields-list": "2.2.4",
"graphql-query-complexity": "0.12.0",
"graphql-relay": "0.7.0",
"graphql-tools": "8.2.0",
"graphql-relay": "0.10.0",
"graphql-tools": "8.3.18",
"graphql-upload": "13.0.0",
"helmet": "4.4.1",
"ioredis": "4.28.5",
"jwks-rsa": "2.0.3",
"mongoose": "5.13.15",
"mongoose": "6.9.0",
"mysql2": "2.2.5",
"nest-winston": "1.6.2",
"nest-winston": "1.8.0",
"object-hash": "2.2.0",
"passport": "0.6.0",
"passport-jwt": "4.0.0",
"passport-jwt": "4.0.1",
"passport-local": "1.0.0",
"prom-client": "13.1.0",
"redis": "3.1.2",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"rxjs": "7.5.4",
"save": "2.5.0",
"swagger-ui-express": "4.3.0",
"tiny-async-pool": "1.2.0",
"typeorm": "0.2.41",
"typeorm": "0.3.11",
"winston": "3.7.2"
},
"devDependencies": {
"@nestjs/cli": "^8.2.5",
"@nestjs/schematics": "8.0.11",
"@nestjs/testing": "8.4.7",
"@nestjs/cli": "9.2.0",
"@nestjs/schematics": "9.0.4",
"@nestjs/testing": "9.1.4",
"@types/express": "^4.17.11",
"@types/graphql-relay": "^0.6.0",
"@types/jest": "^27.4.1",
"@types/node": "^14.14.36",
"@types/passport-local": "^1.0.33",
"@types/supertest": "^2.0.10",
"@types/supertest": "^2.0.12",
"@types/tiny-async-pool": "^1.0.0",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "3.4.1",
"jest": "^27.5.1",
"jest": "29.4.2",
"prettier": "^2.2.1",
"supertest": "^6.1.3",
"ts-jest": "27.1.4",
"ts-loader": "9.2.8",
"supertest": "6.3.3",
"ts-jest": "29.0.5",
"ts-loader": "9.4.2",
"ts-node": "10.7.0",
"tsconfig-paths": "^3.14.0",
"typescript": "^4.6.4"
Expand Down
34 changes: 17 additions & 17 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ enum AuctionTypeEnum {
input BidActionArgs {
auctionId: Int!
identifier: String!
paymentTokenIdentifier: String = "EGLD"
paymentTokenIdentifier: String! = "EGLD"
price: String!
}

Expand All @@ -318,7 +318,7 @@ input BuyRandomNftActionArgs {
input BuySftActionArgs {
auctionId: Int!
identifier: String!
paymentTokenIdentifier: String = "EGLD"
paymentTokenIdentifier: String! = "EGLD"
price: String!
quantity: String
}
Expand Down Expand Up @@ -467,7 +467,7 @@ type CollectionAssetModel {
}

input CollectionAssetsRetriveCount {
size: Int = 4
size: Int! = 4
}

type CollectionBranding {
Expand Down Expand Up @@ -596,16 +596,16 @@ input CreateAuctionArgs {
minBid: String!
paymentToken: String!
paymentTokenNonce: Int
quantity: String = "1"
quantity: String! = "1"
startDate: String
}

input CreateNftArgs {
attributes: AttributeInput!
collection: String!
name: String!
quantity: String = "1"
royalties: String = "0"
quantity: String! = "1"
royalties: String! = "0"
}

input CreateOfferArgs {
Expand All @@ -614,8 +614,8 @@ input CreateOfferArgs {
identifier: String!
paymentAmount: String!
paymentToken: String!
paymentTokenNonce: Int = 0
quantity: String = "1"
paymentTokenNonce: Int! = 0
quantity: String! = "1"
}

input CurrentPaymentTokensFilters {
Expand Down Expand Up @@ -707,7 +707,7 @@ input IssueCampaignArgs {
collectionTicker: String!
mediaTypes: MediaTypeEnum!
mintEndTime: Int!
mintPriceToken: String = "EGLD"
mintPriceToken: String! = "EGLD"
mintStartTime: Int!
minterAddress: String!
royalties: String!
Expand All @@ -717,10 +717,10 @@ input IssueCampaignArgs {
}

input IssueCollectionArgs {
canFreeze: Boolean = false
canPause: Boolean = false
canTransferNFTCreateRole: Boolean = false
canWipe: Boolean = false
canFreeze: Boolean! = false
canPause: Boolean! = false
canTransferNFTCreateRole: Boolean! = false
canWipe: Boolean! = false
tokenName: String!
tokenTicker: String!
}
Expand Down Expand Up @@ -1278,7 +1278,7 @@ enum TagTypeEnum {

input TagsFilter {
searchTerm: String
tagType: TagTypeEnum = Nft
tagType: TagTypeEnum! = Nft
}

type TagsResponse {
Expand Down Expand Up @@ -1324,7 +1324,7 @@ type Token {
}

input TokenFilter {
token: String = "EGLD"
token: String! = "EGLD"
}

type TransactionNode {
Expand All @@ -1343,7 +1343,7 @@ type TransactionNode {
input TransferNftArgs {
destinationAddress: String!
identifier: String!
quantity: String = "1"
quantity: String! = "1"
}

input TransferNftCreateRoleArgs {
Expand All @@ -1364,4 +1364,4 @@ scalar Upload
type WhitelistedInfo {
isWhitelisted: Boolean!
message: String
}
}
12 changes: 7 additions & 5 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../node_modules/@elrondnetwork/erdnest/lib/src/utils/extensions/number.extensions';
import { Module } from '@nestjs/common';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { ConfigModule } from '@nestjs/config/dist';
import { GraphQLModule } from '@nestjs/graphql';
import 'reflect-metadata';
Expand Down Expand Up @@ -34,7 +34,9 @@ import { PrimarySaleModuleGraph } from './modules/primary-sale-sc/primary-sale.m
import { ScamModule } from './modules/scam/scam.module';
import { ComplexityPlugin } from './modules/common/complexity.plugin';
import { BlacklistedCollectionsModule } from './modules/blacklist/blacklisted-collections.module';
import '@elrondnetwork/erdnest/lib/src/utils/extensions/date.extensions';
import '@multiversx/sdk-nestjs/lib/src/utils/extensions/date.extensions';
import '@multiversx/sdk-nestjs/lib/src/utils/extensions/array.extensions';
import '@multiversx/sdk-nestjs/lib/src/utils/extensions/number.extensions';

@Module({
imports: [
Expand All @@ -43,7 +45,8 @@ import '@elrondnetwork/erdnest/lib/src/utils/extensions/date.extensions';
isGlobal: true,
}),
TypeOrmModule.forRoot({ ...ormconfig, keepConnectionAlive: true }),
GraphQLModule.forRoot({
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: 'schema.gql',
introspection: process.env.NODE_ENV !== 'production',
playground: true,
Expand All @@ -52,8 +55,7 @@ import '@elrondnetwork/erdnest/lib/src/utils/extensions/date.extensions';
formatError: (error: GraphQLError) => {
const graphQLFormattedError: GraphQLFormattedError = {
...error,
message:
error.extensions?.exception?.response?.message || error.message,
message: error.message,
};
console.error(graphQLFormattedError);

Expand Down
11 changes: 6 additions & 5 deletions src/common.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import { forwardRef, Logger, Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config/dist';
import { ScheduleModule } from '@nestjs/schedule';
import { MxCommunicationModule } from './common/services/mx-communication/mx-communication.module';
import { CachingModule } from './common/services/caching/caching.module';
import { ApiConfigService } from './utils/api.config.service';
import { CacheModule } from './common/services/caching/caching.module';
import { ApiConfigModule } from './modules/common/api-config/api.config.module';

@Module({
imports: [
forwardRef(() => CachingModule),
forwardRef(() => CacheModule),
ScheduleModule.forRoot(),
ConfigModule,
ApiConfigModule,
MxCommunicationModule,
],
exports: [MxCommunicationModule, CachingModule, ApiConfigService, Logger],
providers: [ApiConfigService, Logger],
exports: [MxCommunicationModule, CacheModule, Logger, ApiConfigModule],
providers: [Logger],
})
export class CommonModule {}
1 change: 0 additions & 1 deletion src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './services/mx-communication';
export * from './services/caching/redis-cache.service';
23 changes: 0 additions & 23 deletions src/common/models/caching-config.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/common/models/index.ts

This file was deleted.

Loading

0 comments on commit 7ab43e6

Please sign in to comment.