Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Dec 5, 2019
1 parent 84aee92 commit dc68c25
Show file tree
Hide file tree
Showing 31 changed files with 1,345 additions and 1,194 deletions.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@
"bench": "node benchmark/index.js"
},
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@faustbrian/benchmarker": "^0.1.2",
"@oclif/dev-cli": "^1.22.2",
"@types/babel__core": "^7.1.3",
"@types/create-hash": "^1.2.2",
"@types/depcheck": "^0.9.0",
"@types/jest": "^24.0.22",
"@types/depcheck": "^0.9.1",
"@types/jest": "^24.0.23",
"@types/js-yaml": "^3.12.1",
"@types/node": "^12.12.7",
"@types/prettier": "^1.18.3",
"@types/node": "^12.12.14",
"@types/prettier": "^1.19.0",
"@types/prompts": "^2.4.0",
"@types/rimraf": "^2.0.3",
"@types/uuid": "^3.4.6",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"babel-loader": "^8.0.6",
"capture-console": "^1.0.1",
"codecov": "^3.6.1",
Expand All @@ -73,30 +73,30 @@
"cross-env": "^6.0.3",
"del-cli": "^3.0.0",
"depcheck": "^0.9.1",
"eslint": "^6.6.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-jest": "^23.0.3",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-jest": "^23.1.1",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-simple-import-sort": "^4.0.0",
"eslint-plugin-simple-import-sort": "^5.0.0",
"get-port": "^5.0.0",
"husky": "^3.0.9",
"husky": "^3.1.0",
"jest": "^24.9.0",
"jest-extended": "^0.11.2",
"js-yaml": "^3.13.1",
"lerna": "^3.18.4",
"lint-staged": "^9.4.2",
"lerna": "^3.19.0",
"lint-staged": "^9.5.0",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"nock": "^11.7.0",
"npm-check-updates": "^3.2.1",
"npm-check-updates": "^3.2.2",
"prettier": "^1.19.1",
"prompts": "^2.2.1",
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"tmp": "^0.1.0",
"ts-jest": "^24.1.0",
"typedoc": "^0.15.0",
"typescript": "^3.7.2",
"ts-jest": "^24.2.0",
"typedoc": "^0.15.3",
"typescript": "^3.7.3",
"typesync": "^0.6.1",
"uuid": "^3.3.3"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"@arkecosystem/core-kernel": "^3.0.0-next.0",
"@arkecosystem/core-transaction-pool": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"@hapi/boom": "^7.4.3",
"@hapi/hapi": "^18.3.2",
"@hapi/joi": "^15.1.1",
"@hapi/boom": "^8.0.1",
"@hapi/hapi": "^18.4.0",
"@hapi/joi": "^16.1.8",
"ajv": "^6.10.2",
"ip": "^1.1.5",
"node-cache": "^5.0.2",
Expand All @@ -37,9 +37,9 @@
},
"devDependencies": {
"@types/hapi__boom": "^7.4.1",
"@types/hapi__joi": "^15.0.3",
"@types/hapi__joi": "^16.0.4",
"@types/ip": "^1.1.0",
"@types/semver": "^6.0.1"
"@types/semver": "^6.2.0"
},
"engines": {
"node": ">=10.x"
Expand Down
6 changes: 3 additions & 3 deletions packages/core-api/src/controllers/delegates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Repositories } from "@arkecosystem/core-database";
import { Container, Contracts } from "@arkecosystem/core-kernel";
import Boom from "@hapi/boom";
import { Boom, notFound } from "@hapi/boom";
import Hapi from "@hapi/hapi";

import { BlockResource, DelegateResource, WalletResource } from "../resources";
Expand Down Expand Up @@ -85,11 +85,11 @@ export class DelegatesController extends Controller {
try {
wallet = this.walletRepository.findByScope(Contracts.State.SearchScope.Wallets, id);
} catch (error) {
return Boom.notFound("Delegate not found");
return notFound("Delegate not found");
}

if (!wallet.hasAttribute("delegate.username")) {
return Boom.notFound("Delegate not found");
return notFound("Delegate not found");
}

return wallet;
Expand Down
4 changes: 2 additions & 2 deletions packages/core-api/src/controllers/wallets.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Repositories } from "@arkecosystem/core-database";
import { Application, Container, Contracts } from "@arkecosystem/core-kernel";
import { Enums } from "@arkecosystem/crypto";
import Boom from "@hapi/boom";
import { Boom, notFound } from "@hapi/boom";
import Hapi from "@hapi/hapi";

import { LockResource, TransactionResource, WalletResource } from "../resources";
Expand Down Expand Up @@ -171,7 +171,7 @@ export class WalletsController extends Controller {
try {
return this.walletRepository.findByScope(Contracts.State.SearchScope.Wallets, id);
} catch (error) {
throw Boom.notFound("Wallet not found");
throw notFound("Wallet not found");
}
}
}
4 changes: 2 additions & 2 deletions packages/core-api/src/plugins/pagination/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Joi from "@hapi/joi";

export const getConfig = options => {
const { error, value } = Joi.validate(options, {
const { error, value } = Joi.object({
query: Joi.object({
limit: Joi.object({
default: Joi.number()
Expand All @@ -12,7 +12,7 @@ export const getConfig = options => {
.default(100),
}),
}),
});
}).validate(options);

return { error: error || undefined, config: error ? undefined : value };
};
36 changes: 18 additions & 18 deletions packages/core-api/src/routes/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const register = (server: Hapi.Server): void => {
handler: controller.index,
options: {
validate: {
query: {
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
Expand Down Expand Up @@ -50,7 +50,7 @@ export const register = (server: Hapi.Server): void => {
blockSignature: Joi.string().hex(),
transform: Joi.bool().default(true),
},
},
}),
},
},
});
Expand All @@ -61,9 +61,9 @@ export const register = (server: Hapi.Server): void => {
handler: controller.first,
options: {
validate: {
query: {
query: Joi.object({
transform: Joi.bool().default(true),
},
}),
},
},
});
Expand All @@ -74,9 +74,9 @@ export const register = (server: Hapi.Server): void => {
handler: controller.last,
options: {
validate: {
query: {
query: Joi.object({
transform: Joi.bool().default(true),
},
}),
},
},
});
Expand All @@ -87,12 +87,12 @@ export const register = (server: Hapi.Server): void => {
handler: controller.show,
options: {
validate: {
params: {
params: Joi.object({
id: server.app.schemas.blockId,
},
query: {
}),
query: Joi.object({
transform: Joi.bool().default(true),
},
}),
},
},
});
Expand All @@ -103,10 +103,10 @@ export const register = (server: Hapi.Server): void => {
handler: controller.transactions,
options: {
validate: {
params: {
params: Joi.object({
id: Joi.string(),
},
query: {
}),
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
Expand Down Expand Up @@ -141,7 +141,7 @@ export const register = (server: Hapi.Server): void => {
vendorField: Joi.string().max(255, "utf8"),
transform: Joi.bool().default(true),
},
},
}),
},
},
});
Expand All @@ -152,13 +152,13 @@ export const register = (server: Hapi.Server): void => {
handler: controller.search,
options: {
validate: {
query: {
query: Joi.object({
...server.app.schemas.pagination,
...{
transform: Joi.bool().default(true),
},
},
payload: {
}),
payload: Joi.object({
orderBy: Joi.string(),
limit: Joi.number().min(0),
offset: Joi.number().min(0),
Expand Down Expand Up @@ -244,7 +244,7 @@ export const register = (server: Hapi.Server): void => {
"greaterThanEqual",
]),
),
},
}),
},
},
});
Expand Down
32 changes: 16 additions & 16 deletions packages/core-api/src/routes/delegates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const register = (server: Hapi.Server): void => {
handler: controller.index,
options: {
validate: {
query: {
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
Expand Down Expand Up @@ -42,7 +42,7 @@ export const register = (server: Hapi.Server): void => {
.integer()
.min(0),
},
},
}),
},
},
});
Expand All @@ -53,9 +53,9 @@ export const register = (server: Hapi.Server): void => {
handler: controller.show,
options: {
validate: {
params: {
params: Joi.object({
id: server.app.schemas.delegateIdentifier,
},
}),
},
},
});
Expand All @@ -66,10 +66,10 @@ export const register = (server: Hapi.Server): void => {
handler: controller.blocks,
options: {
validate: {
params: {
params: Joi.object({
id: server.app.schemas.delegateIdentifier,
},
query: {
}),
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
Expand Down Expand Up @@ -97,7 +97,7 @@ export const register = (server: Hapi.Server): void => {
.min(0),
transform: Joi.bool().default(true),
},
},
}),
},
},
});
Expand All @@ -108,10 +108,10 @@ export const register = (server: Hapi.Server): void => {
handler: controller.voters,
options: {
validate: {
params: {
params: Joi.object({
id: server.app.schemas.delegateIdentifier,
},
query: {
}),
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
Expand Down Expand Up @@ -148,7 +148,7 @@ export const register = (server: Hapi.Server): void => {
blockSignature: Joi.string().hex(),
transform: Joi.bool().default(true),
},
},
}),
},
},
});
Expand All @@ -159,13 +159,13 @@ export const register = (server: Hapi.Server): void => {
handler: controller.search,
options: {
validate: {
query: {
query: Joi.object({
...server.app.schemas.pagination,
...{
orderBy: server.app.schemas.orderBy,
},
},
payload: {
}),
payload: Joi.object({
address: Joi.string()
.alphanum()
.length(34),
Expand All @@ -184,7 +184,7 @@ export const register = (server: Hapi.Server): void => {
forgedTotal: server.app.schemas.integerBetween,
producedBlocks: server.app.schemas.integerBetween,
voteBalance: server.app.schemas.integerBetween,
},
}),
},
},
});
Expand Down
Loading

0 comments on commit dc68c25

Please sign in to comment.