Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,57 +49,57 @@
"bench": "node benchmark/index.js"
},
"devDependencies": {
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@babel/core": "^7.8.6",
"@babel/preset-env": "^7.8.6",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@faustbrian/benchmarker": "^0.1.2",
"@oclif/dev-cli": "^1.22.2",
"@types/babel__core": "^7.1.3",
"@types/babel__core": "^7.1.6",
"@types/create-hash": "^1.2.2",
"@types/depcheck": "^0.9.1",
"@types/jest": "^24.0.24",
"@types/js-yaml": "^3.12.1",
"@types/node": "^12.12.21",
"@types/jest": "^25.1.3",
"@types/js-yaml": "^3.12.2",
"@types/node": "^13.7.7",
"@types/prettier": "^1.19.0",
"@types/rimraf": "^2.0.3",
"@types/uuid": "^3.4.6",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"@types/uuid": "^7.0.0",
"@typescript-eslint/eslint-plugin": "^2.22.0",
"@typescript-eslint/parser": "^2.22.0",
"babel-loader": "^8.0.6",
"capture-console": "^1.0.1",
"codecov": "^3.6.1",
"cpy-cli": "^3.0.0",
"codecov": "^3.6.5",
"cpy-cli": "^3.1.0",
"create-hash": "^1.2.0",
"cross-env": "^7.0.0",
"del-cli": "^3.0.0",
"depcheck": "^0.9.1",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-jest": "^23.1.1",
"depcheck": "^0.9.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-jest": "^23.8.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-simple-import-sort": "^5.0.0",
"get-port": "^5.1.0",
"husky": "^3.1.0",
"jest": "^24.9.0",
"jest-extended": "^0.11.2",
"eslint-plugin-simple-import-sort": "^5.0.1",
"get-port": "^5.1.1",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-extended": "^0.11.5",
"js-yaml": "^3.13.1",
"lerna": "^3.19.0",
"lint-staged": "^9.5.0",
"madge": "^3.6.0",
"lerna": "^3.20.2",
"lint-staged": "^10.0.8",
"madge": "^3.7.0",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"nock": "^11.7.0",
"npm-check-updates": "^4.0.1",
"moment-timezone": "^0.5.28",
"nock": "^12.0.2",
"npm-check-updates": "^4.0.3",
"prettier": "^1.19.1",
"rimraf": "^3.0.0",
"rimraf": "^3.0.2",
"sinon": "^9.0.0",
"tmp": "^0.1.0",
"ts-jest": "^24.2.0",
"typedoc": "^0.16.0",
"typescript": "^3.7.3",
"ts-jest": "^25.2.1",
"typedoc": "^0.16.11",
"typescript": "^3.8.3",
"typesync": "^0.6.1",
"uuid": "^3.3.3"
"uuid": "^7.0.1"
},
"workspaces": [
"packages/*",
Expand Down
15 changes: 7 additions & 8 deletions packages/core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@
"@arkecosystem/core-transaction-pool": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"@hapi/boom": "^9.0.0",
"@hapi/hapi": "^19.0.0",
"@hapi/hapi": "^19.1.1",
"@hapi/joi": "^17.1.0",
"ajv": "^6.10.2",
"ajv": "^6.12.0",
"ip": "^1.1.5",
"node-cache": "^5.0.2",
"rate-limiter-flexible": "^1.1.6",
"semver": "^6.3.0"
"node-cache": "^5.1.0",
"rate-limiter-flexible": "^2.0.0",
"semver": "^7.1.3"
},
"devDependencies": {
"@types/hapi__boom": "^7.4.1",
"@types/hapi__joi": "^16.0.4",
"@types/hapi__joi": "^16.0.12",
"@types/ip": "^1.1.0",
"@types/semver": "^6.2.0"
"@types/semver": "^7.1.0"
},
"engines": {
"node": ">=10.x"
Expand Down
4 changes: 2 additions & 2 deletions packages/core-api/src/plugins/rate-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export = {
limiter: new RateLimiterMemory({ points: options.points, duration: options.duration }),
whiteList: options.whitelist || ["*"],
blackList: options.blacklist || [],
isWhite: (ip: string) => {
isWhiteListed: (ip: string) => {
return isListed(ip, options.whitelist);
},
isBlack: (ip: string) => {
isBlackListed: (ip: string) => {
return isListed(ip, options.blacklist);
},
runActionAnyway: false,
Expand Down
8 changes: 4 additions & 4 deletions packages/core-blockchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
"@arkecosystem/core-state": "^3.0.0-next.0",
"@arkecosystem/core-transactions": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"async": "^3.1.0",
"async": "^3.2.0",
"delay": "^4.3.0",
"immutable": "^4.0.0-rc.12",
"lodash.get": "^4.4.2",
"pluralize": "^8.0.0",
"pretty-ms": "^6.0.0",
"xstate": "^4.6.7"
"pretty-ms": "^6.0.1",
"xstate": "^4.7.8"
},
"devDependencies": {
"@types/async": "^3.0.3"
"@types/async": "^3.0.8"
},
"engines": {
"node": ">=10.x"
Expand Down
12 changes: 6 additions & 6 deletions packages/core-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@
"@hapi/joi": "^17.1.0",
"boxen": "^4.2.0",
"cli-table3": "^0.5.1",
"dayjs": "^1.8.17",
"dayjs": "^1.8.21",
"env-paths": "^2.2.0",
"envfile": "^4.4.0",
"execa": "^3.4.0",
"envfile": "^4.5.0",
"execa": "^4.0.0",
"fast-levenshtein": "^2.0.6",
"fs-extra": "^8.1.0",
"is-ci": "^2.0.0",
"kleur": "^3.0.3",
"latest-version": "^5.1.0",
"listr": "^0.14.3",
"ora": "^4.0.3",
"semver": "^6.3.0",
"semver": "^7.1.3",
"type-fest": "^0.11.0",
"yargs-parser": "^18.0.0"
},
"devDependencies": {
"@types/fast-levenshtein": "^0.0.1",
"@types/fs-extra": "^8.0.1",
"@types/fs-extra": "^8.1.0",
"@types/is-ci": "^2.0.0",
"@types/listr": "^0.14.2",
"@types/semver": "^6.2.0",
"@types/semver": "^7.1.0",
"@types/yargs-parser": "^15.0.0"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core-database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"dependencies": {
"@arkecosystem/core-kernel": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"dayjs": "^1.8.17",
"pg": "^7.14.0",
"dayjs": "^1.8.21",
"pg": "^7.18.2",
"reflect-metadata": "^0.1.13",
"typeorm": "^0.2.21"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class TransactionRepository extends AbstractEntityRepository<Transaction>
limit?: number,
offset?: number,
): Promise<Array<Transaction & { blockHeight: number; blockGeneratorPublicKey: string; reward: Utils.BigNumber }>> {
const transactions = await this.createQueryBuilder("transactions")
const transactions = await this.createQueryBuilder()
.select()
.addSelect('blocks.height as "blockHeight"')
.addSelect('blocks.generatorPublicKey as "blockGeneratorPublicKey"')
Expand Down
4 changes: 2 additions & 2 deletions packages/core-forger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"@arkecosystem/core-p2p": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"node-forge": "^0.9.1",
"otplib": "^12.0.0",
"otplib": "^12.0.1",
"socketcluster-client": "^14.3.1",
"wif": "^2.0.6"
},
"devDependencies": {
"@types/node-forge": "^0.9.0",
"@types/node-forge": "^0.9.2",
"@types/socketcluster-client": "^13.0.3",
"@types/wif": "^2.0.1"
},
Expand Down
16 changes: 8 additions & 8 deletions packages/core-kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@
"@arkecosystem/utils": "^1.1.7",
"@hapi/joi": "^17.1.0",
"chalk": "^3.0.0",
"cron": "^1.7.2",
"dayjs": "^1.8.17",
"cron": "^1.8.2",
"dayjs": "^1.8.21",
"env-paths": "^2.2.0",
"fs-extra": "^8.1.0",
"import-fresh": "^3.2.1",
"inversify": "^5.0.1",
"log-process-errors": "^5.0.3",
"log-process-errors": "^6.0.0",
"nanomatch": "^1.2.13",
"nsfw": "^1.2.5",
"nsfw": "^1.2.7",
"reflect-metadata": "^0.1.13",
"semver": "^6.3.0",
"semver": "^7.1.3",
"type-fest": "^0.11.0"
},
"devDependencies": {
"@types/cron": "^1.7.1",
"@types/fs-extra": "^8.0.1",
"@types/cron": "^1.7.2",
"@types/fs-extra": "^8.1.0",
"@types/got": "^9.6.9",
"@types/log-process-errors": "^4.1.0",
"@types/semver": "^6.2.0"
"@types/semver": "^7.1.0"
},
"publishConfig": {
"access": "public"
Expand Down
35 changes: 8 additions & 27 deletions packages/core-kernel/src/services/config/watcher.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
import nsfw from "nsfw";
import nsfw, { NSFW } from "nsfw";

import { Application } from "../../contracts/kernel";
import { Identifiers, inject, injectable } from "../../ioc";

/**
* @interface FileEvent
*/
interface FileEvent {
/**
* @type {number}
* @memberof FileEvent
*/
action: number;

/**
* @type {string}
* @memberof FileEvent
*/
directory: string;

/**
* @type {string}
* @memberof FileEvent
*/
file: string;
}

/**
* @export
* @class Watcher
Expand All @@ -47,7 +24,7 @@ export class Watcher {
* @type {nsfw}
* @memberof Watcher
*/
private watcher: nsfw;
private watcher!: NSFW;

/**
* @returns {Promise<void>}
Expand All @@ -56,9 +33,13 @@ export class Watcher {
public async boot(): Promise<void> {
const configFiles: string[] = [".env", "delegates.json", "peers.json", "plugins.js", "plugins.json"];

this.watcher = await nsfw(this.app.configPath(), (events: FileEvent[]) => {
this.watcher = await nsfw(this.app.configPath(), events => {
for (const event of events) {
if (configFiles.includes(event.file) && event.action === nsfw.actions.MODIFIED) {
if (event.action !== nsfw.actions.MODIFIED) {
continue;
}

if (configFiles.includes(event.file)) {
this.app.reboot();
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/core-logger-pino/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"dependencies": {
"@arkecosystem/core-kernel": "^3.0.0-next.0",
"chalk": "^3.0.0",
"pino": "^5.14.0",
"pino-pretty": "^3.5.0",
"pino": "^5.17.0",
"pino-pretty": "^3.6.1",
"pump": "^3.0.0",
"readable-stream": "^3.4.0",
"rotating-file-stream": "^2.0.0",
"readable-stream": "^3.6.0",
"rotating-file-stream": "^2.0.2",
"split2": "^3.1.1",
"stream": "^0.0.2"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/core-magistrate-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
"@arkecosystem/core-api": "^3.0.0-next.0",
"@arkecosystem/core-kernel": "^3.0.0-next.0",
"@hapi/boom": "^9.0.0",
"@hapi/hapi": "^19.0.0",
"@hapi/hapi": "^19.1.1",
"@hapi/joi": "^17.1.0"
},
"devDependencies": {
"@types/hapi__boom": "^7.4.1",
"@types/hapi__joi": "^16.0.4"
"@types/hapi__joi": "^16.0.12"
},
"engines": {
"node": ">=10.x"
Expand Down
16 changes: 8 additions & 8 deletions packages/core-p2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@
"@arkecosystem/core-transaction-pool": "^3.0.0-next.0",
"@arkecosystem/crypto": "^3.0.0-next.0",
"@hapi/sntp": "^4.0.0",
"ajv": "^6.10.2",
"better-sqlite3": "^5.4.3",
"dayjs": "^1.8.17",
"ajv": "^6.12.0",
"better-sqlite3": "^6.0.1",
"dayjs": "^1.8.21",
"delay": "^4.3.0",
"fs-extra": "^8.1.0",
"ip": "^1.1.5",
"ipaddr.js": "^1.9.1",
"nanomatch": "^1.2.13",
"pluralize": "^8.0.0",
"pretty-ms": "^6.0.0",
"rate-limiter-flexible": "^1.1.0",
"pretty-ms": "^6.0.1",
"rate-limiter-flexible": "^2.0.0",
"scc-broker-client": "^6.1.0",
"semver": "^6.3.0",
"semver": "^7.1.3",
"socketcluster": "^14.4.2",
"socketcluster-client": "^14.3.1"
},
"devDependencies": {
"@types/better-sqlite3": "^5.4.0",
"@types/fs-extra": "^8.0.1",
"@types/fs-extra": "^8.1.0",
"@types/hapi__sntp": "^3.1.0",
"@types/ip": "^1.1.0",
"@types/scc-broker-client": "^6.1.0",
"@types/semver": "^6.2.0",
"@types/semver": "^7.1.0",
"@types/socketcluster": "^14.0.2",
"@types/socketcluster-client": "^13.0.3"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/core-test-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"@arkecosystem/crypto": "^3.0.0-next.0",
"bip39": "^3.0.2",
"bs58": "^4.0.1",
"chance": "^1.1.3",
"chance": "^1.1.4",
"fast-memoize": "^2.5.1",
"got": "^10.0.1",
"jest-extended": "^0.11.2",
"xstate": "^4.7.2"
"got": "^10.6.0",
"jest-extended": "^0.11.5",
"xstate": "^4.7.8"
},
"devDependencies": {
"@types/got": "^9.6.9"
Expand Down
Loading