From e5662e2d9e31e30ebb3142a4729858f1ad9d589a Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:07:45 +0900 Subject: [PATCH 1/7] upgrade to hapi 21 --- packages/api-common/package.json | 16 +- packages/api-development/package.json | 14 +- packages/api-http/package.json | 14 +- packages/api-sync/package.json | 16 +- packages/api-transaction-pool/package.json | 14 +- packages/api/package.json | 4 +- packages/cli/package.json | 4 +- packages/core/package.json | 4 +- .../crypto-consensus-bls12-381/package.json | 3 +- packages/fees-burn/package.json | 4 +- packages/fees-managed/package.json | 4 +- packages/kernel/package.json | 4 +- packages/logger-pino/package.json | 4 +- packages/logger-winston/package.json | 4 +- packages/networking-dns/package.json | 4 +- packages/networking-ntp/package.json | 4 +- packages/p2p/package.json | 4 +- packages/test-framework/package.json | 4 +- packages/transaction-pool/package.json | 4 +- packages/utils/package.json | 6 +- packages/webhooks/package.json | 12 +- pnpm-lock.yaml | 424 +++++------------- 22 files changed, 180 insertions(+), 391 deletions(-) diff --git a/packages/api-common/package.json b/packages/api-common/package.json index e0c445092..ec2c747a7 100644 --- a/packages/api-common/package.json +++ b/packages/api-common/package.json @@ -19,28 +19,28 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/boom": "9.1.4", - "@hapi/hapi": "20.1.5", - "@hapi/hoek": "9.2.0", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", + "@hapi/hoek": "11.0.2", "@mainsail/api-database": "workspace:*", "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", "@mainsail/utils": "workspace:*", - "joi": "17.9.2", + "joi": "17.11.0", "nanomatch": "1.2.13", "rate-limiter-flexible": "1.3.2", "semver": "6.3.0" }, "devDependencies": { - "@types/hapi__boom": "7.4.1", + "@types/hapi__boom": "9.0.1", "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", + "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", - "@types/semver": "6.2.3", + "@types/semver": "7.5.3", "uvu": "^0.5.6" }, "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/api-development/package.json b/packages/api-development/package.json index 4d0753cf5..884b0a45a 100644 --- a/packages/api-development/package.json +++ b/packages/api-development/package.json @@ -19,23 +19,23 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/boom": "9.1.4", - "@hapi/hapi": "20.1.5", - "@hapi/hoek": "9.2.0", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", + "@hapi/hoek": "11.0.2", "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", "@mainsail/transactions": "workspace:*", "@mainsail/utils": "workspace:*", - "joi": "17.9.2", + "joi": "17.11.0", "nanomatch": "1.2.13", "rate-limiter-flexible": "1.3.2", "semver": "6.3.0" }, "devDependencies": { - "@types/hapi__boom": "7.4.1", + "@types/hapi__boom": "9.0.1", "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", + "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "uvu": "^0.5.6" @@ -48,4 +48,4 @@ "alias": "api-development" } } -} +} \ No newline at end of file diff --git a/packages/api-http/package.json b/packages/api-http/package.json index c49c54b92..59ee2aba9 100644 --- a/packages/api-http/package.json +++ b/packages/api-http/package.json @@ -20,9 +20,9 @@ "test:integration": "uvu -r tsm integration .test.ts" }, "dependencies": { - "@hapi/boom": "9.1.4", - "@hapi/hapi": "20.1.5", - "@hapi/hoek": "9.2.0", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", + "@hapi/hoek": "11.0.2", "@mainsail/api-common": "workspace:*", "@mainsail/api-database": "workspace:*", "@mainsail/container": "workspace:*", @@ -30,15 +30,15 @@ "@mainsail/kernel": "workspace:*", "@mainsail/utils": "workspace:*", "dayjs": "1.10.7", - "joi": "17.9.2", + "joi": "17.11.0", "nanomatch": "1.2.13", "rate-limiter-flexible": "1.3.2", "semver": "6.3.0" }, "devDependencies": { - "@types/hapi__boom": "7.4.1", + "@types/hapi__boom": "9.0.1", "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", + "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "got": "11.8.6", @@ -52,4 +52,4 @@ "alias": "api-http" } } -} +} \ No newline at end of file diff --git a/packages/api-sync/package.json b/packages/api-sync/package.json index 079398c34..34760ffda 100644 --- a/packages/api-sync/package.json +++ b/packages/api-sync/package.json @@ -19,25 +19,13 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/boom": "9.1.4", - "@hapi/hapi": "20.1.5", - "@hapi/hoek": "9.2.0", "@mainsail/api-database": "workspace:*", "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", - "@mainsail/utils": "workspace:*", - "joi": "17.9.2", - "nanomatch": "1.2.13", - "rate-limiter-flexible": "1.3.2", - "semver": "6.3.0" + "@mainsail/utils": "workspace:*" }, "devDependencies": { - "@types/hapi__boom": "7.4.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", - "@types/ip": "1.1.0", - "@types/semver": "6.2.3", "uvu": "^0.5.6" }, "engines": { @@ -53,4 +41,4 @@ ] } } -} +} \ No newline at end of file diff --git a/packages/api-transaction-pool/package.json b/packages/api-transaction-pool/package.json index 3eafe1a2c..da08df8b7 100644 --- a/packages/api-transaction-pool/package.json +++ b/packages/api-transaction-pool/package.json @@ -19,9 +19,9 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/boom": "9.1.4", - "@hapi/hapi": "20.1.5", - "@hapi/hoek": "9.2.0", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", + "@hapi/hoek": "11.0.2", "@mainsail/api-common": "workspace:*", "@mainsail/api-database": "workspace:*", "@mainsail/container": "workspace:*", @@ -30,15 +30,15 @@ "@mainsail/transactions": "workspace:*", "@mainsail/utils": "workspace:*", "dayjs": "1.10.7", - "joi": "17.9.2", + "joi": "17.11.0", "nanomatch": "1.2.13", "rate-limiter-flexible": "1.3.2", "semver": "6.3.0" }, "devDependencies": { - "@types/hapi__boom": "7.4.1", + "@types/hapi__boom": "9.0.1", "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", + "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "got": "11.8.6", @@ -52,4 +52,4 @@ "alias": "api-transaction-pool" } } -} +} \ No newline at end of file diff --git a/packages/api/package.json b/packages/api/package.json index facc8f6f2..b07c4f501 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -41,7 +41,7 @@ "envfile": "5.2.0", "execa": "3.4.0", "fs-extra": "8.1.0", - "joi": "17.9.2", + "joi": "17.11.0", "kleur": "4.1.4", "prompts": "2.4.0", "tmp": "0.2.1", @@ -61,4 +61,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index da707ee0c..74140da9b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,7 +33,7 @@ "fs-extra": "8.1.0", "glob": "7.1.7", "got": "11.8.6", - "joi": "17.9.2", + "joi": "17.11.0", "kleur": "4.0.0", "latest-version": "5.1.0", "listr": "0.14.3", @@ -67,4 +67,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index b081edb90..2dd9becd0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -83,7 +83,7 @@ "envfile": "5.2.0", "execa": "3.4.0", "fs-extra": "8.1.0", - "joi": "17.9.2", + "joi": "17.11.0", "kleur": "4.1.4", "prompts": "2.4.0", "tmp": "0.2.1", @@ -103,4 +103,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/crypto-consensus-bls12-381/package.json b/packages/crypto-consensus-bls12-381/package.json index 8e2a5383f..827b6c7fa 100644 --- a/packages/crypto-consensus-bls12-381/package.json +++ b/packages/crypto-consensus-bls12-381/package.json @@ -19,7 +19,6 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/hapi": "20.1.5", "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/crypto-key-pair-bls12-381": "workspace:*", @@ -41,4 +40,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/fees-burn/package.json b/packages/fees-burn/package.json index 6e00774ff..fa94fc368 100644 --- a/packages/fees-burn/package.json +++ b/packages/fees-burn/package.json @@ -23,7 +23,7 @@ "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", "@mainsail/utils": "workspace:*", - "joi": "17.9.2" + "joi": "17.11.0" }, "devDependencies": { "uvu": "^0.5.6" @@ -31,4 +31,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/fees-managed/package.json b/packages/fees-managed/package.json index 43a4e588b..2829428ff 100644 --- a/packages/fees-managed/package.json +++ b/packages/fees-managed/package.json @@ -24,7 +24,7 @@ "@mainsail/fees": "workspace:*", "@mainsail/kernel": "workspace:*", "@mainsail/utils": "workspace:*", - "joi": "17.9.2" + "joi": "17.11.0" }, "devDependencies": { "uvu": "^0.5.6" @@ -32,4 +32,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/kernel/package.json b/packages/kernel/package.json index 8382273a8..d312ba942 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -32,7 +32,7 @@ "glob": "7.1.7", "import-fresh": "3.3.0", "ipaddr.js": "2.0.1", - "joi": "17.9.2", + "joi": "17.11.0", "log-process-errors": "5.1.2", "nanomatch": "1.2.13", "nsfw": "2.1.2", @@ -58,4 +58,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/logger-pino/package.json b/packages/logger-pino/package.json index 338a9e4fa..42129dc64 100644 --- a/packages/logger-pino/package.json +++ b/packages/logger-pino/package.json @@ -23,7 +23,7 @@ "@mainsail/kernel": "workspace:*", "chalk": "4.1.2", "fs-extra": "11.1.1", - "joi": "17.9.2", + "joi": "17.11.0", "pino": "6.13.2", "pino-pretty": "4.8.0", "pump": "3.0.0", @@ -52,4 +52,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/logger-winston/package.json b/packages/logger-winston/package.json index a8b80e346..7edf43b32 100644 --- a/packages/logger-winston/package.json +++ b/packages/logger-winston/package.json @@ -21,7 +21,7 @@ "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", - "joi": "17.9.2", + "joi": "17.11.0", "winston": "^3.6.0" }, "devDependencies": { @@ -30,4 +30,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/networking-dns/package.json b/packages/networking-dns/package.json index 37ee30eef..e4bca12f1 100644 --- a/packages/networking-dns/package.json +++ b/packages/networking-dns/package.json @@ -22,7 +22,7 @@ "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", - "joi": "17.9.2" + "joi": "17.11.0" }, "devDependencies": { "uvu": "^0.5.6" @@ -30,4 +30,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/networking-ntp/package.json b/packages/networking-ntp/package.json index cf8c75a71..9dfe9e846 100644 --- a/packages/networking-ntp/package.json +++ b/packages/networking-ntp/package.json @@ -23,7 +23,7 @@ "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", - "joi": "17.9.2" + "joi": "17.11.0" }, "devDependencies": { "@types/hapi__sntp": "3.1.2", @@ -32,4 +32,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/p2p/package.json b/packages/p2p/package.json index 6f33f09d6..ace2110e7 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -36,7 +36,7 @@ "delay": "5.0.0", "ip": "1.1.8", "ipaddr.js": "2.0.1", - "joi": "17.9.2", + "joi": "17.11.0", "pluralize": "8.0.0", "protobufjs": "7.2.4", "rate-limiter-flexible": "2.4.2", @@ -64,4 +64,4 @@ "alias": "p2p" } } -} +} \ No newline at end of file diff --git a/packages/test-framework/package.json b/packages/test-framework/package.json index 5eaeee920..da73b9c6d 100644 --- a/packages/test-framework/package.json +++ b/packages/test-framework/package.json @@ -58,9 +58,9 @@ "@types/lodash.clonedeep": "4.5.0", "@types/sinon": "^10.0.14", "@types/tmp": "0.2.1", - "joi": "17.9.2" + "joi": "17.11.0" }, "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/transaction-pool/package.json b/packages/transaction-pool/package.json index 5cd2b1c17..8bcf07ddb 100644 --- a/packages/transaction-pool/package.json +++ b/packages/transaction-pool/package.json @@ -25,7 +25,7 @@ "@mainsail/utils": "workspace:*", "better-sqlite3": "8.3.0", "fs-extra": "8.1.0", - "joi": "17.9.2" + "joi": "17.11.0" }, "devDependencies": { "@mainsail/crypto-config": "workspace:*", @@ -42,4 +42,4 @@ "alias": "transactionPool" } } -} +} \ No newline at end of file diff --git a/packages/utils/package.json b/packages/utils/package.json index 13540c8ed..382356f51 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -28,8 +28,8 @@ "type-fest": "0.21.3" }, "devDependencies": { - "@hapi/boom": "^9.1.0", - "@hapi/hapi": "^20.0.1", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", "@types/benchmark": "^1.0.33", "@types/deepmerge": "^2.2.0", "@types/hapi__hapi": "^20.0.13", @@ -40,4 +40,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/webhooks/package.json b/packages/webhooks/package.json index 5fc22dcb8..9b1946951 100644 --- a/packages/webhooks/package.json +++ b/packages/webhooks/package.json @@ -18,22 +18,22 @@ "test:file": "uvu -r tsm source" }, "dependencies": { - "@hapi/boom": "9.0.0", - "@hapi/hapi": "20.1.5", + "@hapi/boom": "10.0.1", + "@hapi/hapi": "21.3.2", "@mainsail/container": "workspace:*", "@mainsail/contracts": "workspace:*", "@mainsail/kernel": "workspace:*", "@mainsail/utils": "workspace:*", "fs-extra": "8.1.0", - "joi": "17.9.2", + "joi": "17.11.0", "lowdb": "1.0.0", "uuid": "8.3.2" }, "devDependencies": { "@types/fs-extra": "8.1.2", - "@types/hapi__boom": "7.4.1", + "@types/hapi__boom": "9.0.1", "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.7", + "@types/hapi__joi": "17.1.11", "@types/tmp": "0.2.1", "@types/uuid": "8.3.1", "import-fresh": "3.3.0", @@ -43,4 +43,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e099814c..67bdc9079 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,8 +183,8 @@ importers: specifier: 8.1.0 version: 8.1.0 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 kleur: specifier: 4.1.4 version: 4.1.4 @@ -223,14 +223,14 @@ importers: packages/api-common: dependencies: '@hapi/boom': - specifier: 9.1.4 - version: 9.1.4 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@hapi/hoek': - specifier: 9.2.0 - version: 9.2.0 + specifier: 11.0.2 + version: 11.0.2 '@mainsail/api-database': specifier: workspace:* version: link:../api-database @@ -247,8 +247,8 @@ importers: specifier: workspace:* version: link:../utils joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 nanomatch: specifier: 1.2.13 version: 1.2.13 @@ -260,20 +260,20 @@ importers: version: 6.3.0 devDependencies: '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 + specifier: 9.0.1 + version: 9.0.1 '@types/hapi__hapi': specifier: 21.0.0 version: 21.0.0 '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 + specifier: 17.1.11 + version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 '@types/semver': - specifier: 6.2.3 - version: 6.2.3 + specifier: 7.5.3 + version: 7.5.3 uvu: specifier: ^0.5.6 version: 0.5.6 @@ -312,14 +312,14 @@ importers: packages/api-development: dependencies: '@hapi/boom': - specifier: 9.1.4 - version: 9.1.4 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@hapi/hoek': - specifier: 9.2.0 - version: 9.2.0 + specifier: 11.0.2 + version: 11.0.2 '@mainsail/container': specifier: workspace:* version: link:../container @@ -336,8 +336,8 @@ importers: specifier: workspace:* version: link:../utils joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 nanomatch: specifier: 1.2.13 version: 1.2.13 @@ -349,14 +349,14 @@ importers: version: 6.3.0 devDependencies: '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 + specifier: 9.0.1 + version: 9.0.1 '@types/hapi__hapi': specifier: 21.0.0 version: 21.0.0 '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 + specifier: 17.1.11 + version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -370,14 +370,14 @@ importers: packages/api-http: dependencies: '@hapi/boom': - specifier: 9.1.4 - version: 9.1.4 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@hapi/hoek': - specifier: 9.2.0 - version: 9.2.0 + specifier: 11.0.2 + version: 11.0.2 '@mainsail/api-common': specifier: workspace:* version: link:../api-common @@ -400,8 +400,8 @@ importers: specifier: 1.10.7 version: 1.10.7 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 nanomatch: specifier: 1.2.13 version: 1.2.13 @@ -413,14 +413,14 @@ importers: version: 6.3.0 devDependencies: '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 + specifier: 9.0.1 + version: 9.0.1 '@types/hapi__hapi': specifier: 21.0.0 version: 21.0.0 '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 + specifier: 17.1.11 + version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -436,15 +436,6 @@ importers: packages/api-sync: dependencies: - '@hapi/boom': - specifier: 9.1.4 - version: 9.1.4 - '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 - '@hapi/hoek': - specifier: 9.2.0 - version: 9.2.0 '@mainsail/api-database': specifier: workspace:* version: link:../api-database @@ -460,34 +451,7 @@ importers: '@mainsail/utils': specifier: workspace:* version: link:../utils - joi: - specifier: 17.9.2 - version: 17.9.2 - nanomatch: - specifier: 1.2.13 - version: 1.2.13 - rate-limiter-flexible: - specifier: 1.3.2 - version: 1.3.2 - semver: - specifier: 6.3.0 - version: 6.3.0 devDependencies: - '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 - '@types/ip': - specifier: 1.1.0 - version: 1.1.0 - '@types/semver': - specifier: 6.2.3 - version: 6.2.3 uvu: specifier: ^0.5.6 version: 0.5.6 @@ -495,14 +459,14 @@ importers: packages/api-transaction-pool: dependencies: '@hapi/boom': - specifier: 9.1.4 - version: 9.1.4 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@hapi/hoek': - specifier: 9.2.0 - version: 9.2.0 + specifier: 11.0.2 + version: 11.0.2 '@mainsail/api-common': specifier: workspace:* version: link:../api-common @@ -528,8 +492,8 @@ importers: specifier: 1.10.7 version: 1.10.7 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 nanomatch: specifier: 1.2.13 version: 1.2.13 @@ -541,14 +505,14 @@ importers: version: 6.3.0 devDependencies: '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 + specifier: 9.0.1 + version: 9.0.1 '@types/hapi__hapi': specifier: 21.0.0 version: 21.0.0 '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 + specifier: 17.1.11 + version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -623,8 +587,8 @@ importers: specifier: 11.8.6 version: 11.8.6 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 kleur: specifier: 4.0.0 version: 4.0.0 @@ -1078,8 +1042,8 @@ importers: specifier: 8.1.0 version: 8.1.0 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 kleur: specifier: 4.1.4 version: 4.1.4 @@ -1409,9 +1373,6 @@ importers: packages/crypto-consensus-bls12-381: dependencies: - '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 '@mainsail/container': specifier: workspace:* version: link:../container @@ -2262,8 +2223,8 @@ importers: specifier: workspace:* version: link:../utils joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 devDependencies: uvu: specifier: ^0.5.6 @@ -2287,8 +2248,8 @@ importers: specifier: workspace:* version: link:../utils joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 devDependencies: uvu: specifier: ^0.5.6 @@ -2358,8 +2319,8 @@ importers: specifier: 2.0.1 version: 2.0.1 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 log-process-errors: specifier: 5.1.2 version: 5.1.2 @@ -2441,8 +2402,8 @@ importers: specifier: 11.1.1 version: 11.1.1 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 pino: specifier: 6.13.2 version: 6.13.2 @@ -2523,8 +2484,8 @@ importers: specifier: workspace:* version: link:../kernel joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 winston: specifier: ^3.6.0 version: 3.6.0 @@ -2545,8 +2506,8 @@ importers: specifier: workspace:* version: link:../kernel joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 devDependencies: uvu: specifier: ^0.5.6 @@ -2567,8 +2528,8 @@ importers: specifier: workspace:* version: link:../kernel joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 devDependencies: '@types/hapi__sntp': specifier: 3.1.2 @@ -2622,8 +2583,8 @@ importers: specifier: 2.0.1 version: 2.0.1 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 pluralize: specifier: 8.0.0 version: 8.0.0 @@ -2880,8 +2841,8 @@ importers: specifier: 0.2.1 version: 0.2.1 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 packages/transaction-pool: dependencies: @@ -2904,8 +2865,8 @@ importers: specifier: 8.1.0 version: 8.1.0 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 devDependencies: '@mainsail/crypto-config': specifier: workspace:* @@ -2970,11 +2931,11 @@ importers: version: 0.21.3 devDependencies: '@hapi/boom': - specifier: ^9.1.0 - version: 9.1.4 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: ^20.0.1 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@types/benchmark': specifier: ^1.0.33 version: 1.0.33 @@ -3106,11 +3067,11 @@ importers: packages/webhooks: dependencies: '@hapi/boom': - specifier: 9.0.0 - version: 9.0.0 + specifier: 10.0.1 + version: 10.0.1 '@hapi/hapi': - specifier: 20.1.5 - version: 20.1.5 + specifier: 21.3.2 + version: 21.3.2 '@mainsail/container': specifier: workspace:* version: link:../container @@ -3127,8 +3088,8 @@ importers: specifier: 8.1.0 version: 8.1.0 joi: - specifier: 17.9.2 - version: 17.9.2 + specifier: 17.11.0 + version: 17.11.0 lowdb: specifier: 1.0.0 version: 1.0.0 @@ -3140,14 +3101,14 @@ importers: specifier: 8.1.2 version: 8.1.2 '@types/hapi__boom': - specifier: 7.4.1 - version: 7.4.1 + specifier: 9.0.1 + version: 9.0.1 '@types/hapi__hapi': specifier: 21.0.0 version: 21.0.0 '@types/hapi__joi': - specifier: 17.1.7 - version: 17.1.7 + specifier: 17.1.11 + version: 17.1.11 '@types/tmp': specifier: 0.2.1 version: 0.2.1 @@ -3806,53 +3767,32 @@ packages: /@gar/promisify@1.1.3: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} - /@hapi/accept@5.0.2: - resolution: {integrity: sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/hoek': 9.2.0 - /@hapi/accept@6.0.1: resolution: {integrity: sha512-aLkYj7zzgC3CSlEVOs84eBOEE3i9xZK2tdQEP+TOj2OFzMWCi9zjkRet82V3GGjecE//zFrCLKIykuaE0uM4bg==} dependencies: '@hapi/boom': 10.0.1 '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/ammo@5.0.1: - resolution: {integrity: sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==} - dependencies: - '@hapi/hoek': 9.2.0 /@hapi/ammo@6.0.1: resolution: {integrity: sha512-pmL+nPod4g58kXrMcsGLp05O2jF4P2Q3GiL8qYV7nKYEh3cGf+rV4P5Jyi2Uq0agGhVU63GtaSAfBEZOlrJn9w==} dependencies: '@hapi/hoek': 11.0.2 - dev: false /@hapi/b64@5.0.0: resolution: {integrity: sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==} dependencies: '@hapi/hoek': 9.2.0 + dev: true /@hapi/b64@6.0.1: resolution: {integrity: sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==} dependencies: '@hapi/hoek': 11.0.2 - dev: false /@hapi/boom@10.0.1: resolution: {integrity: sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==} dependencies: '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/boom@9.0.0: - resolution: {integrity: sha512-D+Or4yahLq3L7D1Jf0fR1+Lgr+HPK1lej8tc6hS/fBLmK66XdpvTyKv8YUR5ls1GeQy+KGtbpKAs+ZxyzNtUyA==} - deprecated: This version has been deprecated and is no longer supported or maintained - dependencies: - '@hapi/hoek': 9.2.0 - dev: false /@hapi/boom@9.1.4: resolution: {integrity: sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==} @@ -3864,13 +3804,13 @@ packages: dependencies: '@hapi/boom': 9.1.4 '@hapi/hoek': 9.2.0 + dev: false /@hapi/bounce@3.0.1: resolution: {integrity: sha512-G+/Pp9c1Ha4FDP+3Sy/Xwg2O4Ahaw3lIZFSX+BL4uWi64CmiETuZPxhKDUD4xBMOUZbBlzvO8HjiK8ePnhBadA==} dependencies: '@hapi/boom': 10.0.1 '@hapi/hoek': 11.0.2 - dev: false /@hapi/bourne@2.0.0: resolution: {integrity: sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==} @@ -3880,41 +3820,18 @@ packages: /@hapi/bourne@3.0.0: resolution: {integrity: sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==} - dev: false - - /@hapi/call@8.0.1: - resolution: {integrity: sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/hoek': 9.2.0 /@hapi/call@9.0.1: resolution: {integrity: sha512-uPojQRqEL1GRZR4xXPqcLMujQGaEpyVPRyBlD8Pp5rqgIwLhtveF9PkixiKru2THXvuN8mUrLeet5fqxKAAMGg==} dependencies: '@hapi/boom': 10.0.1 '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/catbox-memory@5.0.1: - resolution: {integrity: sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/hoek': 9.2.0 /@hapi/catbox-memory@6.0.1: resolution: {integrity: sha512-sVb+/ZxbZIvaMtJfAbdyY+QJUQg9oKTwamXpEg/5xnfG5WbJLTjvEn4kIGKz9pN3ENNbIL/bIdctmHmqi/AdGA==} dependencies: '@hapi/boom': 10.0.1 '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/catbox@11.1.1: - resolution: {integrity: sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/hoek': 9.2.0 - '@hapi/podium': 4.1.3 - '@hapi/validate': 1.1.3 /@hapi/catbox@12.1.1: resolution: {integrity: sha512-hDqYB1J+R0HtZg4iPH3LEnldoaBsar6bYp0EonBmNQ9t5CO+1CqgCul2ZtFveW1ReA5SQuze9GPSU7/aecERhw==} @@ -3923,61 +3840,27 @@ packages: '@hapi/hoek': 11.0.2 '@hapi/podium': 5.0.1 '@hapi/validate': 2.0.1 - dev: false - - /@hapi/content@5.0.2: - resolution: {integrity: sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==} - dependencies: - '@hapi/boom': 9.1.4 /@hapi/content@6.0.0: resolution: {integrity: sha512-CEhs7j+H0iQffKfe5Htdak5LBOz/Qc8TRh51cF+BFv0qnuph3Em4pjGVzJMkI2gfTDdlJKWJISGWS1rK34POGA==} dependencies: '@hapi/boom': 10.0.1 - dev: false /@hapi/cryptiles@5.1.0: resolution: {integrity: sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==} engines: {node: '>=12.0.0'} dependencies: '@hapi/boom': 9.1.4 + dev: true /@hapi/cryptiles@6.0.1: resolution: {integrity: sha512-9GM9ECEHfR8lk5ASOKG4+4ZsEzFqLfhiryIJ2ISePVB92OHLp/yne4m+zn7z9dgvM98TLpiFebjDFQ0UHcqxXQ==} engines: {node: '>=14.0.0'} dependencies: '@hapi/boom': 10.0.1 - dev: false - - /@hapi/file@2.0.0: - resolution: {integrity: sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==} /@hapi/file@3.0.0: resolution: {integrity: sha512-w+lKW+yRrLhJu620jT3y+5g2mHqnKfepreykvdOcl9/6up8GrQQn+l3FRTsjHTKbkbfQFkuksHpdv2EcpKcJ4Q==} - dev: false - - /@hapi/hapi@20.1.5: - resolution: {integrity: sha512-BhJ5XFR9uWPUBj/z5pPqXSk8OnvQQU/EbQjwpmjZy0ymNEiq7kIhXkAmzXcntbBHta9o7zpW8XMeXnfV4wudXw==} - engines: {node: '>=12.0.0'} - dependencies: - '@hapi/accept': 5.0.2 - '@hapi/ammo': 5.0.1 - '@hapi/boom': 9.1.4 - '@hapi/bounce': 2.0.0 - '@hapi/call': 8.0.1 - '@hapi/catbox': 11.1.1 - '@hapi/catbox-memory': 5.0.1 - '@hapi/heavy': 7.0.1 - '@hapi/hoek': 9.2.0 - '@hapi/mimos': 6.0.0 - '@hapi/podium': 4.1.3 - '@hapi/shot': 5.0.5 - '@hapi/somever': 3.0.1 - '@hapi/statehood': 7.0.4 - '@hapi/subtext': 7.1.0 - '@hapi/teamwork': 5.1.1 - '@hapi/topo': 5.1.0 - '@hapi/validate': 1.1.3 /@hapi/hapi@21.3.2: resolution: {integrity: sha512-tbm0zmsdUj8iw4NzFV30FST/W4qzh/Lsw6Q5o5gAhOuoirWvxm8a4G3o60bqBw8nXvRNJ8uLtE0RKLlZINxHcQ==} @@ -4001,14 +3884,6 @@ packages: '@hapi/teamwork': 6.0.0 '@hapi/topo': 6.0.2 '@hapi/validate': 2.0.1 - dev: false - - /@hapi/heavy@7.0.1: - resolution: {integrity: sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/hoek': 9.2.0 - '@hapi/validate': 1.1.3 /@hapi/heavy@8.0.1: resolution: {integrity: sha512-gBD/NANosNCOp6RsYTsjo2vhr5eYA3BEuogk6cxY0QdhllkkTaJFYtTXv46xd6qhBVMbMMqcSdtqey+UQU3//w==} @@ -4016,11 +3891,9 @@ packages: '@hapi/boom': 10.0.1 '@hapi/hoek': 11.0.2 '@hapi/validate': 2.0.1 - dev: false /@hapi/hoek@11.0.2: resolution: {integrity: sha512-aKmlCO57XFZ26wso4rJsW4oTUnrgTFw2jh3io7CAtO9w4UltBNwRXvXIVzzyfkaaLRo3nluP/19msA8vDUUuKw==} - dev: false /@hapi/hoek@9.2.0: resolution: {integrity: sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==} @@ -4033,6 +3906,7 @@ packages: '@hapi/bourne': 2.0.0 '@hapi/cryptiles': 5.1.0 '@hapi/hoek': 9.2.0 + dev: true /@hapi/iron@7.0.1: resolution: {integrity: sha512-tEZnrOujKpS6jLKliyWBl3A9PaE+ppuL/+gkbyPPDb/l2KSKQyH4lhMkVb+sBhwN+qaxxlig01JRqB8dk/mPxQ==} @@ -4042,27 +3916,12 @@ packages: '@hapi/bourne': 3.0.0 '@hapi/cryptiles': 6.0.1 '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/mimos@6.0.0: - resolution: {integrity: sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==} - dependencies: - '@hapi/hoek': 9.2.0 - mime-db: 1.52.0 /@hapi/mimos@7.0.1: resolution: {integrity: sha512-b79V+BrG0gJ9zcRx1VGcCI6r6GEzzZUgiGEJVoq5gwzuB2Ig9Cax8dUuBauQCFKvl2YWSWyOc8mZ8HDaJOtkew==} dependencies: '@hapi/hoek': 11.0.2 mime-db: 1.52.0 - dev: false - - /@hapi/nigel@4.0.2: - resolution: {integrity: sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==} - engines: {node: '>=12.0.0'} - dependencies: - '@hapi/hoek': 9.2.0 - '@hapi/vise': 4.0.0 /@hapi/nigel@5.0.1: resolution: {integrity: sha512-uv3dtYuB4IsNaha+tigWmN8mQw/O9Qzl5U26Gm4ZcJVtDdB1AVJOwX3X5wOX+A07qzpEZnOMBAm8jjSqGsU6Nw==} @@ -4070,16 +3929,6 @@ packages: dependencies: '@hapi/hoek': 11.0.2 '@hapi/vise': 5.0.1 - dev: false - - /@hapi/pez@5.1.0: - resolution: {integrity: sha512-YfB0btnkLB3lb6Ry/1KifnMPBm5ZPfaAHWFskzOMAgDgXgcBgA+zjpIynyEiBfWEz22DBT8o1e2tAaBdlt8zbw==} - dependencies: - '@hapi/b64': 5.0.0 - '@hapi/boom': 9.1.4 - '@hapi/content': 5.0.2 - '@hapi/hoek': 9.2.0 - '@hapi/nigel': 4.0.2 /@hapi/pez@6.1.0: resolution: {integrity: sha512-+FE3sFPYuXCpuVeHQ/Qag1b45clR2o54QoonE/gKHv9gukxQ8oJJZPR7o3/ydDTK6racnCJXxOyT1T93FCJMIg==} @@ -4089,7 +3938,6 @@ packages: '@hapi/content': 6.0.0 '@hapi/hoek': 11.0.2 '@hapi/nigel': 5.0.1 - dev: false /@hapi/podium@4.1.3: resolution: {integrity: sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==} @@ -4097,6 +3945,7 @@ packages: '@hapi/hoek': 9.2.0 '@hapi/teamwork': 5.1.1 '@hapi/validate': 1.1.3 + dev: true /@hapi/podium@5.0.1: resolution: {integrity: sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==} @@ -4104,20 +3953,12 @@ packages: '@hapi/hoek': 11.0.2 '@hapi/teamwork': 6.0.0 '@hapi/validate': 2.0.1 - dev: false - - /@hapi/shot@5.0.5: - resolution: {integrity: sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==} - dependencies: - '@hapi/hoek': 9.2.0 - '@hapi/validate': 1.1.3 /@hapi/shot@6.0.1: resolution: {integrity: sha512-s5ynMKZXYoDd3dqPw5YTvOR/vjHvMTxc388+0qL0jZZP1+uwXuUD32o9DuuuLsmTlyXCWi02BJl1pBpwRuUrNA==} dependencies: '@hapi/hoek': 11.0.2 '@hapi/validate': 2.0.1 - dev: false /@hapi/sntp@4.0.0: resolution: {integrity: sha512-yBXTlySZyPZKz0NPoxxFClKNMmVhsZq84Ir7+k93XNGLdSnY3iD0BosxflLpIbP7yr3p4T+QDPMNgOA3XccdFQ==} @@ -4128,29 +3969,11 @@ packages: '@hapi/teamwork': 4.0.0 dev: false - /@hapi/somever@3.0.1: - resolution: {integrity: sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==} - dependencies: - '@hapi/bounce': 2.0.0 - '@hapi/hoek': 9.2.0 - /@hapi/somever@4.1.1: resolution: {integrity: sha512-lt3QQiDDOVRatS0ionFDNrDIv4eXz58IibQaZQDOg4DqqdNme8oa0iPWcE0+hkq/KTeBCPtEOjDOBKBKwDumVg==} dependencies: '@hapi/bounce': 3.0.1 '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/statehood@7.0.4: - resolution: {integrity: sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/bounce': 2.0.0 - '@hapi/bourne': 2.1.0 - '@hapi/cryptiles': 5.1.0 - '@hapi/hoek': 9.2.0 - '@hapi/iron': 6.0.0 - '@hapi/validate': 1.1.3 /@hapi/statehood@8.1.1: resolution: {integrity: sha512-YbK7PSVUA59NArAW5Np0tKRoIZ5VNYUicOk7uJmWZF6XyH5gGL+k62w77SIJb0AoAJ0QdGQMCQ/WOGL1S3Ydow==} @@ -4162,18 +3985,6 @@ packages: '@hapi/hoek': 11.0.2 '@hapi/iron': 7.0.1 '@hapi/validate': 2.0.1 - dev: false - - /@hapi/subtext@7.1.0: - resolution: {integrity: sha512-n94cU6hlvsNRIpXaROzBNEJGwxC+HA69q769pChzej84On8vsU14guHDub7Pphr/pqn5b93zV3IkMPDU5AUiXA==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/bourne': 2.1.0 - '@hapi/content': 5.0.2 - '@hapi/file': 2.0.0 - '@hapi/hoek': 9.2.0 - '@hapi/pez': 5.1.0 - '@hapi/wreck': 17.2.0 /@hapi/subtext@8.1.0: resolution: {integrity: sha512-PyaN4oSMtqPjjVxLny1k0iYg4+fwGusIhaom9B2StinBclHs7v46mIW706Y+Wo21lcgulGyXbQrmT/w4dus6ww==} @@ -4185,7 +3996,6 @@ packages: '@hapi/hoek': 11.0.2 '@hapi/pez': 6.1.0 '@hapi/wreck': 18.0.1 - dev: false /@hapi/teamwork@4.0.0: resolution: {integrity: sha512-V6xYOrr5aFv/IJqNPneaYCu8vuGTKisamqHVRS3JJnbZr18TrpXdsJOYk9pjPhFti+M2YETPebQLUr820N5NoQ==} @@ -4195,11 +4005,11 @@ packages: /@hapi/teamwork@5.1.1: resolution: {integrity: sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==} engines: {node: '>=12.0.0'} + dev: true /@hapi/teamwork@6.0.0: resolution: {integrity: sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==} engines: {node: '>=14.0.0'} - dev: false /@hapi/topo@5.1.0: resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} @@ -4210,38 +4020,24 @@ packages: resolution: {integrity: sha512-KR3rD5inZbGMrHmgPxsJ9dbi6zEK+C3ZwUwTa+eMwWLz7oijWUTWD2pMSNNYJAU6Qq+65NkxXjqHr/7LM2Xkqg==} dependencies: '@hapi/hoek': 11.0.2 - dev: false /@hapi/validate@1.1.3: resolution: {integrity: sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==} dependencies: '@hapi/hoek': 9.2.0 '@hapi/topo': 5.1.0 + dev: true /@hapi/validate@2.0.1: resolution: {integrity: sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==} dependencies: '@hapi/hoek': 11.0.2 '@hapi/topo': 6.0.2 - dev: false - - /@hapi/vise@4.0.0: - resolution: {integrity: sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==} - dependencies: - '@hapi/hoek': 9.2.0 /@hapi/vise@5.0.1: resolution: {integrity: sha512-XZYWzzRtINQLedPYlIkSkUr7m5Ddwlu99V9elh8CSygXstfv3UnWIXT0QD+wmR0VAG34d2Vx3olqcEhRRoTu9A==} dependencies: '@hapi/hoek': 11.0.2 - dev: false - - /@hapi/wreck@17.2.0: - resolution: {integrity: sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/bourne': 2.1.0 - '@hapi/hoek': 9.2.0 /@hapi/wreck@18.0.1: resolution: {integrity: sha512-OLHER70+rZxvDl75xq3xXOfd3e8XIvz8fWY0dqg92UvhZ29zo24vQgfqgHSYhB5ZiuFpSLeriOisAlxAo/1jWg==} @@ -4249,7 +4045,6 @@ packages: '@hapi/boom': 10.0.1 '@hapi/bourne': 3.0.0 '@hapi/hoek': 11.0.2 - dev: false /@humanwhocodes/config-array@0.6.0: resolution: {integrity: sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==} @@ -5681,8 +5476,11 @@ packages: form-data: 2.5.1 dev: true - /@types/hapi__boom@7.4.1: - resolution: {integrity: sha512-x/ZK824GomII7Yoei/nMoB46NQcSfGe0iVpZK3uUivxIAfUUSzRvu8RQO7ZkKapIgzgshHZc+GR+z/BQ8l2VLg==} + /@types/hapi__boom@9.0.1: + resolution: {integrity: sha512-TSqwgnTmNNp3/9uOpV16S8IVJv+QDmZLEImSuQrzGLCzmuK5P3bx3wdaXGXxfWLlN09Qqnd27POLrEAKhVCM5g==} + deprecated: Deprecated + dependencies: + '@hapi/boom': 9.1.4 dev: true /@types/hapi__catbox@10.2.4: @@ -5699,18 +5497,18 @@ packages: '@types/hapi__mimos': 4.1.4 '@types/hapi__shot': 4.1.2 '@types/node': 20.1.0 - joi: 17.9.2 + joi: 17.11.0 dev: true /@types/hapi__hapi@21.0.0: resolution: {integrity: sha512-urNzL9HQgOp4QbeEOG/Y/XIcU1pB6skGh7LKMd0hGkxb8oRmWe083x5LAuLjZNtuhRU6yKhiSjjqQEJ+3pWjpQ==} deprecated: This is a stub types definition. @hapi/hapi provides its own type definitions, so you do not need this installed. dependencies: - '@hapi/hapi': 20.1.5 + '@hapi/hapi': 21.3.2 dev: true - /@types/hapi__joi@17.1.7: - resolution: {integrity: sha512-byC9slpuqyDeEKegl/ViT8PCQRSp0CYkhLzz0cPxqxV6QC53Ht1cr2jG5iwOvtt/RxylUbTpXNqpgbf9Qu8QFw==} + /@types/hapi__joi@17.1.11: + resolution: {integrity: sha512-4dwljh5JJPdDOkddyT/nGBDxJ7tZvLzcUaeT3XS0QO+LaluN38t4hUnNx65o7f0lIeDC9BJ4+IDJwQaDOS0zGQ==} dev: true /@types/hapi__mimos@4.1.4: @@ -5976,6 +5774,10 @@ packages: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true + /@types/semver@7.5.3: + resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} + dev: true + /@types/sinon@10.0.14: resolution: {integrity: sha512-mn72up6cjaMyMuaPaa/AwKf6WtsSRysQC7wxFkCm1XcOKXPM1z+5Y4H5wjIVBz4gdAkjvZxVVfjA6ba1nHr5WQ==} dependencies: @@ -6235,7 +6037,7 @@ packages: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.3.0) '@types/json-schema': 7.0.12 - '@types/semver': 7.3.13 + '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.5.5) @@ -11443,8 +11245,8 @@ packages: resolution: {integrity: sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w==} engines: {node: '>= 0.6.0'} - /joi@17.9.2: - resolution: {integrity: sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==} + /joi@17.11.0: + resolution: {integrity: sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==} dependencies: '@hapi/hoek': 9.2.0 '@hapi/topo': 5.1.0 From ab0b583b181ff0c61e5e118281198dbc07ad1d5c Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:55:38 +0900 Subject: [PATCH 2/7] fix compile errors --- packages/api-common/source/contracts/index.ts | 15 +++++++++++++++ .../source/plugins/comma-separated-query.ts | 4 +++- .../source/plugins/dot-separated-query.ts | 2 +- packages/api-common/source/plugins/index.ts | 2 +- packages/api-common/source/plugins/rate-limit.ts | 2 +- .../api-common/source/plugins/response-headers.ts | 8 ++++---- packages/api-common/source/server.ts | 12 ++++-------- packages/api-common/source/service-provider.ts | 4 ++-- .../api-development/source/controllers/blocks.ts | 10 +++++----- .../api-development/source/controllers/peers.ts | 4 ++-- .../source/controllers/transactions.ts | 13 +++++++------ packages/api-development/source/plugins/index.ts | 2 +- .../api-development/source/plugins/rate-limit.ts | 2 +- .../source/plugins/response-headers.ts | 5 ++--- .../api-development/source/routes/blockchain.ts | 2 +- packages/api-development/source/routes/blocks.ts | 2 +- .../api-development/source/routes/consensus.ts | 2 +- .../api-development/source/routes/delegates.ts | 2 +- packages/api-development/source/routes/node.ts | 2 +- packages/api-development/source/routes/peers.ts | 2 +- packages/api-development/source/routes/rounds.ts | 2 +- .../api-development/source/routes/transactions.ts | 3 ++- packages/api-development/source/routes/wallets.ts | 2 +- packages/api-development/source/server.ts | 6 +++--- .../api-http/source/controllers/blockchain.ts | 9 +++++---- packages/api-http/source/controllers/blocks.ts | 10 +++++----- packages/api-http/source/controllers/delegates.ts | 2 +- packages/api-http/source/controllers/node.ts | 8 ++++---- .../api-http/source/controllers/transactions.ts | 12 ++++++------ .../source/controllers/validator-rounds.ts | 4 ++-- packages/api-http/source/controllers/votes.ts | 4 ++-- packages/api-http/source/controllers/wallets.ts | 14 +++++++------- packages/api-http/source/handlers.ts | 4 ++-- packages/api-http/source/routes/blockchain.ts | 4 ++-- packages/api-http/source/routes/blocks.ts | 4 ++-- packages/api-http/source/routes/delegates.ts | 4 ++-- packages/api-http/source/routes/node.ts | 4 ++-- packages/api-http/source/routes/transactions.ts | 4 ++-- .../api-http/source/routes/validator-rounds.ts | 4 ++-- packages/api-http/source/routes/votes.ts | 4 ++-- packages/api-http/source/routes/wallets.ts | 4 ++-- .../source/controllers/transaction-pool.ts | 3 ++- packages/api-transaction-pool/source/handlers.ts | 5 ++--- .../source/routes/transaction-pool.ts | 3 ++- packages/webhooks/source/server/server.ts | 12 +++++++++++- 45 files changed, 129 insertions(+), 103 deletions(-) diff --git a/packages/api-common/source/contracts/index.ts b/packages/api-common/source/contracts/index.ts index ae926b5ff..86808efb0 100644 --- a/packages/api-common/source/contracts/index.ts +++ b/packages/api-common/source/contracts/index.ts @@ -1,3 +1,18 @@ +import { Contracts } from "@mainsail/contracts"; +import Hapi from "@hapi/hapi"; + +export type ApiServer = Hapi.Server; + +export enum ServerType { + Http = "HTTP", + Https = "HTTPS", +} + +export interface ServerState { + app: Contracts.Kernel.Application, + schemas: any; +} + export type Sorting = { property: string; direction: "asc" | "desc"; diff --git a/packages/api-common/source/plugins/comma-separated-query.ts b/packages/api-common/source/plugins/comma-separated-query.ts index 0cd75fd13..aab30ead1 100644 --- a/packages/api-common/source/plugins/comma-separated-query.ts +++ b/packages/api-common/source/plugins/comma-separated-query.ts @@ -1,4 +1,5 @@ import Hapi from "@hapi/hapi"; +import { set } from "@mainsail/utils"; export const commaArrayQuery = { name: "comma-array-query", @@ -10,7 +11,8 @@ export const commaArrayQuery = { query[key] = value.includes(separator) ? value.split(separator) : value; } - request.query = query; + set(request, "query", query); + return h.continue; }, diff --git a/packages/api-common/source/plugins/dot-separated-query.ts b/packages/api-common/source/plugins/dot-separated-query.ts index 9dd30b3f3..c60208fbc 100644 --- a/packages/api-common/source/plugins/dot-separated-query.ts +++ b/packages/api-common/source/plugins/dot-separated-query.ts @@ -8,7 +8,7 @@ export const dotSeparatedQuery = { for (const [key, value] of Object.entries(request.query)) { set(query, key, value); } - request.query = query; + set(request, "query", query); return h.continue; }, diff --git a/packages/api-common/source/plugins/index.ts b/packages/api-common/source/plugins/index.ts index 95784a484..1579b2966 100644 --- a/packages/api-common/source/plugins/index.ts +++ b/packages/api-common/source/plugins/index.ts @@ -6,7 +6,7 @@ import { rateLimit } from "./rate-limit"; import { responseHeaders } from "./response-headers"; import { whitelist } from "./whitelist"; -export const preparePlugins = (config) => [ +export const preparePlugins: any = (config) => [ { options: { trustProxy: config.trustProxy, diff --git a/packages/api-common/source/plugins/rate-limit.ts b/packages/api-common/source/plugins/rate-limit.ts index fa6c27b92..87af749a6 100644 --- a/packages/api-common/source/plugins/rate-limit.ts +++ b/packages/api-common/source/plugins/rate-limit.ts @@ -86,7 +86,7 @@ export const rateLimit = { if (request.plugins["rate-limit"]) { const data = request.plugins["rate-limit"] as RateLimitPluginData; - if (request.response.isBoom) { + if ("isBoom" in request.response) { request.response.output.headers["X-RateLimit-Limit"] = String(options.points); request.response.output.headers["X-RateLimit-Remaining"] = String(data.remaining); request.response.output.headers["X-RateLimit-Reset"] = new Date(data.reset).toUTCString(); diff --git a/packages/api-common/source/plugins/response-headers.ts b/packages/api-common/source/plugins/response-headers.ts index 7337db054..606367f86 100644 --- a/packages/api-common/source/plugins/response-headers.ts +++ b/packages/api-common/source/plugins/response-headers.ts @@ -1,6 +1,7 @@ import Hapi from "@hapi/hapi"; import { Contracts as ApiDatabaseContracts, Identifiers as ApiDatabaseIdentifiers } from "@mainsail/api-database"; import { Contracts } from "@mainsail/contracts"; +import { ApiServer } from "../contracts"; export const responseHeaders = { getOnPreResponseHandler(app: Contracts.Kernel.Application) { @@ -8,11 +9,10 @@ export const responseHeaders = { ApiDatabaseIdentifiers.BlockRepositoryFactory, ); - return async (request: Hapi.Request, h: Hapi.ResponseToolkit): Hapi.Lifecycle.ReturnValue => { + return async (request: Hapi.Request, h: Hapi.ResponseToolkit): Promise => { const blockHeight = await blockRepositoryFactory().getLatestHeight(); - const responsePropertyToUpdate = request.response.isBoom ? request.response.output : request.response; - responsePropertyToUpdate.headers = responsePropertyToUpdate.headers ?? {}; + const responsePropertyToUpdate = "isBoom" in request.response ? request.response.output : request.response; responsePropertyToUpdate.headers["x-block-height"] = blockHeight; return h.continue; @@ -20,7 +20,7 @@ export const responseHeaders = { }, name: "response-headers", - register(server: Hapi.Server): void { + register(server: ApiServer): void { server.ext("onPreResponse", this.getOnPreResponseHandler(server.app.app)); }, diff --git a/packages/api-common/source/server.ts b/packages/api-common/source/server.ts index a5f1977fd..1c74eabfa 100644 --- a/packages/api-common/source/server.ts +++ b/packages/api-common/source/server.ts @@ -3,11 +3,7 @@ import { inject, injectable } from "@mainsail/container"; import { Contracts, Identifiers } from "@mainsail/contracts"; import { Providers, Utils } from "@mainsail/kernel"; import { readFileSync } from "fs"; - -export enum ServerType { - Http = "HTTP", - Https = "HTTPS", -} +import { ApiServer, ServerType } from "./contracts"; @injectable() export abstract class AbstractServer { @@ -17,7 +13,7 @@ export abstract class AbstractServer { @inject(Identifiers.LogService) protected readonly logger!: Contracts.Kernel.Logger; - private server: HapiServer; + private server!: ApiServer; protected abstract baseName(): string; private serverType!: ServerType; @@ -49,8 +45,8 @@ export abstract class AbstractServer { }); this.server.ext("onPreResponse", (request, h) => { - if (request.response.isBoom && request.response.isServer) { - this.logger.error(request.response.stack); + if ("isBoom" in request.response && request.response.isBoom && request.response.isServer) { + this.logger.error(request.response.stack!); } return h.continue; }); diff --git a/packages/api-common/source/service-provider.ts b/packages/api-common/source/service-provider.ts index ea1e13179..08865af39 100644 --- a/packages/api-common/source/service-provider.ts +++ b/packages/api-common/source/service-provider.ts @@ -2,8 +2,8 @@ import { Providers } from "@mainsail/kernel"; import Joi from "joi"; import { preparePlugins } from "./plugins"; -// import { preparePlugins } from "./plugins"; -import { AbstractServer, ServerType } from "./server"; +import { AbstractServer } from "./server"; +import { ServerType } from "./contracts"; export type ServerConstructor = new (...arguments_: any[]) => T; export abstract class AbstractServiceProvider extends Providers.ServiceProvider { diff --git a/packages/api-development/source/controllers/blocks.ts b/packages/api-development/source/controllers/blocks.ts index 51ccbf830..39fa47941 100644 --- a/packages/api-development/source/controllers/blocks.ts +++ b/packages/api-development/source/controllers/blocks.ts @@ -11,7 +11,7 @@ export class BlocksController extends Controller { @inject(Identifiers.Database.Service) private readonly database!: Contracts.Database.IDatabaseService; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const lastBlock = this.stateService.getStateStore().getLastBlock(); const pagination = this.getQueryPagination(request.query); @@ -45,7 +45,7 @@ export class BlocksController extends Controller { } } - public async first(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async first(request: Hapi.Request) { const block = this.stateService.getStateStore().getGenesisBlock(); if (request.query.transform) { @@ -55,7 +55,7 @@ export class BlocksController extends Controller { } } - public async last(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async last(request: Hapi.Request) { const block = this.stateService.getStateStore().getLastBlock(); if (request.query.transform) { @@ -65,7 +65,7 @@ export class BlocksController extends Controller { } } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { const block = await this.getBlock(request.params.id); if (!block) { @@ -79,7 +79,7 @@ export class BlocksController extends Controller { } } - public async transactions(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async transactions(request: Hapi.Request) { const block = await this.getBlock(request.params.id); if (!block) { diff --git a/packages/api-development/source/controllers/peers.ts b/packages/api-development/source/controllers/peers.ts index aa2c79310..10c33701e 100644 --- a/packages/api-development/source/controllers/peers.ts +++ b/packages/api-development/source/controllers/peers.ts @@ -13,7 +13,7 @@ export class PeersController extends Controller { @inject(Identifiers.PeerRepository) private readonly peerRepository!: Contracts.P2P.PeerRepository; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const allPeers: Contracts.P2P.Peer[] = [...this.peerRepository.getPeers()]; let results = allPeers; @@ -86,7 +86,7 @@ export class PeersController extends Controller { return super.toPagination(resultsPage, PeerResource); } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { if (!this.peerRepository.hasPeer(request.params.ip)) { return Boom.notFound("Peer not found"); } diff --git a/packages/api-development/source/controllers/transactions.ts b/packages/api-development/source/controllers/transactions.ts index e2f2c5c43..7ec86ac63 100644 --- a/packages/api-development/source/controllers/transactions.ts +++ b/packages/api-development/source/controllers/transactions.ts @@ -24,7 +24,8 @@ export class TransactionsController extends Controller { @inject(Identifiers.TransactionPoolProcessor) private readonly processor!: Contracts.TransactionPool.Processor; - public async store(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async store(request: Hapi.Request) { + // @ts-ignore const result = await this.processor.process(request.payload.transactions); return { data: { @@ -37,7 +38,7 @@ export class TransactionsController extends Controller { }; } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { console.log("ID:", request.params.id); const transaction = await this.database.getTransaction(request.params.id); @@ -61,7 +62,7 @@ export class TransactionsController extends Controller { return this.respondWithResource(transaction.data, TransactionResource, false); } - public async unconfirmed(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async unconfirmed(request: Hapi.Request) { const pagination: Pagination = super.getListingPage(request); const all: Contracts.Crypto.ITransaction[] = await this.poolQuery.getFromHighestPriority().all(); const transactions: Contracts.Crypto.ITransaction[] = all.slice( @@ -78,7 +79,7 @@ export class TransactionsController extends Controller { return super.toPagination(resultsPage, TransactionResource, !!request.query.transform); } - public async showUnconfirmed(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async showUnconfirmed(request: Hapi.Request) { const transactionQuery: Contracts.TransactionPool.QueryIterable = this.poolQuery .getFromHighestPriority() .whereId(request.params.id); @@ -92,7 +93,7 @@ export class TransactionsController extends Controller { return super.respondWithResource(transaction.data, TransactionResource, !!request.query.transform); } - public async types(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async types(request: Hapi.Request) { const activatedTransactionHandlers = await this.nullHandlerRegistry.getActivatedHandlers(); const typeGroups: Record> = {}; @@ -117,7 +118,7 @@ export class TransactionsController extends Controller { return { data: typeGroups }; } - public async schemas(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async schemas(request: Hapi.Request) { const activatedTransactionHandlers = await this.nullHandlerRegistry.getActivatedHandlers(); const schemasByType: Record> = {}; diff --git a/packages/api-development/source/plugins/index.ts b/packages/api-development/source/plugins/index.ts index 9ba71b398..6ec5791a9 100644 --- a/packages/api-development/source/plugins/index.ts +++ b/packages/api-development/source/plugins/index.ts @@ -4,7 +4,7 @@ import { rateLimit } from "./rate-limit"; import { responseHeaders } from "./response-headers"; import { whitelist } from "./whitelist"; -export const preparePlugins = (config) => [ +export const preparePlugins: any = (config) => [ { options: { trustProxy: config.trustProxy, diff --git a/packages/api-development/source/plugins/rate-limit.ts b/packages/api-development/source/plugins/rate-limit.ts index fa6c27b92..87af749a6 100644 --- a/packages/api-development/source/plugins/rate-limit.ts +++ b/packages/api-development/source/plugins/rate-limit.ts @@ -86,7 +86,7 @@ export const rateLimit = { if (request.plugins["rate-limit"]) { const data = request.plugins["rate-limit"] as RateLimitPluginData; - if (request.response.isBoom) { + if ("isBoom" in request.response) { request.response.output.headers["X-RateLimit-Limit"] = String(options.points); request.response.output.headers["X-RateLimit-Remaining"] = String(data.remaining); request.response.output.headers["X-RateLimit-Reset"] = new Date(data.reset).toUTCString(); diff --git a/packages/api-development/source/plugins/response-headers.ts b/packages/api-development/source/plugins/response-headers.ts index 654bcbe90..236e48d71 100644 --- a/packages/api-development/source/plugins/response-headers.ts +++ b/packages/api-development/source/plugins/response-headers.ts @@ -9,8 +9,7 @@ export const responseHeaders = { .getStateStore() .getLastHeight(); - const responsePropertyToUpdate = request.response.isBoom ? request.response.output : request.response; - responsePropertyToUpdate.headers = responsePropertyToUpdate.headers ?? {}; + const responsePropertyToUpdate = "isBoom" in request.response ? request.response.output : request.response; responsePropertyToUpdate.headers["X-Block-Height"] = blockHeight; return h.continue; @@ -18,7 +17,7 @@ export const responseHeaders = { }, name: "response-headers", - register(server: Hapi.Server): void { + register(server: Hapi.Server): void { server.ext("onPreResponse", this.getOnPreResponseHandler(server.app.app)); }, diff --git a/packages/api-development/source/routes/blockchain.ts b/packages/api-development/source/routes/blockchain.ts index fc8fbfc6e..0eda72b99 100644 --- a/packages/api-development/source/routes/blockchain.ts +++ b/packages/api-development/source/routes/blockchain.ts @@ -2,7 +2,7 @@ import Hapi from "@hapi/hapi"; import { BlockchainController } from "../controllers/blockchain"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(BlockchainController); server.bind(controller); diff --git a/packages/api-development/source/routes/blocks.ts b/packages/api-development/source/routes/blocks.ts index 958767b90..b4728f0c3 100644 --- a/packages/api-development/source/routes/blocks.ts +++ b/packages/api-development/source/routes/blocks.ts @@ -4,7 +4,7 @@ import Joi from "joi"; import { BlocksController } from "../controllers/blocks"; import { blockId, pagination } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(BlocksController); server.bind(controller); diff --git a/packages/api-development/source/routes/consensus.ts b/packages/api-development/source/routes/consensus.ts index 3b2c610ca..b9edfe9c0 100644 --- a/packages/api-development/source/routes/consensus.ts +++ b/packages/api-development/source/routes/consensus.ts @@ -2,7 +2,7 @@ import Hapi from "@hapi/hapi"; import { ConsensusController } from "../controllers/consensus"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(ConsensusController); server.bind(controller); diff --git a/packages/api-development/source/routes/delegates.ts b/packages/api-development/source/routes/delegates.ts index 980f76765..47f02a4ca 100644 --- a/packages/api-development/source/routes/delegates.ts +++ b/packages/api-development/source/routes/delegates.ts @@ -3,7 +3,7 @@ import Hapi from "@hapi/hapi"; import { DelegatesController } from "../controllers/delegates"; import { pagination } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(DelegatesController); server.bind(controller); diff --git a/packages/api-development/source/routes/node.ts b/packages/api-development/source/routes/node.ts index ce63be0fd..36e8589bf 100644 --- a/packages/api-development/source/routes/node.ts +++ b/packages/api-development/source/routes/node.ts @@ -2,7 +2,7 @@ import Hapi from "@hapi/hapi"; import { NodeController } from "../controllers/node"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(NodeController); server.bind(controller); diff --git a/packages/api-development/source/routes/peers.ts b/packages/api-development/source/routes/peers.ts index 9f4acedee..1474fbbc9 100644 --- a/packages/api-development/source/routes/peers.ts +++ b/packages/api-development/source/routes/peers.ts @@ -4,7 +4,7 @@ import Joi from "joi"; import { PeersController } from "../controllers/peers"; import { orderBy, pagination } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(PeersController); server.bind(controller); diff --git a/packages/api-development/source/routes/rounds.ts b/packages/api-development/source/routes/rounds.ts index 9798d95a8..a66d165e4 100644 --- a/packages/api-development/source/routes/rounds.ts +++ b/packages/api-development/source/routes/rounds.ts @@ -3,7 +3,7 @@ import Joi from "joi"; import { RoundsController } from "../controllers/rounds"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(RoundsController); server.bind(controller); diff --git a/packages/api-development/source/routes/transactions.ts b/packages/api-development/source/routes/transactions.ts index e8b442ffa..4cfbfeab0 100644 --- a/packages/api-development/source/routes/transactions.ts +++ b/packages/api-development/source/routes/transactions.ts @@ -6,7 +6,7 @@ import Joi from "joi"; import { TransactionsController } from "../controllers/transactions"; import { pagination } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(TransactionsController); server.bind(controller); @@ -21,6 +21,7 @@ export const register = (server: Hapi.Server): void => { properties: { transactions: { $ref: "transactions", + //@ts-ignore maxItems: server.app.app .getTagged( Identifiers.PluginConfiguration, diff --git a/packages/api-development/source/routes/wallets.ts b/packages/api-development/source/routes/wallets.ts index fb01c783a..037ace0c6 100644 --- a/packages/api-development/source/routes/wallets.ts +++ b/packages/api-development/source/routes/wallets.ts @@ -3,7 +3,7 @@ import Hapi from "@hapi/hapi"; import { WalletsController } from "../controllers/wallets"; import { pagination } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Hapi.Server): void => { const controller = server.app.app.resolve(WalletsController); server.bind(controller); diff --git a/packages/api-development/source/server.ts b/packages/api-development/source/server.ts index 5c5c02ff5..36df24233 100644 --- a/packages/api-development/source/server.ts +++ b/packages/api-development/source/server.ts @@ -20,7 +20,7 @@ export class Server { @inject(Identifiers.LogService) private readonly logger!: Contracts.Kernel.Logger; - private server: HapiServer; + private server!: HapiServer; private name!: string; @@ -46,8 +46,8 @@ export class Server { }); this.server.ext("onPreResponse", (request, h) => { - if (request.response.isBoom && request.response.isServer) { - this.logger.error(request.response.stack); + if ("isBoom" in request.response && request.response.isServer) { + this.logger.error(request.response.stack!); } return h.continue; }); diff --git a/packages/api-http/source/controllers/blockchain.ts b/packages/api-http/source/controllers/blockchain.ts index ac4a2dc7e..0a6b1b876 100644 --- a/packages/api-http/source/controllers/blockchain.ts +++ b/packages/api-http/source/controllers/blockchain.ts @@ -1,3 +1,4 @@ +import Hapi from "@hapi/hapi"; import { Contracts as ApiDatabaseContracts, Identifiers as ApiDatabaseIdentifiers } from "@mainsail/api-database"; import { inject, injectable } from "@mainsail/container"; @@ -8,7 +9,7 @@ export class BlockchainController extends Controller { @inject(ApiDatabaseIdentifiers.BlockRepositoryFactory) private readonly blockRepositoryFactory!: ApiDatabaseContracts.IBlockRepositoryFactory; - public async index() { + public async index(request: Hapi.Request) { const block = await this.blockRepositoryFactory().getLatest(); const state = await this.getState(); @@ -16,9 +17,9 @@ export class BlockchainController extends Controller { data: { block: block ? { - height: block.height, - id: block.id, - } + height: block.height, + id: block.id, + } : null, supply: state.supply, diff --git a/packages/api-http/source/controllers/blocks.ts b/packages/api-http/source/controllers/blocks.ts index eff9a3406..728a9383b 100644 --- a/packages/api-http/source/controllers/blocks.ts +++ b/packages/api-http/source/controllers/blocks.ts @@ -21,7 +21,7 @@ export class BlocksController extends Controller { @inject(ApiDatabaseIdentifiers.WalletRepositoryFactory) private readonly walletRepositoryFactory!: ApiDatabaseContracts.IWalletRepositoryFactory; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const criteria: Search.Criteria.BlockCriteria = request.query; const pagination = this.getListingPage(request); const sorting = this.getListingOrder(request); @@ -32,7 +32,7 @@ export class BlocksController extends Controller { return this.toPagination(blocks, BlockResource, request.query.transform); } - public async first(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async first(request: Hapi.Request) { const block = await this.blockRepositoryFactory() .createQueryBuilder() .select() @@ -42,7 +42,7 @@ export class BlocksController extends Controller { return this.respondWithResource(block, BlockResource, request.query.transform); } - public async last(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async last(request: Hapi.Request) { const block = await this.blockRepositoryFactory() .createQueryBuilder() .select() @@ -53,7 +53,7 @@ export class BlocksController extends Controller { return this.respondWithResource(block, BlockResource, request.query.transform); } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { const blockRepository = this.blockRepositoryFactory(); const blockCriteria = this.getBlockCriteriaByIdOrHeight(request.params.id); @@ -62,7 +62,7 @@ export class BlocksController extends Controller { return this.respondWithResource(block, BlockResource, request.query.transform); } - public async transactions(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async transactions(request: Hapi.Request) { const blockCriteria = this.getBlockCriteriaByIdOrHeight(request.params.id); const block = await this.blockRepositoryFactory().findOneByCriteria(blockCriteria); diff --git a/packages/api-http/source/controllers/delegates.ts b/packages/api-http/source/controllers/delegates.ts index 9c01e3e7e..0c7158f14 100644 --- a/packages/api-http/source/controllers/delegates.ts +++ b/packages/api-http/source/controllers/delegates.ts @@ -81,7 +81,7 @@ export class DelegatesController extends Controller { return this.toPagination(wallets, WalletResource, request.query.transform); } - public async blocks(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async blocks(request: Hapi.Request) { const walletId = request.params.id as string; const delegate = await this.getWallet(walletId); diff --git a/packages/api-http/source/controllers/node.ts b/packages/api-http/source/controllers/node.ts index d9eaaafa5..b21cc7757 100644 --- a/packages/api-http/source/controllers/node.ts +++ b/packages/api-http/source/controllers/node.ts @@ -27,7 +27,7 @@ export class NodeController extends Controller { @inject(ApiDatabaseIdentifiers.PeerRepositoryFactory) private readonly peerRepositoryFactory!: ApiDatabaseContracts.IPeerRepositoryFactory; - public async status(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async status(request: Hapi.Request) { const state = await this.getState(); return { @@ -41,7 +41,7 @@ export class NodeController extends Controller { }; } - public async syncing(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async syncing(request: Hapi.Request) { const state = await this.getState(); return { @@ -86,7 +86,7 @@ export class NodeController extends Controller { return { data: groupedByTypeGroup, meta: { days: request.query.days } }; } - public async configuration(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async configuration(request: Hapi.Request) { const configuration = await this.getConfiguration(); const state = await this.getState(); const plugins = await this.getPlugins(); @@ -123,7 +123,7 @@ export class NodeController extends Controller { }; } - public async configurationCrypto() { + public async configurationCrypto(request: Hapi.Request) { const configuration = await this.getConfiguration(); return { data: configuration?.cryptoConfiguration ?? {}, diff --git a/packages/api-http/source/controllers/transactions.ts b/packages/api-http/source/controllers/transactions.ts index 53a01aea6..8660359d9 100644 --- a/packages/api-http/source/controllers/transactions.ts +++ b/packages/api-http/source/controllers/transactions.ts @@ -23,7 +23,7 @@ export class TransactionsController extends Controller { @inject(ApiDatabaseIdentifiers.WalletRepositoryFactory) private readonly walletRepositoryFactory!: ApiDatabaseContracts.IWalletRepositoryFactory; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const criteria: Search.Criteria.TransactionCriteria = request.query; const pagination = this.getListingPage(request); const sorting = this.getListingOrder(request); @@ -41,7 +41,7 @@ export class TransactionsController extends Controller { return this.toPagination(transactions, TransactionResource, request.query.transform); } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { const transaction = await this.transactionRepositoryFactory() .createQueryBuilder() .select() @@ -51,7 +51,7 @@ export class TransactionsController extends Controller { return this.respondWithResource(transaction, TransactionResource, request.query.transform); } - public async unconfirmed(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async unconfirmed(request: Hapi.Request) { const pagination = super.getListingPage(request); const [transactions, totalCount] = await this.mempoolTransactionlRepositoryFactory() @@ -73,7 +73,7 @@ export class TransactionsController extends Controller { ); } - public async showUnconfirmed(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async showUnconfirmed(request: Hapi.Request) { const transaction = await this.mempoolTransactionlRepositoryFactory() .createQueryBuilder() .select() @@ -83,7 +83,7 @@ export class TransactionsController extends Controller { return super.respondWithResource(transaction, TransactionResource, request.query.transform); } - public async types(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async types(request: Hapi.Request) { const rows = await this.transactionTypeRepositoryFactory() .createQueryBuilder() .select() @@ -104,7 +104,7 @@ export class TransactionsController extends Controller { return { data: typeGroups }; } - public async schemas(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async schemas(request: Hapi.Request) { const rows = await this.transactionTypeRepositoryFactory() .createQueryBuilder() .select() diff --git a/packages/api-http/source/controllers/validator-rounds.ts b/packages/api-http/source/controllers/validator-rounds.ts index a4aa280e5..0855c5510 100644 --- a/packages/api-http/source/controllers/validator-rounds.ts +++ b/packages/api-http/source/controllers/validator-rounds.ts @@ -12,7 +12,7 @@ export class ValidatorRoundsController extends Controller { @inject(ApiDatabaseIdentifiers.ValidatorRoundRepositoryFactory) private readonly validatorRoundepositoryFactory!: ApiDatabaseContracts.IValidatorRoundRepositoryFactory; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const pagination = this.getQueryPagination(request.query); const [validatorRounds, totalCount] = await this.validatorRoundepositoryFactory() @@ -34,7 +34,7 @@ export class ValidatorRoundsController extends Controller { ); } - public async delegates(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async delegates(request: Hapi.Request) { const round = await this.validatorRoundepositoryFactory() .createQueryBuilder() .select() diff --git a/packages/api-http/source/controllers/votes.ts b/packages/api-http/source/controllers/votes.ts index a150e997b..b1324fc50 100644 --- a/packages/api-http/source/controllers/votes.ts +++ b/packages/api-http/source/controllers/votes.ts @@ -19,7 +19,7 @@ export class VotesController extends Controller { @inject(ApiDatabaseIdentifiers.WalletRepositoryFactory) private readonly walletRepositoryFactory!: ApiDatabaseContracts.IWalletRepositoryFactory; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const criteria: Search.Criteria.TransactionCriteria = { ...request.query, type: Contracts.Crypto.TransactionType.Vote, @@ -42,7 +42,7 @@ export class VotesController extends Controller { return this.toPagination(transactions, TransactionResource, request.query.transform); } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { const transaction = await this.transactionRepositoryFactory() .createQueryBuilder() .select() diff --git a/packages/api-http/source/controllers/wallets.ts b/packages/api-http/source/controllers/wallets.ts index a35e89660..5cd043f1f 100644 --- a/packages/api-http/source/controllers/wallets.ts +++ b/packages/api-http/source/controllers/wallets.ts @@ -21,7 +21,7 @@ export class WalletsController extends Controller { @inject(ApiDatabaseIdentifiers.WalletRepositoryFactory) private readonly walletRepositoryFactory!: ApiDatabaseContracts.IWalletRepositoryFactory; - public async index(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async index(request: Hapi.Request) { const criteria: Search.Criteria.WalletCriteria = request.query; const pagination = this.getQueryPagination(request.query); const sorting = this.getListingOrder(request); @@ -32,7 +32,7 @@ export class WalletsController extends Controller { return this.toPagination(wallets, WalletResource, request.query.transform); } - public async top(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async top(request: Hapi.Request) { const criteria: Search.Criteria.WalletCriteria = request.query; const pagination = this.getQueryPagination(request.query); const sorting = this.getListingOrder(request); @@ -43,7 +43,7 @@ export class WalletsController extends Controller { return this.toPagination(wallets, WalletResource, request.query.transform); } - public async show(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async show(request: Hapi.Request) { const walletId = request.params.id as string; const wallet = await this.getWallet(walletId); @@ -51,7 +51,7 @@ export class WalletsController extends Controller { return this.toResource(wallet, WalletResource, request.params.transform); } - public async transactions(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async transactions(request: Hapi.Request) { const walletId = request.params.id as string; const wallet = await this.getWallet(walletId); @@ -62,7 +62,7 @@ export class WalletsController extends Controller { return this.getTransactions(request, { address: wallet.address }); } - public async transactionsSent(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async transactionsSent(request: Hapi.Request) { const walletId = request.params.id as string; const wallet = await this.getWallet(walletId); @@ -77,7 +77,7 @@ export class WalletsController extends Controller { return this.getTransactions(request, { senderPublicKey: wallet.publicKey }); } - public async transactionsReceived(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async transactionsReceived(request: Hapi.Request) { const walletId = request.params.id as string; const wallet = await this.getWallet(walletId); @@ -88,7 +88,7 @@ export class WalletsController extends Controller { return this.getTransactions(request, { recipientId: wallet.address }); } - public async votes(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async votes(request: Hapi.Request) { const walletId = request.params.id as string; const wallet = await this.getWallet(walletId); diff --git a/packages/api-http/source/handlers.ts b/packages/api-http/source/handlers.ts index af1b14793..dd8a9fd68 100644 --- a/packages/api-http/source/handlers.ts +++ b/packages/api-http/source/handlers.ts @@ -1,4 +1,4 @@ -import Hapi from "@hapi/hapi"; +import { Contracts } from "@mainsail/api-common"; import * as Blockchain from "./routes/blockchain"; import * as Blocks from "./routes/blocks"; @@ -11,7 +11,7 @@ import * as Wallets from "./routes/wallets"; export = { name: "Public API", - async register(server: Hapi.Server): Promise { + async register(server: Contracts.ApiServer): Promise { const handlers = [Blocks, Blockchain, Delegates, Transactions, Node, ValidatorRounds, Votes, Wallets]; for (const handler of handlers) { diff --git a/packages/api-http/source/routes/blockchain.ts b/packages/api-http/source/routes/blockchain.ts index fc8fbfc6e..adecbaf3e 100644 --- a/packages/api-http/source/routes/blockchain.ts +++ b/packages/api-http/source/routes/blockchain.ts @@ -1,8 +1,8 @@ import Hapi from "@hapi/hapi"; - +import { Contracts } from "@mainsail/api-common"; import { BlockchainController } from "../controllers/blockchain"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(BlockchainController); server.bind(controller); diff --git a/packages/api-http/source/routes/blocks.ts b/packages/api-http/source/routes/blocks.ts index b0de74767..619b129db 100644 --- a/packages/api-http/source/routes/blocks.ts +++ b/packages/api-http/source/routes/blocks.ts @@ -1,11 +1,11 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { BlocksController } from "../controllers/blocks"; import { blockSortingSchema, transactionSortingSchema } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(BlocksController); server.bind(controller); diff --git a/packages/api-http/source/routes/delegates.ts b/packages/api-http/source/routes/delegates.ts index 8f7ddaed7..49dfea4bd 100644 --- a/packages/api-http/source/routes/delegates.ts +++ b/packages/api-http/source/routes/delegates.ts @@ -1,5 +1,5 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { DelegatesController } from "../controllers/delegates"; @@ -12,7 +12,7 @@ import { walletSortingSchema, } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(DelegatesController); server.bind(controller); diff --git a/packages/api-http/source/routes/node.ts b/packages/api-http/source/routes/node.ts index d48bb2f79..ed4bbde2b 100644 --- a/packages/api-http/source/routes/node.ts +++ b/packages/api-http/source/routes/node.ts @@ -1,9 +1,9 @@ +import { Contracts } from "@mainsail/api-common"; import Hapi from "@hapi/hapi"; import Joi from "joi"; - import { NodeController } from "../controllers/node"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(NodeController); server.bind(controller); diff --git a/packages/api-http/source/routes/transactions.ts b/packages/api-http/source/routes/transactions.ts index 08166b02b..3b122612b 100644 --- a/packages/api-http/source/routes/transactions.ts +++ b/packages/api-http/source/routes/transactions.ts @@ -1,11 +1,11 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { TransactionsController } from "../controllers/transactions"; import { transactionSortingSchema } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(TransactionsController); server.bind(controller); diff --git a/packages/api-http/source/routes/validator-rounds.ts b/packages/api-http/source/routes/validator-rounds.ts index 11398d8ee..798d0728a 100644 --- a/packages/api-http/source/routes/validator-rounds.ts +++ b/packages/api-http/source/routes/validator-rounds.ts @@ -1,10 +1,10 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { ValidatorRoundsController } from "../controllers/validator-rounds"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(ValidatorRoundsController); server.bind(controller); diff --git a/packages/api-http/source/routes/votes.ts b/packages/api-http/source/routes/votes.ts index 261329d0a..b87e79022 100644 --- a/packages/api-http/source/routes/votes.ts +++ b/packages/api-http/source/routes/votes.ts @@ -1,11 +1,11 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { VotesController } from "../controllers/votes"; import { transactionIdSchema, transactionSortingSchema } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(VotesController); server.bind(controller); diff --git a/packages/api-http/source/routes/wallets.ts b/packages/api-http/source/routes/wallets.ts index c6f791116..3b59439e6 100644 --- a/packages/api-http/source/routes/wallets.ts +++ b/packages/api-http/source/routes/wallets.ts @@ -1,5 +1,5 @@ import Hapi from "@hapi/hapi"; -import { Schemas } from "@mainsail/api-common"; +import { Contracts, Schemas } from "@mainsail/api-common"; import Joi from "joi"; import { WalletsController } from "../controllers/wallets"; @@ -10,7 +10,7 @@ import { walletSortingSchema, } from "../schemas"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(WalletsController); server.bind(controller); diff --git a/packages/api-transaction-pool/source/controllers/transaction-pool.ts b/packages/api-transaction-pool/source/controllers/transaction-pool.ts index 3947cdac1..12f7701ab 100644 --- a/packages/api-transaction-pool/source/controllers/transaction-pool.ts +++ b/packages/api-transaction-pool/source/controllers/transaction-pool.ts @@ -8,7 +8,8 @@ export class TransactionsController extends AbstractController { @inject(Identifiers.TransactionPoolProcessor) private readonly processor!: Contracts.TransactionPool.Processor; - public async store(request: Hapi.Request, h: Hapi.ResponseToolkit) { + public async store(request: Hapi.Request) { + // @ts-ignore const result = await this.processor.process(request.payload.transactions); return { data: { diff --git a/packages/api-transaction-pool/source/handlers.ts b/packages/api-transaction-pool/source/handlers.ts index 6cc8f11c3..d316d68f5 100644 --- a/packages/api-transaction-pool/source/handlers.ts +++ b/packages/api-transaction-pool/source/handlers.ts @@ -1,10 +1,9 @@ -import Hapi from "@hapi/hapi"; - +import { Contracts } from "@mainsail/api-common"; import * as TransactionPool from "./routes/transaction-pool"; export = { name: "Transaction Pool API", - async register(server: Hapi.Server): Promise { + async register(server: Contracts.ApiServer): Promise { const handlers = [TransactionPool]; for (const handler of handlers) { diff --git a/packages/api-transaction-pool/source/routes/transaction-pool.ts b/packages/api-transaction-pool/source/routes/transaction-pool.ts index 8ce5bb8ca..1e1c00798 100644 --- a/packages/api-transaction-pool/source/routes/transaction-pool.ts +++ b/packages/api-transaction-pool/source/routes/transaction-pool.ts @@ -1,10 +1,11 @@ import Hapi from "@hapi/hapi"; import { Identifiers } from "@mainsail/contracts"; import { Providers } from "@mainsail/kernel"; +import { Contracts } from "@mainsail/api-common"; import { TransactionsController } from "../controllers/transaction-pool"; -export const register = (server: Hapi.Server): void => { +export const register = (server: Contracts.ApiServer): void => { const controller = server.app.app.resolve(TransactionsController); server.bind(controller); diff --git a/packages/webhooks/source/server/server.ts b/packages/webhooks/source/server/server.ts index 58dc741dd..5e12dfa28 100644 --- a/packages/webhooks/source/server/server.ts +++ b/packages/webhooks/source/server/server.ts @@ -12,6 +12,9 @@ import { whitelist } from "./plugins/whitelist"; import { destroy, show, store, update } from "./schema"; import { respondWithResource } from "./utils"; +export type WebhookAppState = { database: Database }; +export type WebhookServer = HapiServer; + @injectable() export class Server { @inject(Identifiers.Application) @@ -23,7 +26,7 @@ export class Server { @inject(Identifiers.LogService) private readonly logger!: Contracts.Kernel.Logger; - #server: HapiServer; + #server!: WebhookServer; public async register(optionsServer: Contracts.Types.JsonObject): Promise { this.#server = new HapiServer(this.#getServerOptions(optionsServer)); @@ -119,6 +122,7 @@ export class Server { this.#server.route({ handler: (request) => ({ + // @ts-ignore data: request.server.app.database.all().map((webhook) => { webhook = { ...webhook }; delete webhook.token; @@ -159,11 +163,13 @@ export class Server { this.#server.route({ async handler(request) { + // @ts-ignore if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } const webhook: Webhook | undefined = Utils.cloneDeep( + // @ts-ignore request.server.app.database.findById(request.params.id), ); @@ -185,10 +191,12 @@ export class Server { this.#server.route({ handler: (request, h) => { + // @ts-ignore if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } + // @ts-ignore request.server.app.database.update(request.params.id, request.payload as Webhook); return h.response().code(204); @@ -202,10 +210,12 @@ export class Server { this.#server.route({ handler: (request, h) => { + // @ts-ignore if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } + // @ts-ignore request.server.app.database.destroy(request.params.id); return h.response().code(204); From 0eb5da6221ee95d17fb43c273e60f7b5e9804ecc Mon Sep 17 00:00:00 2001 From: oXtxNt9U Date: Wed, 11 Oct 2023 06:58:56 +0000 Subject: [PATCH 3/7] style: resolve style guide violations --- packages/api-common/package.json | 2 +- packages/api-common/source/contracts/index.ts | 4 ++-- packages/api-common/source/plugins/response-headers.ts | 1 + packages/api-common/source/server.ts | 3 ++- packages/api-common/source/service-provider.ts | 2 +- packages/api-development/package.json | 2 +- packages/api-development/source/server.ts | 2 +- packages/api-http/package.json | 2 +- packages/api-http/source/controllers/blockchain.ts | 6 +++--- packages/api-http/source/routes/blockchain.ts | 1 + packages/api-http/source/routes/node.ts | 3 ++- packages/api-sync/package.json | 2 +- packages/api-transaction-pool/package.json | 2 +- packages/api-transaction-pool/source/handlers.ts | 1 + .../api-transaction-pool/source/routes/transaction-pool.ts | 2 +- packages/api/package.json | 2 +- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- packages/crypto-consensus-bls12-381/package.json | 2 +- packages/fees-burn/package.json | 2 +- packages/fees-managed/package.json | 2 +- packages/kernel/package.json | 2 +- packages/logger-pino/package.json | 2 +- packages/logger-winston/package.json | 2 +- packages/networking-dns/package.json | 2 +- packages/networking-ntp/package.json | 2 +- packages/p2p/package.json | 2 +- packages/test-framework/package.json | 2 +- packages/transaction-pool/package.json | 2 +- packages/utils/package.json | 2 +- packages/webhooks/package.json | 2 +- 31 files changed, 36 insertions(+), 31 deletions(-) diff --git a/packages/api-common/package.json b/packages/api-common/package.json index ec2c747a7..e476918db 100644 --- a/packages/api-common/package.json +++ b/packages/api-common/package.json @@ -43,4 +43,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/api-common/source/contracts/index.ts b/packages/api-common/source/contracts/index.ts index 86808efb0..7dfca02cd 100644 --- a/packages/api-common/source/contracts/index.ts +++ b/packages/api-common/source/contracts/index.ts @@ -1,5 +1,5 @@ -import { Contracts } from "@mainsail/contracts"; import Hapi from "@hapi/hapi"; +import { Contracts } from "@mainsail/contracts"; export type ApiServer = Hapi.Server; @@ -9,7 +9,7 @@ export enum ServerType { } export interface ServerState { - app: Contracts.Kernel.Application, + app: Contracts.Kernel.Application; schemas: any; } diff --git a/packages/api-common/source/plugins/response-headers.ts b/packages/api-common/source/plugins/response-headers.ts index 606367f86..5a2b8ed23 100644 --- a/packages/api-common/source/plugins/response-headers.ts +++ b/packages/api-common/source/plugins/response-headers.ts @@ -1,6 +1,7 @@ import Hapi from "@hapi/hapi"; import { Contracts as ApiDatabaseContracts, Identifiers as ApiDatabaseIdentifiers } from "@mainsail/api-database"; import { Contracts } from "@mainsail/contracts"; + import { ApiServer } from "../contracts"; export const responseHeaders = { diff --git a/packages/api-common/source/server.ts b/packages/api-common/source/server.ts index 1c74eabfa..18e2d19ab 100644 --- a/packages/api-common/source/server.ts +++ b/packages/api-common/source/server.ts @@ -3,6 +3,7 @@ import { inject, injectable } from "@mainsail/container"; import { Contracts, Identifiers } from "@mainsail/contracts"; import { Providers, Utils } from "@mainsail/kernel"; import { readFileSync } from "fs"; + import { ApiServer, ServerType } from "./contracts"; @injectable() @@ -46,7 +47,7 @@ export abstract class AbstractServer { this.server.ext("onPreResponse", (request, h) => { if ("isBoom" in request.response && request.response.isBoom && request.response.isServer) { - this.logger.error(request.response.stack!); + this.logger.error(request.response.stack); } return h.continue; }); diff --git a/packages/api-common/source/service-provider.ts b/packages/api-common/source/service-provider.ts index 08865af39..49f7fbab3 100644 --- a/packages/api-common/source/service-provider.ts +++ b/packages/api-common/source/service-provider.ts @@ -1,9 +1,9 @@ import { Providers } from "@mainsail/kernel"; import Joi from "joi"; +import { ServerType } from "./contracts"; import { preparePlugins } from "./plugins"; import { AbstractServer } from "./server"; -import { ServerType } from "./contracts"; export type ServerConstructor = new (...arguments_: any[]) => T; export abstract class AbstractServiceProvider extends Providers.ServiceProvider { diff --git a/packages/api-development/package.json b/packages/api-development/package.json index 884b0a45a..9c1551d58 100644 --- a/packages/api-development/package.json +++ b/packages/api-development/package.json @@ -48,4 +48,4 @@ "alias": "api-development" } } -} \ No newline at end of file +} diff --git a/packages/api-development/source/server.ts b/packages/api-development/source/server.ts index 36df24233..a7387e6cb 100644 --- a/packages/api-development/source/server.ts +++ b/packages/api-development/source/server.ts @@ -47,7 +47,7 @@ export class Server { this.server.ext("onPreResponse", (request, h) => { if ("isBoom" in request.response && request.response.isServer) { - this.logger.error(request.response.stack!); + this.logger.error(request.response.stack); } return h.continue; }); diff --git a/packages/api-http/package.json b/packages/api-http/package.json index 59ee2aba9..594b25a86 100644 --- a/packages/api-http/package.json +++ b/packages/api-http/package.json @@ -52,4 +52,4 @@ "alias": "api-http" } } -} \ No newline at end of file +} diff --git a/packages/api-http/source/controllers/blockchain.ts b/packages/api-http/source/controllers/blockchain.ts index 0a6b1b876..e060c40dc 100644 --- a/packages/api-http/source/controllers/blockchain.ts +++ b/packages/api-http/source/controllers/blockchain.ts @@ -17,9 +17,9 @@ export class BlockchainController extends Controller { data: { block: block ? { - height: block.height, - id: block.id, - } + height: block.height, + id: block.id, + } : null, supply: state.supply, diff --git a/packages/api-http/source/routes/blockchain.ts b/packages/api-http/source/routes/blockchain.ts index adecbaf3e..59d5a36c4 100644 --- a/packages/api-http/source/routes/blockchain.ts +++ b/packages/api-http/source/routes/blockchain.ts @@ -1,5 +1,6 @@ import Hapi from "@hapi/hapi"; import { Contracts } from "@mainsail/api-common"; + import { BlockchainController } from "../controllers/blockchain"; export const register = (server: Contracts.ApiServer): void => { diff --git a/packages/api-http/source/routes/node.ts b/packages/api-http/source/routes/node.ts index ed4bbde2b..534e65e9c 100644 --- a/packages/api-http/source/routes/node.ts +++ b/packages/api-http/source/routes/node.ts @@ -1,6 +1,7 @@ -import { Contracts } from "@mainsail/api-common"; import Hapi from "@hapi/hapi"; +import { Contracts } from "@mainsail/api-common"; import Joi from "joi"; + import { NodeController } from "../controllers/node"; export const register = (server: Contracts.ApiServer): void => { diff --git a/packages/api-sync/package.json b/packages/api-sync/package.json index 34760ffda..6fcb51502 100644 --- a/packages/api-sync/package.json +++ b/packages/api-sync/package.json @@ -41,4 +41,4 @@ ] } } -} \ No newline at end of file +} diff --git a/packages/api-transaction-pool/package.json b/packages/api-transaction-pool/package.json index da08df8b7..73a852901 100644 --- a/packages/api-transaction-pool/package.json +++ b/packages/api-transaction-pool/package.json @@ -52,4 +52,4 @@ "alias": "api-transaction-pool" } } -} \ No newline at end of file +} diff --git a/packages/api-transaction-pool/source/handlers.ts b/packages/api-transaction-pool/source/handlers.ts index d316d68f5..0e55799d4 100644 --- a/packages/api-transaction-pool/source/handlers.ts +++ b/packages/api-transaction-pool/source/handlers.ts @@ -1,4 +1,5 @@ import { Contracts } from "@mainsail/api-common"; + import * as TransactionPool from "./routes/transaction-pool"; export = { diff --git a/packages/api-transaction-pool/source/routes/transaction-pool.ts b/packages/api-transaction-pool/source/routes/transaction-pool.ts index 1e1c00798..df3d7453b 100644 --- a/packages/api-transaction-pool/source/routes/transaction-pool.ts +++ b/packages/api-transaction-pool/source/routes/transaction-pool.ts @@ -1,7 +1,7 @@ import Hapi from "@hapi/hapi"; +import { Contracts } from "@mainsail/api-common"; import { Identifiers } from "@mainsail/contracts"; import { Providers } from "@mainsail/kernel"; -import { Contracts } from "@mainsail/api-common"; import { TransactionsController } from "../controllers/transaction-pool"; diff --git a/packages/api/package.json b/packages/api/package.json index b07c4f501..d264cc64e 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -61,4 +61,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/cli/package.json b/packages/cli/package.json index 74140da9b..a599cfc1b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -67,4 +67,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/core/package.json b/packages/core/package.json index 2dd9becd0..2490122bf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -103,4 +103,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/crypto-consensus-bls12-381/package.json b/packages/crypto-consensus-bls12-381/package.json index 827b6c7fa..00c931cdd 100644 --- a/packages/crypto-consensus-bls12-381/package.json +++ b/packages/crypto-consensus-bls12-381/package.json @@ -40,4 +40,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/fees-burn/package.json b/packages/fees-burn/package.json index fa94fc368..f6246ceef 100644 --- a/packages/fees-burn/package.json +++ b/packages/fees-burn/package.json @@ -31,4 +31,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/fees-managed/package.json b/packages/fees-managed/package.json index 2829428ff..718a2f646 100644 --- a/packages/fees-managed/package.json +++ b/packages/fees-managed/package.json @@ -32,4 +32,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/kernel/package.json b/packages/kernel/package.json index d312ba942..de152750f 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -58,4 +58,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/logger-pino/package.json b/packages/logger-pino/package.json index 42129dc64..4f49abadd 100644 --- a/packages/logger-pino/package.json +++ b/packages/logger-pino/package.json @@ -52,4 +52,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/logger-winston/package.json b/packages/logger-winston/package.json index 7edf43b32..d1cac7de5 100644 --- a/packages/logger-winston/package.json +++ b/packages/logger-winston/package.json @@ -30,4 +30,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/networking-dns/package.json b/packages/networking-dns/package.json index e4bca12f1..574192a1a 100644 --- a/packages/networking-dns/package.json +++ b/packages/networking-dns/package.json @@ -30,4 +30,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/networking-ntp/package.json b/packages/networking-ntp/package.json index 9dfe9e846..81fce0339 100644 --- a/packages/networking-ntp/package.json +++ b/packages/networking-ntp/package.json @@ -32,4 +32,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/p2p/package.json b/packages/p2p/package.json index ace2110e7..c3c1bb814 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -64,4 +64,4 @@ "alias": "p2p" } } -} \ No newline at end of file +} diff --git a/packages/test-framework/package.json b/packages/test-framework/package.json index da73b9c6d..cda3c936a 100644 --- a/packages/test-framework/package.json +++ b/packages/test-framework/package.json @@ -63,4 +63,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/transaction-pool/package.json b/packages/transaction-pool/package.json index 8bcf07ddb..b3240ecdc 100644 --- a/packages/transaction-pool/package.json +++ b/packages/transaction-pool/package.json @@ -42,4 +42,4 @@ "alias": "transactionPool" } } -} \ No newline at end of file +} diff --git a/packages/utils/package.json b/packages/utils/package.json index 382356f51..bcee19678 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -40,4 +40,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/webhooks/package.json b/packages/webhooks/package.json index 9b1946951..519dad76f 100644 --- a/packages/webhooks/package.json +++ b/packages/webhooks/package.json @@ -43,4 +43,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} From 85062114123f3271781f7c0fb0c9da31ede8c460 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:02:57 +0900 Subject: [PATCH 4/7] fix --- packages/api-common/source/server.ts | 1 + packages/api-development/source/server.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/api-common/source/server.ts b/packages/api-common/source/server.ts index 18e2d19ab..a5365cea6 100644 --- a/packages/api-common/source/server.ts +++ b/packages/api-common/source/server.ts @@ -47,6 +47,7 @@ export abstract class AbstractServer { this.server.ext("onPreResponse", (request, h) => { if ("isBoom" in request.response && request.response.isBoom && request.response.isServer) { + // @ts-ignore this.logger.error(request.response.stack); } return h.continue; diff --git a/packages/api-development/source/server.ts b/packages/api-development/source/server.ts index a7387e6cb..44065c3d0 100644 --- a/packages/api-development/source/server.ts +++ b/packages/api-development/source/server.ts @@ -47,6 +47,7 @@ export class Server { this.server.ext("onPreResponse", (request, h) => { if ("isBoom" in request.response && request.response.isServer) { + // @ts-ignore this.logger.error(request.response.stack); } return h.continue; From 44feb2dbaf75038676e48475ff6b6b4fb8d54d32 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:55:35 +0900 Subject: [PATCH 5/7] cleanup deps --- packages/api-common/package.json | 8 +- packages/api-development/package.json | 7 +- packages/api-http/package.json | 8 +- packages/api-transaction-pool/package.json | 8 +- packages/cli/package.json | 4 +- .../crypto-consensus-bls12-381/package.json | 3 +- packages/kernel/package.json | 4 +- packages/p2p/package.json | 4 +- packages/utils/package.json | 3 +- packages/webhooks/package.json | 5 +- pnpm-lock.yaml | 253 ++++-------------- 11 files changed, 71 insertions(+), 236 deletions(-) diff --git a/packages/api-common/package.json b/packages/api-common/package.json index e476918db..46a2a4b47 100644 --- a/packages/api-common/package.json +++ b/packages/api-common/package.json @@ -29,13 +29,9 @@ "@mainsail/utils": "workspace:*", "joi": "17.11.0", "nanomatch": "1.2.13", - "rate-limiter-flexible": "1.3.2", - "semver": "6.3.0" + "rate-limiter-flexible": "1.3.2" }, "devDependencies": { - "@types/hapi__boom": "9.0.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "7.5.3", "uvu": "^0.5.6" @@ -43,4 +39,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/api-development/package.json b/packages/api-development/package.json index 9c1551d58..4b126526e 100644 --- a/packages/api-development/package.json +++ b/packages/api-development/package.json @@ -30,12 +30,9 @@ "joi": "17.11.0", "nanomatch": "1.2.13", "rate-limiter-flexible": "1.3.2", - "semver": "6.3.0" + "semver": "7.5.4" }, "devDependencies": { - "@types/hapi__boom": "9.0.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "uvu": "^0.5.6" @@ -48,4 +45,4 @@ "alias": "api-development" } } -} +} \ No newline at end of file diff --git a/packages/api-http/package.json b/packages/api-http/package.json index 594b25a86..e57bfca7b 100644 --- a/packages/api-http/package.json +++ b/packages/api-http/package.json @@ -32,13 +32,9 @@ "dayjs": "1.10.7", "joi": "17.11.0", "nanomatch": "1.2.13", - "rate-limiter-flexible": "1.3.2", - "semver": "6.3.0" + "rate-limiter-flexible": "1.3.2" }, "devDependencies": { - "@types/hapi__boom": "9.0.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "got": "11.8.6", @@ -52,4 +48,4 @@ "alias": "api-http" } } -} +} \ No newline at end of file diff --git a/packages/api-transaction-pool/package.json b/packages/api-transaction-pool/package.json index 73a852901..7ae144cfc 100644 --- a/packages/api-transaction-pool/package.json +++ b/packages/api-transaction-pool/package.json @@ -32,13 +32,9 @@ "dayjs": "1.10.7", "joi": "17.11.0", "nanomatch": "1.2.13", - "rate-limiter-flexible": "1.3.2", - "semver": "6.3.0" + "rate-limiter-flexible": "1.3.2" }, "devDependencies": { - "@types/hapi__boom": "9.0.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.11", "@types/ip": "1.1.0", "@types/semver": "6.2.3", "got": "11.8.6", @@ -52,4 +48,4 @@ "alias": "api-transaction-pool" } } -} +} \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json index a599cfc1b..bf877ddc6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -41,7 +41,7 @@ "ora": "4.1.1", "prompts": "2.4.0", "read-last-lines": "1.8.0", - "semver": "6.3.0", + "semver": "7.5.4", "tar": "6.1.11", "yargs-parser": "20.2.9" }, @@ -67,4 +67,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/crypto-consensus-bls12-381/package.json b/packages/crypto-consensus-bls12-381/package.json index 00c931cdd..cf7a21477 100644 --- a/packages/crypto-consensus-bls12-381/package.json +++ b/packages/crypto-consensus-bls12-381/package.json @@ -33,11 +33,10 @@ "type-fest": "0.21.3" }, "devDependencies": { - "@types/hapi__hapi": "21.0.0", "@types/plur": "^3.1.0", "uvu": "^0.5.6" }, "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/kernel/package.json b/packages/kernel/package.json index de152750f..088406134 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -36,7 +36,7 @@ "log-process-errors": "5.1.2", "nanomatch": "1.2.13", "nsfw": "2.1.2", - "semver": "6.3.0" + "semver": "7.5.4" }, "devDependencies": { "@types/capture-console": "1.0.1", @@ -58,4 +58,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/p2p/package.json b/packages/p2p/package.json index c3c1bb814..b1880d964 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -40,7 +40,7 @@ "pluralize": "8.0.0", "protobufjs": "7.2.4", "rate-limiter-flexible": "2.4.2", - "semver": "7.5.0", + "semver": "7.5.4", "ws": "7.5.5" }, "devDependencies": { @@ -64,4 +64,4 @@ "alias": "p2p" } } -} +} \ No newline at end of file diff --git a/packages/utils/package.json b/packages/utils/package.json index bcee19678..8861e2c1a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -32,7 +32,6 @@ "@hapi/hapi": "21.3.2", "@types/benchmark": "^1.0.33", "@types/deepmerge": "^2.2.0", - "@types/hapi__hapi": "^20.0.13", "benchmark": "^2.1.4", "bignumber.js": "^9.0.1", "uvu": "^0.5.6" @@ -40,4 +39,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/packages/webhooks/package.json b/packages/webhooks/package.json index 519dad76f..8d37ff10d 100644 --- a/packages/webhooks/package.json +++ b/packages/webhooks/package.json @@ -31,9 +31,6 @@ }, "devDependencies": { "@types/fs-extra": "8.1.2", - "@types/hapi__boom": "9.0.1", - "@types/hapi__hapi": "21.0.0", - "@types/hapi__joi": "17.1.11", "@types/tmp": "0.2.1", "@types/uuid": "8.3.1", "import-fresh": "3.3.0", @@ -43,4 +40,4 @@ "engines": { "node": ">=20.x" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67bdc9079..e444755de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -255,19 +255,7 @@ importers: rate-limiter-flexible: specifier: 1.3.2 version: 1.3.2 - semver: - specifier: 6.3.0 - version: 6.3.0 devDependencies: - '@types/hapi__boom': - specifier: 9.0.1 - version: 9.0.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.11 - version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -345,18 +333,9 @@ importers: specifier: 1.3.2 version: 1.3.2 semver: - specifier: 6.3.0 - version: 6.3.0 + specifier: 7.5.4 + version: 7.5.4 devDependencies: - '@types/hapi__boom': - specifier: 9.0.1 - version: 9.0.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.11 - version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -408,19 +387,7 @@ importers: rate-limiter-flexible: specifier: 1.3.2 version: 1.3.2 - semver: - specifier: 6.3.0 - version: 6.3.0 devDependencies: - '@types/hapi__boom': - specifier: 9.0.1 - version: 9.0.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.11 - version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -500,19 +467,7 @@ importers: rate-limiter-flexible: specifier: 1.3.2 version: 1.3.2 - semver: - specifier: 6.3.0 - version: 6.3.0 devDependencies: - '@types/hapi__boom': - specifier: 9.0.1 - version: 9.0.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.11 - version: 17.1.11 '@types/ip': specifier: 1.1.0 version: 1.1.0 @@ -611,8 +566,8 @@ importers: specifier: 1.8.0 version: 1.8.0 semver: - specifier: 6.3.0 - version: 6.3.0 + specifier: 7.5.4 + version: 7.5.4 tar: specifier: 6.1.11 version: 6.1.11 @@ -1410,9 +1365,6 @@ importers: specifier: 0.21.3 version: 0.21.3 devDependencies: - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 '@types/plur': specifier: ^3.1.0 version: 3.1.0 @@ -2331,8 +2283,8 @@ importers: specifier: 2.1.2 version: 2.1.2 semver: - specifier: 6.3.0 - version: 6.3.0 + specifier: 7.5.4 + version: 7.5.4 devDependencies: '@types/capture-console': specifier: 1.0.1 @@ -2595,8 +2547,8 @@ importers: specifier: 2.4.2 version: 2.4.2 semver: - specifier: 7.5.0 - version: 7.5.0 + specifier: 7.5.4 + version: 7.5.4 ws: specifier: 7.5.5 version: 7.5.5 @@ -2942,9 +2894,6 @@ importers: '@types/deepmerge': specifier: ^2.2.0 version: 2.2.0 - '@types/hapi__hapi': - specifier: ^20.0.13 - version: 20.0.13 benchmark: specifier: ^2.1.4 version: 2.1.4 @@ -3100,15 +3049,6 @@ importers: '@types/fs-extra': specifier: 8.1.2 version: 8.1.2 - '@types/hapi__boom': - specifier: 9.0.1 - version: 9.0.1 - '@types/hapi__hapi': - specifier: 21.0.0 - version: 21.0.0 - '@types/hapi__joi': - specifier: 17.1.11 - version: 17.1.11 '@types/tmp': specifier: 0.2.1 version: 0.2.1 @@ -3778,12 +3718,6 @@ packages: dependencies: '@hapi/hoek': 11.0.2 - /@hapi/b64@5.0.0: - resolution: {integrity: sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==} - dependencies: - '@hapi/hoek': 9.2.0 - dev: true - /@hapi/b64@6.0.1: resolution: {integrity: sha512-ZvjX4JQReUmBheeCq+S9YavcnMMHWqx3S0jHNXWIM1kQDxB9cyfSycpVvjfrKcIS8Mh5N3hmu/YKo4Iag9g2Kw==} dependencies: @@ -3798,6 +3732,7 @@ packages: resolution: {integrity: sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==} dependencies: '@hapi/hoek': 9.2.0 + dev: false /@hapi/bounce@2.0.0: resolution: {integrity: sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==} @@ -3814,6 +3749,7 @@ packages: /@hapi/bourne@2.0.0: resolution: {integrity: sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==} + dev: false /@hapi/bourne@2.1.0: resolution: {integrity: sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==} @@ -3846,13 +3782,6 @@ packages: dependencies: '@hapi/boom': 10.0.1 - /@hapi/cryptiles@5.1.0: - resolution: {integrity: sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==} - engines: {node: '>=12.0.0'} - dependencies: - '@hapi/boom': 9.1.4 - dev: true - /@hapi/cryptiles@6.0.1: resolution: {integrity: sha512-9GM9ECEHfR8lk5ASOKG4+4ZsEzFqLfhiryIJ2ISePVB92OHLp/yne4m+zn7z9dgvM98TLpiFebjDFQ0UHcqxXQ==} engines: {node: '>=14.0.0'} @@ -3898,16 +3827,6 @@ packages: /@hapi/hoek@9.2.0: resolution: {integrity: sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==} - /@hapi/iron@6.0.0: - resolution: {integrity: sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==} - dependencies: - '@hapi/b64': 5.0.0 - '@hapi/boom': 9.1.4 - '@hapi/bourne': 2.0.0 - '@hapi/cryptiles': 5.1.0 - '@hapi/hoek': 9.2.0 - dev: true - /@hapi/iron@7.0.1: resolution: {integrity: sha512-tEZnrOujKpS6jLKliyWBl3A9PaE+ppuL/+gkbyPPDb/l2KSKQyH4lhMkVb+sBhwN+qaxxlig01JRqB8dk/mPxQ==} dependencies: @@ -3939,14 +3858,6 @@ packages: '@hapi/hoek': 11.0.2 '@hapi/nigel': 5.0.1 - /@hapi/podium@4.1.3: - resolution: {integrity: sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==} - dependencies: - '@hapi/hoek': 9.2.0 - '@hapi/teamwork': 5.1.1 - '@hapi/validate': 1.1.3 - dev: true - /@hapi/podium@5.0.1: resolution: {integrity: sha512-eznFTw6rdBhAijXFIlBOMJJd+lXTvqbrBIS4Iu80r2KTVIo4g+7fLy4NKp/8+UnSt5Ox6mJtAlKBU/Sf5080TQ==} dependencies: @@ -4002,11 +3913,6 @@ packages: deprecated: This version has been deprecated and is no longer supported or maintained dev: false - /@hapi/teamwork@5.1.1: - resolution: {integrity: sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==} - engines: {node: '>=12.0.0'} - dev: true - /@hapi/teamwork@6.0.0: resolution: {integrity: sha512-05HumSy3LWfXpmJ9cr6HzwhAavrHkJ1ZRCmNE2qJMihdM5YcWreWPfyN0yKT2ZjCM92au3ZkuodjBxOibxM67A==} engines: {node: '>=14.0.0'} @@ -4021,13 +3927,6 @@ packages: dependencies: '@hapi/hoek': 11.0.2 - /@hapi/validate@1.1.3: - resolution: {integrity: sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==} - dependencies: - '@hapi/hoek': 9.2.0 - '@hapi/topo': 5.1.0 - dev: true - /@hapi/validate@2.0.1: resolution: {integrity: sha512-NZmXRnrSLK8MQ9y/CMqE9WSspgB9xA41/LlYR0k967aSZebWr4yNrpxIbov12ICwKy4APSlWXZga9jN5p6puPA==} dependencies: @@ -4165,7 +4064,7 @@ packages: p-reduce: 2.1.0 pacote: 15.1.1 pify: 5.0.0 - semver: 7.5.0 + semver: 7.5.4 slash: 3.0.0 validate-npm-package-license: 3.0.4 validate-npm-package-name: 4.0.0 @@ -4470,7 +4369,7 @@ packages: promise-all-reject-late: 1.0.1 promise-call-limit: 1.0.2 read-package-json-fast: 3.0.2 - semver: 7.5.0 + semver: 7.5.4 ssri: 10.0.4 treeverse: 3.0.0 walk-up-path: 1.0.0 @@ -4483,7 +4382,7 @@ packages: resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==} dependencies: '@gar/promisify': 1.1.3 - semver: 7.5.0 + semver: 7.5.4 dev: false /@npmcli/fs@2.1.2: @@ -4491,14 +4390,14 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: '@gar/promisify': 1.1.3 - semver: 7.5.0 + semver: 7.5.4 dev: true /@npmcli/fs@3.1.0: resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.0 + semver: 7.5.4 dev: true /@npmcli/git@4.1.0: @@ -4511,7 +4410,7 @@ packages: proc-log: 3.0.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.5.0 + semver: 7.5.4 which: 3.0.1 transitivePeerDependencies: - bluebird @@ -4543,7 +4442,7 @@ packages: cacache: 17.1.3 json-parse-even-better-errors: 3.0.0 pacote: 15.2.0 - semver: 7.5.0 + semver: 7.5.4 transitivePeerDependencies: - bluebird - supports-color @@ -5476,53 +5375,6 @@ packages: form-data: 2.5.1 dev: true - /@types/hapi__boom@9.0.1: - resolution: {integrity: sha512-TSqwgnTmNNp3/9uOpV16S8IVJv+QDmZLEImSuQrzGLCzmuK5P3bx3wdaXGXxfWLlN09Qqnd27POLrEAKhVCM5g==} - deprecated: Deprecated - dependencies: - '@hapi/boom': 9.1.4 - dev: true - - /@types/hapi__catbox@10.2.4: - resolution: {integrity: sha512-A6ivRrXD5glmnJna1UAGw87QNZRp/vdFO9U4GS+WhOMWzHnw+oTGkMvg0g6y1930CbeheGOCm7A1qHsqH7AXqg==} - dev: true - - /@types/hapi__hapi@20.0.13: - resolution: {integrity: sha512-LP4IPfhIO5ZPVOrJo7H8c8Slc0WYTFAUNQX1U0LBPKyXioXhH5H2TawIgxKujIyOhbwoBbpvOsBf6o5+ToJIrQ==} - dependencies: - '@hapi/boom': 9.1.4 - '@hapi/iron': 6.0.0 - '@hapi/podium': 4.1.3 - '@types/hapi__catbox': 10.2.4 - '@types/hapi__mimos': 4.1.4 - '@types/hapi__shot': 4.1.2 - '@types/node': 20.1.0 - joi: 17.11.0 - dev: true - - /@types/hapi__hapi@21.0.0: - resolution: {integrity: sha512-urNzL9HQgOp4QbeEOG/Y/XIcU1pB6skGh7LKMd0hGkxb8oRmWe083x5LAuLjZNtuhRU6yKhiSjjqQEJ+3pWjpQ==} - deprecated: This is a stub types definition. @hapi/hapi provides its own type definitions, so you do not need this installed. - dependencies: - '@hapi/hapi': 21.3.2 - dev: true - - /@types/hapi__joi@17.1.11: - resolution: {integrity: sha512-4dwljh5JJPdDOkddyT/nGBDxJ7tZvLzcUaeT3XS0QO+LaluN38t4hUnNx65o7f0lIeDC9BJ4+IDJwQaDOS0zGQ==} - dev: true - - /@types/hapi__mimos@4.1.4: - resolution: {integrity: sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==} - dependencies: - '@types/mime-db': 1.43.1 - dev: true - - /@types/hapi__shot@4.1.2: - resolution: {integrity: sha512-8wWgLVP1TeGqgzZtCdt+F+k15DWQvLG1Yv6ZzPfb3D5WIo5/S+GGKtJBVo2uNEcqabP5Ifc71QnJTDnTmw1axA==} - dependencies: - '@types/node': 20.1.0 - dev: true - /@types/hapi__sntp@3.1.2: resolution: {integrity: sha512-qMHxmxMBu39jHVUqii4qJHFILuXwTrRM5TX1GCLUbYOsH29xiJRLfQyWyEk6n1h1fBF98MOsjUIKtQBrFT5pCg==} dev: true @@ -5658,10 +5510,6 @@ packages: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: true - /@types/mime-db@1.43.1: - resolution: {integrity: sha512-kGZJY+R+WnR5Rk+RPHUMERtb2qBRViIHCBdtUrY+NmwuGb8pQdfTqQiCKPrxpdoycl8KWm2DLdkpoSdt479XoQ==} - dev: true - /@types/minimatch@3.0.5: resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} dev: true @@ -5959,7 +5807,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.0 + semver: 7.5.4 tsutils: 3.21.0(typescript@3.9.10) typescript: 3.9.10 transitivePeerDependencies: @@ -5980,7 +5828,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.0 + semver: 7.5.4 tsutils: 3.21.0(typescript@4.5.5) typescript: 4.5.5 transitivePeerDependencies: @@ -6001,7 +5849,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.0 + semver: 7.5.4 tsutils: 3.21.0(typescript@4.5.5) typescript: 4.5.5 transitivePeerDependencies: @@ -6022,7 +5870,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.0 + semver: 7.5.4 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: @@ -6043,7 +5891,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.5.5) eslint: 8.3.0 eslint-scope: 5.1.1 - semver: 7.5.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript @@ -6996,7 +6844,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.0 + semver: 7.5.4 dev: true /byte-size@7.0.0: @@ -7670,7 +7518,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.0 + semver: 7.5.4 well-known-symbols: 2.0.0 dev: false @@ -7761,7 +7609,7 @@ packages: json-stringify-safe: 5.0.1 lodash: 4.17.21 meow: 8.1.2 - semver: 6.3.0 + semver: 6.3.1 split: 1.0.1 through2: 4.0.2 dev: true @@ -8535,7 +8383,7 @@ packages: engines: {node: '>=0.8'} dependencies: errlop: 2.2.0 - semver: 6.3.0 + semver: 6.3.1 dev: false /ejs@3.1.9: @@ -10063,7 +9911,7 @@ packages: hasBin: true dependencies: meow: 8.1.2 - semver: 6.3.0 + semver: 6.3.1 dev: true /git-sha1@0.1.2: @@ -10668,7 +10516,7 @@ packages: promzard: 0.3.0 read: 1.0.7 read-package-json: 5.0.1 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 validate-npm-package-name: 4.0.0 dev: true @@ -11654,7 +11502,7 @@ packages: npm-package-arg: 10.1.0 npm-registry-fetch: 14.0.5 proc-log: 3.0.0 - semver: 7.5.0 + semver: 7.5.4 sigstore: 1.7.0 ssri: 10.0.4 transitivePeerDependencies: @@ -12096,7 +11944,7 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} dependencies: - semver: 6.3.0 + semver: 6.3.1 dev: true /make-fetch-happen@10.2.1: @@ -12745,7 +12593,7 @@ packages: resolution: {integrity: sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==} engines: {node: '>=10'} dependencies: - semver: 7.5.0 + semver: 7.5.4 dev: false /node-addon-api@3.2.1: @@ -12817,7 +12665,7 @@ packages: nopt: 5.0.0 npmlog: 6.0.2 rimraf: 3.0.2 - semver: 7.5.0 + semver: 7.5.4 tar: 6.1.11 which: 2.0.2 transitivePeerDependencies: @@ -12838,7 +12686,7 @@ packages: nopt: 6.0.0 npmlog: 6.0.2 rimraf: 3.0.2 - semver: 7.5.0 + semver: 7.5.4 tar: 6.1.11 which: 2.0.2 transitivePeerDependencies: @@ -12936,7 +12784,7 @@ packages: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.12.1 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -12946,7 +12794,7 @@ packages: dependencies: hosted-git-info: 5.2.1 is-core-module: 2.12.1 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -12956,7 +12804,7 @@ packages: dependencies: hosted-git-info: 6.1.1 is-core-module: 2.12.1 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -13034,7 +12882,7 @@ packages: resolution: {integrity: sha512-dH3GmQL4vsPtld59cOn8uY0iOqRmqKvV+DLGwNXV/Q7MDgD2QfOADWd/mFXcIE5LVhYYGjA3baz6W9JneqnuCw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.0 + semver: 7.5.4 dev: true /npm-normalize-package-bin@1.0.1: @@ -13052,7 +12900,7 @@ packages: dependencies: hosted-git-info: 6.1.1 proc-log: 3.0.0 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-name: 5.0.0 dev: true @@ -13061,7 +12909,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 3.0.8 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-name: 3.0.0 dev: true @@ -13071,7 +12919,7 @@ packages: dependencies: hosted-git-info: 5.2.1 proc-log: 2.0.1 - semver: 7.5.0 + semver: 7.5.4 validate-npm-package-name: 4.0.0 dev: true @@ -13100,7 +12948,7 @@ packages: npm-install-checks: 6.1.1 npm-normalize-package-bin: 3.0.1 npm-package-arg: 10.1.0 - semver: 7.5.0 + semver: 7.5.4 dev: true /npm-registry-fetch@13.3.1: @@ -13585,7 +13433,7 @@ packages: got: 9.6.0 registry-auth-token: 4.2.2 registry-url: 5.1.0 - semver: 6.3.0 + semver: 6.3.1 /package-json@8.1.1: resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} @@ -13594,7 +13442,7 @@ packages: got: 12.6.1 registry-auth-token: 5.0.2 registry-url: 6.0.1 - semver: 7.5.0 + semver: 7.5.4 dev: true /packet-reader@1.0.0: @@ -14392,7 +14240,7 @@ packages: jsdoc: 4.0.2 minimist: 1.2.8 protobufjs: 7.2.4 - semver: 7.5.0 + semver: 7.5.4 tmp: 0.2.1 uglify-js: 3.17.4 dev: true @@ -15143,7 +14991,7 @@ packages: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} dependencies: - semver: 7.5.0 + semver: 7.5.4 dev: true /semver-utils@1.1.4: @@ -15157,11 +15005,11 @@ packages: /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + dev: false /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - dev: true /semver@7.2.3: resolution: {integrity: sha512-utbW9Z7ZxVvwiIWkdOMLOR9G/NFXh2aRucghkVrEMJWuC++r3lCkBC3LwqBinyHzGMAJxY5tn6VakZGHObq5ig==} @@ -15192,6 +15040,13 @@ packages: dependencies: lru-cache: 6.0.0 + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -16542,7 +16397,7 @@ packages: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.1.0 - semver: 7.5.0 + semver: 7.5.4 semver-diff: 4.0.0 xdg-basedir: 5.1.0 dev: true From a5200f7d06a8914238a746b80b47bc6a5911a41b Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:17:18 +0900 Subject: [PATCH 6/7] add todo to revisit typings --- packages/webhooks/source/server/server.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/webhooks/source/server/server.ts b/packages/webhooks/source/server/server.ts index 5e12dfa28..ea46ada9f 100644 --- a/packages/webhooks/source/server/server.ts +++ b/packages/webhooks/source/server/server.ts @@ -122,7 +122,7 @@ export class Server { this.#server.route({ handler: (request) => ({ - // @ts-ignore + // @ts-ignore TODO: check typings data: request.server.app.database.all().map((webhook) => { webhook = { ...webhook }; delete webhook.token; @@ -163,13 +163,13 @@ export class Server { this.#server.route({ async handler(request) { - // @ts-ignore + // @ts-ignore TODO: check typings if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } const webhook: Webhook | undefined = Utils.cloneDeep( - // @ts-ignore + // @ts-ignore TODO: check typings request.server.app.database.findById(request.params.id), ); @@ -191,12 +191,12 @@ export class Server { this.#server.route({ handler: (request, h) => { - // @ts-ignore + // @ts-ignore TODO: check typings if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } - // @ts-ignore + // @ts-ignore TODO: check typings request.server.app.database.update(request.params.id, request.payload as Webhook); return h.response().code(204); @@ -210,12 +210,12 @@ export class Server { this.#server.route({ handler: (request, h) => { - // @ts-ignore + // @ts-ignore TODO: check typings if (!request.server.app.database.hasById(request.params.id)) { return Boom.notFound(); } - // @ts-ignore + // @ts-ignore TODO: check typings request.server.app.database.destroy(request.params.id); return h.response().code(204); From df3815050385ce9116d9f4d5d775586c9d4e20c0 Mon Sep 17 00:00:00 2001 From: oXtxNt9U Date: Wed, 11 Oct 2023 09:18:06 +0000 Subject: [PATCH 7/7] style: resolve style guide violations --- packages/api-common/package.json | 2 +- packages/api-development/package.json | 2 +- packages/api-http/package.json | 2 +- packages/api-transaction-pool/package.json | 2 +- packages/cli/package.json | 2 +- packages/crypto-consensus-bls12-381/package.json | 2 +- packages/kernel/package.json | 2 +- packages/p2p/package.json | 2 +- packages/utils/package.json | 2 +- packages/webhooks/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/api-common/package.json b/packages/api-common/package.json index 46a2a4b47..111f46420 100644 --- a/packages/api-common/package.json +++ b/packages/api-common/package.json @@ -39,4 +39,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/api-development/package.json b/packages/api-development/package.json index 4b126526e..c2ba13236 100644 --- a/packages/api-development/package.json +++ b/packages/api-development/package.json @@ -45,4 +45,4 @@ "alias": "api-development" } } -} \ No newline at end of file +} diff --git a/packages/api-http/package.json b/packages/api-http/package.json index e57bfca7b..17794fba2 100644 --- a/packages/api-http/package.json +++ b/packages/api-http/package.json @@ -48,4 +48,4 @@ "alias": "api-http" } } -} \ No newline at end of file +} diff --git a/packages/api-transaction-pool/package.json b/packages/api-transaction-pool/package.json index 7ae144cfc..3383af947 100644 --- a/packages/api-transaction-pool/package.json +++ b/packages/api-transaction-pool/package.json @@ -48,4 +48,4 @@ "alias": "api-transaction-pool" } } -} \ No newline at end of file +} diff --git a/packages/cli/package.json b/packages/cli/package.json index bf877ddc6..4ade792d2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -67,4 +67,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/crypto-consensus-bls12-381/package.json b/packages/crypto-consensus-bls12-381/package.json index cf7a21477..8b2668f19 100644 --- a/packages/crypto-consensus-bls12-381/package.json +++ b/packages/crypto-consensus-bls12-381/package.json @@ -39,4 +39,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/kernel/package.json b/packages/kernel/package.json index 088406134..fb852fa44 100644 --- a/packages/kernel/package.json +++ b/packages/kernel/package.json @@ -58,4 +58,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/p2p/package.json b/packages/p2p/package.json index b1880d964..ca8e4569e 100644 --- a/packages/p2p/package.json +++ b/packages/p2p/package.json @@ -64,4 +64,4 @@ "alias": "p2p" } } -} \ No newline at end of file +} diff --git a/packages/utils/package.json b/packages/utils/package.json index 8861e2c1a..23f77ec6a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -39,4 +39,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +} diff --git a/packages/webhooks/package.json b/packages/webhooks/package.json index 8d37ff10d..7d4f60d1b 100644 --- a/packages/webhooks/package.json +++ b/packages/webhooks/package.json @@ -40,4 +40,4 @@ "engines": { "node": ">=20.x" } -} \ No newline at end of file +}