diff --git a/.pnp.cjs b/.pnp.cjs index f3ffec55fc1..19cd9d84c16 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -2725,7 +2725,6 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["@dashevo/dash-spv", "workspace:packages/dash-spv"],\ ["@dashevo/dark-gravity-wave", "npm:1.1.1"],\ - ["@dashevo/dash-util", "npm:2.0.3"],\ ["@dashevo/dashcore-lib", "npm:0.21.1"],\ ["chai", "npm:4.3.10"],\ ["eslint", "npm:8.53.0"],\ @@ -2741,17 +2740,6 @@ const RAW_RUNTIME_STATE = "linkType": "SOFT"\ }]\ ]],\ - ["@dashevo/dash-util", [\ - ["npm:2.0.3", {\ - "packageLocation": "./.yarn/cache/@dashevo-dash-util-npm-2.0.3-a597c1b8b3-22a14466b3.zip/node_modules/@dashevo/dash-util/",\ - "packageDependencies": [\ - ["@dashevo/dash-util", "npm:2.0.3"],\ - ["bn.js", "npm:4.12.0"],\ - ["buffer-reverse", "npm:1.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["@dashevo/dashcore-lib", [\ ["npm:0.21.1", {\ "packageLocation": "./.yarn/cache/@dashevo-dashcore-lib-npm-0.21.1-2fe9b7647d-68502e4078.zip/node_modules/@dashevo/dashcore-lib/",\ @@ -4085,35 +4073,24 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ - ["npm:3.27.0", {\ - "packageLocation": "./.yarn/cache/@oclif-core-npm-3.27.0-135e8eab17-c525a0a495.zip/node_modules/@oclif/core/",\ + ["npm:4.0.7", {\ + "packageLocation": "./.yarn/cache/@oclif-core-npm-4.0.7-d95b30907c-03908b04e0.zip/node_modules/@oclif/core/",\ "packageDependencies": [\ - ["@oclif/core", "npm:3.27.0"],\ - ["@types/cli-progress", "npm:3.11.5"],\ + ["@oclif/core", "npm:4.0.7"],\ ["ansi-escapes", "npm:4.3.2"],\ - ["ansi-styles", "npm:4.3.0"],\ - ["cardinal", "npm:2.1.1"],\ - ["chalk", "npm:4.1.2"],\ + ["ansis", "npm:3.2.0"],\ ["clean-stack", "npm:3.0.1"],\ - ["cli-progress", "npm:3.12.0"],\ - ["color", "npm:4.2.3"],\ - ["debug", "virtual:135e8eab1747a52ed131c7b09545099ff90be2dfb076b634950da8e30af0467c233586cdf53b64476223ea3c6dbc6335da8e28936cdc745d1f296db6c80cb2f3#npm:4.3.5"],\ + ["cli-spinners", "npm:2.9.2"],\ + ["debug", "virtual:d95b30907c60d4a2290b321a9b21cd1cc55cc4888fe0136d7c25182c13425a199903921828ff1f5595a0e3e1eb57b6ae913c0ea873ea33f5b5df7278454df32e#npm:4.3.5"],\ ["ejs", "npm:3.1.10"],\ ["get-package-type", "npm:0.1.0"],\ ["globby", "npm:11.1.0"],\ - ["hyperlinker", "npm:1.0.0"],\ ["indent-string", "npm:4.0.0"],\ ["is-wsl", "npm:2.2.0"],\ - ["js-yaml", "npm:3.14.1"],\ + ["lilconfig", "npm:3.1.2"],\ ["minimatch", "npm:9.0.4"],\ - ["natural-orderby", "npm:2.0.3"],\ - ["object-treeify", "npm:1.1.33"],\ - ["password-prompt", "npm:1.1.3"],\ - ["slice-ansi", "npm:4.0.0"],\ ["string-width", "npm:4.2.3"],\ - ["strip-ansi", "npm:6.0.1"],\ ["supports-color", "npm:8.1.1"],\ - ["supports-hyperlinks", "npm:2.3.0"],\ ["widest-line", "npm:3.1.0"],\ ["wordwrap", "npm:1.0.0"],\ ["wrap-ansi", "npm:7.0.0"]\ @@ -4129,14 +4106,6 @@ const RAW_RUNTIME_STATE = ["@oclif/core", "npm:2.15.0"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:6.0.5", {\ - "packageLocation": "./.yarn/cache/@oclif-plugin-help-npm-6.0.5-2080c4c337-2b232ec927.zip/node_modules/@oclif/plugin-help/",\ - "packageDependencies": [\ - ["@oclif/plugin-help", "npm:6.0.5"],\ - ["@oclif/core", "npm:3.27.0"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["@oclif/plugin-not-found", [\ @@ -5812,6 +5781,29 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@yarnpkg/esbuild-plugin-pnp", [\ + ["npm:3.0.0-rc.15", {\ + "packageLocation": "./.yarn/cache/@yarnpkg-esbuild-plugin-pnp-npm-3.0.0-rc.15-b916c218b3-454f521088.zip/node_modules/@yarnpkg/esbuild-plugin-pnp/",\ + "packageDependencies": [\ + ["@yarnpkg/esbuild-plugin-pnp", "npm:3.0.0-rc.15"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:3.0.0-rc.15", {\ + "packageLocation": "./.yarn/__virtual__/@yarnpkg-esbuild-plugin-pnp-virtual-b7ecd5c560/0/cache/@yarnpkg-esbuild-plugin-pnp-npm-3.0.0-rc.15-b916c218b3-454f521088.zip/node_modules/@yarnpkg/esbuild-plugin-pnp/",\ + "packageDependencies": [\ + ["@yarnpkg/esbuild-plugin-pnp", "virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:3.0.0-rc.15"],\ + ["@types/esbuild", null],\ + ["esbuild", "npm:0.21.5"],\ + ["tslib", "npm:2.6.2"]\ + ],\ + "packagePeers": [\ + "@types/esbuild",\ + "esbuild"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["@yarnpkg/fslib", [\ ["npm:3.0.0-rc.42", {\ "packageLocation": "./.yarn/cache/@yarnpkg-fslib-npm-3.0.0-rc.42-de16b926e6-a4e4b8453c.zip/node_modules/@yarnpkg/fslib/",\ @@ -6269,6 +6261,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["ansis", [\ + ["npm:3.2.0", {\ + "packageLocation": "./.yarn/cache/ansis-npm-3.2.0-6e033bcd42-1edfb98008.zip/node_modules/ansis/",\ + "packageDependencies": [\ + ["ansis", "npm:3.2.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["anymatch", [\ ["npm:3.1.2", {\ "packageLocation": "./.yarn/cache/anymatch-npm-3.1.2-1d5471acfa-985163db22.zip/node_modules/anymatch/",\ @@ -6841,15 +6842,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["big.js", [\ - ["npm:5.2.2", {\ - "packageLocation": "./.yarn/cache/big.js-npm-5.2.2-e147c30820-c04416aeb0.zip/node_modules/big.js/",\ - "packageDependencies": [\ - ["big.js", "npm:5.2.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["bin-links", [\ ["npm:3.0.0", {\ "packageLocation": "./.yarn/cache/bin-links-npm-3.0.0-6e5e94c609-b738db5100.zip/node_modules/bin-links/",\ @@ -7165,15 +7157,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["buffer-reverse", [\ - ["npm:1.0.1", {\ - "packageLocation": "./.yarn/cache/buffer-reverse-npm-1.0.1-2224e35393-e350872a89.zip/node_modules/buffer-reverse/",\ - "packageDependencies": [\ - ["buffer-reverse", "npm:1.0.1"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["buffer-xor", [\ ["npm:1.0.3", {\ "packageLocation": "./.yarn/cache/buffer-xor-npm-1.0.3-56bb81b0dd-4a63d48b51.zip/node_modules/buffer-xor/",\ @@ -7736,6 +7719,13 @@ const RAW_RUNTIME_STATE = ["cli-spinners", "npm:2.6.1"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:2.9.2", {\ + "packageLocation": "./.yarn/cache/cli-spinners-npm-2.9.2-be9c08efee-a0a863f442.zip/node_modules/cli-spinners/",\ + "packageDependencies": [\ + ["cli-spinners", "npm:2.9.2"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["cli-table", [\ @@ -7898,15 +7888,6 @@ const RAW_RUNTIME_STATE = ["color-string", "npm:1.6.0"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:4.2.3", {\ - "packageLocation": "./.yarn/cache/color-npm-4.2.3-4a23227581-b23f5e500a.zip/node_modules/color/",\ - "packageDependencies": [\ - ["color", "npm:4.2.3"],\ - ["color-convert", "npm:2.0.1"],\ - ["color-string", "npm:1.9.1"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["color-convert", [\ @@ -7952,15 +7933,6 @@ const RAW_RUNTIME_STATE = ["simple-swizzle", "npm:0.2.2"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:1.9.1", {\ - "packageLocation": "./.yarn/cache/color-string-npm-1.9.1-dc020e56be-72aa0b81ee.zip/node_modules/color-string/",\ - "packageDependencies": [\ - ["color-string", "npm:1.9.1"],\ - ["color-name", "npm:1.1.4"],\ - ["simple-swizzle", "npm:0.2.2"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["color-support", [\ @@ -8691,8 +8663,8 @@ const RAW_RUNTIME_STATE = ["@dashevo/masternode-reward-shares-contract", "workspace:packages/masternode-reward-shares-contract"],\ ["@dashevo/wallet-lib", "workspace:packages/wallet-lib"],\ ["@dashevo/withdrawals-contract", "workspace:packages/withdrawals-contract"],\ - ["@oclif/core", "npm:3.27.0"],\ - ["@oclif/plugin-help", "npm:6.0.5"],\ + ["@oclif/core", "npm:4.0.7"],\ + ["@yarnpkg/esbuild-plugin-pnp", "virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:3.0.0-rc.15"],\ ["ajv", "npm:8.12.0"],\ ["ajv-formats", "virtual:e822c5b02ef2b3c5fb9c8d88d5e0ca208365bff76f80510f4ccf9b1de44e2078264bcb00d3cdd5e193c256e9ab81e27c34fcfb1ad3a0e8c1dc8fa0066c78c468#npm:2.1.1"],\ ["awilix", "npm:4.3.4"],\ @@ -8706,6 +8678,7 @@ const RAW_RUNTIME_STATE = ["dockerode", "npm:3.3.5"],\ ["dot", "npm:1.1.3"],\ ["dotenv", "npm:8.6.0"],\ + ["ejs", "npm:3.1.10"],\ ["enquirer", "https://github.com/dashpay/enquirer.git#commit=86aaef0b1c82dfaa3436775e6b37de310eeb94f5"],\ ["esbuild", "npm:0.21.5"],\ ["esbuild-plugin-fileloc", "npm:0.0.6"],\ @@ -8725,7 +8698,6 @@ const RAW_RUNTIME_STATE = ["mocha-sinon", "virtual:595d7482cc8ddf98ee6aef33fc48b46393554ab5f17f851ef62e6e39315e53666c3e66226b978689aa0bc7f1e83a03081511a21db1c381362fe67614887077f9#npm:2.1.2"],\ ["node-forge", "npm:1.3.1"],\ ["node-graceful", "npm:3.1.0"],\ - ["node-loader", "virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:2.0.0"],\ ["oclif", "npm:4.0.3"],\ ["pretty-bytes", "npm:5.6.0"],\ ["pretty-ms", "npm:7.0.1"],\ @@ -8736,6 +8708,7 @@ const RAW_RUNTIME_STATE = ["sinon", "npm:17.0.1"],\ ["sinon-chai", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:3.7.0"],\ ["table", "npm:6.8.1"],\ + ["typescript", "patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=29ae49"],\ ["wrap-ansi", "npm:7.0.0"]\ ],\ "linkType": "SOFT"\ @@ -8802,20 +8775,6 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ - ["virtual:135e8eab1747a52ed131c7b09545099ff90be2dfb076b634950da8e30af0467c233586cdf53b64476223ea3c6dbc6335da8e28936cdc745d1f296db6c80cb2f3#npm:4.3.5", {\ - "packageLocation": "./.yarn/__virtual__/debug-virtual-9d64ce16eb/0/cache/debug-npm-4.3.5-b5001f59b7-cb6eab424c.zip/node_modules/debug/",\ - "packageDependencies": [\ - ["debug", "virtual:135e8eab1747a52ed131c7b09545099ff90be2dfb076b634950da8e30af0467c233586cdf53b64476223ea3c6dbc6335da8e28936cdc745d1f296db6c80cb2f3#npm:4.3.5"],\ - ["@types/supports-color", null],\ - ["ms", "npm:2.1.2"],\ - ["supports-color", "npm:8.1.1"]\ - ],\ - "packagePeers": [\ - "@types/supports-color",\ - "supports-color"\ - ],\ - "linkType": "HARD"\ - }],\ ["virtual:2a426afc4b2eef43db12a540d29c2b5476640459bfcd5c24f86bb401cf8cce97e63bd81794d206a5643057e7f662643afd5ce3dfc4d4bfd8e706006c6309c5fa#npm:3.2.7", {\ "packageLocation": "./.yarn/__virtual__/debug-virtual-d2345003b7/0/cache/debug-npm-3.2.7-754e818c7a-d86fd7be2b.zip/node_modules/debug/",\ "packageDependencies": [\ @@ -8900,6 +8859,20 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "HARD"\ }],\ + ["virtual:d95b30907c60d4a2290b321a9b21cd1cc55cc4888fe0136d7c25182c13425a199903921828ff1f5595a0e3e1eb57b6ae913c0ea873ea33f5b5df7278454df32e#npm:4.3.5", {\ + "packageLocation": "./.yarn/__virtual__/debug-virtual-db0d7b0d4b/0/cache/debug-npm-4.3.5-b5001f59b7-cb6eab424c.zip/node_modules/debug/",\ + "packageDependencies": [\ + ["debug", "virtual:d95b30907c60d4a2290b321a9b21cd1cc55cc4888fe0136d7c25182c13425a199903921828ff1f5595a0e3e1eb57b6ae913c0ea873ea33f5b5df7278454df32e#npm:4.3.5"],\ + ["@types/supports-color", null],\ + ["ms", "npm:2.1.2"],\ + ["supports-color", "npm:8.1.1"]\ + ],\ + "packagePeers": [\ + "@types/supports-color",\ + "supports-color"\ + ],\ + "linkType": "HARD"\ + }],\ ["virtual:f7735febb87b1fbb8215178a6f0b0bc1e3e251c18455c0481843aea1b7aa4c7d6fbdbd3eeee04078e2e2e368e4d4b513dd87411eb2f12aa6ea556f640295bc68#npm:4.3.3", {\ "packageLocation": "./.yarn/__virtual__/debug-virtual-0dd0b2b0b9/0/cache/debug-npm-4.3.3-710fd4cc7f-723a9570dc.zip/node_modules/debug/",\ "packageDependencies": [\ @@ -9444,15 +9417,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["emojis-list", [\ - ["npm:3.0.0", {\ - "packageLocation": "./.yarn/cache/emojis-list-npm-3.0.0-7faa48e6fd-114f47d6d4.zip/node_modules/emojis-list/",\ - "packageDependencies": [\ - ["emojis-list", "npm:3.0.0"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["enabled", [\ ["npm:2.0.0", {\ "packageLocation": "./.yarn/cache/enabled-npm-2.0.0-bf5d96c9d8-9d256d89f4.zip/node_modules/enabled/",\ @@ -13341,6 +13305,15 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["lilconfig", [\ + ["npm:3.1.2", {\ + "packageLocation": "./.yarn/cache/lilconfig-npm-3.1.2-e5b7292949-8058403850.zip/node_modules/lilconfig/",\ + "packageDependencies": [\ + ["lilconfig", "npm:3.1.2"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["lines-and-columns", [\ ["npm:1.1.6", {\ "packageLocation": "./.yarn/cache/lines-and-columns-npm-1.1.6-23e74fab67-198a5436b1.zip/node_modules/lines-and-columns/",\ @@ -13415,18 +13388,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["loader-utils", [\ - ["npm:2.0.4", {\ - "packageLocation": "./.yarn/cache/loader-utils-npm-2.0.4-ba3800585b-28bd9af202.zip/node_modules/loader-utils/",\ - "packageDependencies": [\ - ["loader-utils", "npm:2.0.4"],\ - ["big.js", "npm:5.2.2"],\ - ["emojis-list", "npm:3.0.0"],\ - ["json5", "npm:2.2.3"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["localforage", [\ ["npm:1.10.0", {\ "packageLocation": "./.yarn/cache/localforage-npm-1.10.0-cf9ea9a436-d5c44be3a0.zip/node_modules/localforage/",\ @@ -14820,29 +14781,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["node-loader", [\ - ["npm:2.0.0", {\ - "packageLocation": "./.yarn/cache/node-loader-npm-2.0.0-61cb05ae91-3deae08203.zip/node_modules/node-loader/",\ - "packageDependencies": [\ - ["node-loader", "npm:2.0.0"]\ - ],\ - "linkType": "SOFT"\ - }],\ - ["virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:2.0.0", {\ - "packageLocation": "./.yarn/__virtual__/node-loader-virtual-2f3a07e31f/0/cache/node-loader-npm-2.0.0-61cb05ae91-3deae08203.zip/node_modules/node-loader/",\ - "packageDependencies": [\ - ["node-loader", "virtual:880cda903c2a2be387819a3f857d21494004437a03c92969b9853f7bdeebdfed08d417e68364ee9e158338603a6d78d690c457a55ab11e56398bc10f0ad232fc#npm:2.0.0"],\ - ["@types/webpack", null],\ - ["loader-utils", "npm:2.0.4"],\ - ["webpack", null]\ - ],\ - "packagePeers": [\ - "@types/webpack",\ - "webpack"\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["node-preload", [\ ["npm:0.2.1", {\ "packageLocation": "./.yarn/cache/node-preload-npm-0.2.1-5b6aef1c8e-de36ed365b.zip/node_modules/node-preload/",\ @@ -15826,15 +15764,6 @@ const RAW_RUNTIME_STATE = ["cross-spawn", "npm:6.0.5"]\ ],\ "linkType": "HARD"\ - }],\ - ["npm:1.1.3", {\ - "packageLocation": "./.yarn/cache/password-prompt-npm-1.1.3-0190666768-1cf7001e66.zip/node_modules/password-prompt/",\ - "packageDependencies": [\ - ["password-prompt", "npm:1.1.3"],\ - ["ansi-escapes", "npm:4.3.2"],\ - ["cross-spawn", "npm:7.0.3"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["path-browserify", [\ @@ -19252,6 +19181,13 @@ const RAW_RUNTIME_STATE = ["typescript", "patch:typescript@npm%3A3.9.10#optional!builtin::version=3.9.10&hash=3bd3d3"]\ ],\ "linkType": "HARD"\ + }],\ + ["patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=29ae49", {\ + "packageLocation": "./.yarn/cache/typescript-patch-869a759905-28b3de2dda.zip/node_modules/typescript/",\ + "packageDependencies": [\ + ["typescript", "patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=29ae49"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["ua-parser-js", [\ diff --git a/.yarn/cache/@dashevo-dash-util-npm-2.0.3-a597c1b8b3-22a14466b3.zip b/.yarn/cache/@dashevo-dash-util-npm-2.0.3-a597c1b8b3-22a14466b3.zip deleted file mode 100644 index a7c446acf75..00000000000 Binary files a/.yarn/cache/@dashevo-dash-util-npm-2.0.3-a597c1b8b3-22a14466b3.zip and /dev/null differ diff --git a/.yarn/cache/@oclif-core-npm-3.27.0-135e8eab17-c525a0a495.zip b/.yarn/cache/@oclif-core-npm-3.27.0-135e8eab17-c525a0a495.zip deleted file mode 100644 index dd4bfee21ba..00000000000 Binary files a/.yarn/cache/@oclif-core-npm-3.27.0-135e8eab17-c525a0a495.zip and /dev/null differ diff --git a/.yarn/cache/@oclif-core-npm-4.0.7-d95b30907c-03908b04e0.zip b/.yarn/cache/@oclif-core-npm-4.0.7-d95b30907c-03908b04e0.zip new file mode 100644 index 00000000000..2ffd01b33de Binary files /dev/null and b/.yarn/cache/@oclif-core-npm-4.0.7-d95b30907c-03908b04e0.zip differ diff --git a/.yarn/cache/@oclif-plugin-help-npm-6.0.5-2080c4c337-2b232ec927.zip b/.yarn/cache/@oclif-plugin-help-npm-6.0.5-2080c4c337-2b232ec927.zip deleted file mode 100644 index c97c1eaedb1..00000000000 Binary files a/.yarn/cache/@oclif-plugin-help-npm-6.0.5-2080c4c337-2b232ec927.zip and /dev/null differ diff --git a/.yarn/cache/@yarnpkg-esbuild-plugin-pnp-npm-3.0.0-rc.15-b916c218b3-454f521088.zip b/.yarn/cache/@yarnpkg-esbuild-plugin-pnp-npm-3.0.0-rc.15-b916c218b3-454f521088.zip new file mode 100644 index 00000000000..fac661cda8d Binary files /dev/null and b/.yarn/cache/@yarnpkg-esbuild-plugin-pnp-npm-3.0.0-rc.15-b916c218b3-454f521088.zip differ diff --git a/.yarn/cache/ansis-npm-3.2.0-6e033bcd42-1edfb98008.zip b/.yarn/cache/ansis-npm-3.2.0-6e033bcd42-1edfb98008.zip new file mode 100644 index 00000000000..c08eb82694c Binary files /dev/null and b/.yarn/cache/ansis-npm-3.2.0-6e033bcd42-1edfb98008.zip differ diff --git a/.yarn/cache/big.js-npm-5.2.2-e147c30820-c04416aeb0.zip b/.yarn/cache/big.js-npm-5.2.2-e147c30820-c04416aeb0.zip deleted file mode 100644 index 34e2a7b767c..00000000000 Binary files a/.yarn/cache/big.js-npm-5.2.2-e147c30820-c04416aeb0.zip and /dev/null differ diff --git a/.yarn/cache/buffer-reverse-npm-1.0.1-2224e35393-e350872a89.zip b/.yarn/cache/buffer-reverse-npm-1.0.1-2224e35393-e350872a89.zip deleted file mode 100644 index 6942b0d28e2..00000000000 Binary files a/.yarn/cache/buffer-reverse-npm-1.0.1-2224e35393-e350872a89.zip and /dev/null differ diff --git a/.yarn/cache/cli-spinners-npm-2.9.2-be9c08efee-a0a863f442.zip b/.yarn/cache/cli-spinners-npm-2.9.2-be9c08efee-a0a863f442.zip new file mode 100644 index 00000000000..0a7507dd8a5 Binary files /dev/null and b/.yarn/cache/cli-spinners-npm-2.9.2-be9c08efee-a0a863f442.zip differ diff --git a/.yarn/cache/color-npm-4.2.3-4a23227581-b23f5e500a.zip b/.yarn/cache/color-npm-4.2.3-4a23227581-b23f5e500a.zip deleted file mode 100644 index 3f65ebe0c16..00000000000 Binary files a/.yarn/cache/color-npm-4.2.3-4a23227581-b23f5e500a.zip and /dev/null differ diff --git a/.yarn/cache/color-string-npm-1.9.1-dc020e56be-72aa0b81ee.zip b/.yarn/cache/color-string-npm-1.9.1-dc020e56be-72aa0b81ee.zip deleted file mode 100644 index 7cb3fbdc1b7..00000000000 Binary files a/.yarn/cache/color-string-npm-1.9.1-dc020e56be-72aa0b81ee.zip and /dev/null differ diff --git a/.yarn/cache/emojis-list-npm-3.0.0-7faa48e6fd-114f47d6d4.zip b/.yarn/cache/emojis-list-npm-3.0.0-7faa48e6fd-114f47d6d4.zip deleted file mode 100644 index 3d306eceac4..00000000000 Binary files a/.yarn/cache/emojis-list-npm-3.0.0-7faa48e6fd-114f47d6d4.zip and /dev/null differ diff --git a/.yarn/cache/lilconfig-npm-3.1.2-e5b7292949-8058403850.zip b/.yarn/cache/lilconfig-npm-3.1.2-e5b7292949-8058403850.zip new file mode 100644 index 00000000000..6e6a74f6236 Binary files /dev/null and b/.yarn/cache/lilconfig-npm-3.1.2-e5b7292949-8058403850.zip differ diff --git a/.yarn/cache/loader-utils-npm-2.0.4-ba3800585b-28bd9af202.zip b/.yarn/cache/loader-utils-npm-2.0.4-ba3800585b-28bd9af202.zip deleted file mode 100644 index 7f203315bd2..00000000000 Binary files a/.yarn/cache/loader-utils-npm-2.0.4-ba3800585b-28bd9af202.zip and /dev/null differ diff --git a/.yarn/cache/node-loader-npm-2.0.0-61cb05ae91-3deae08203.zip b/.yarn/cache/node-loader-npm-2.0.0-61cb05ae91-3deae08203.zip deleted file mode 100644 index a6a88ead12b..00000000000 Binary files a/.yarn/cache/node-loader-npm-2.0.0-61cb05ae91-3deae08203.zip and /dev/null differ diff --git a/.yarn/cache/password-prompt-npm-1.1.3-0190666768-1cf7001e66.zip b/.yarn/cache/password-prompt-npm-1.1.3-0190666768-1cf7001e66.zip deleted file mode 100644 index 11d8442b2b5..00000000000 Binary files a/.yarn/cache/password-prompt-npm-1.1.3-0190666768-1cf7001e66.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-5.5.2-78d461a8f7-9118b20f24.zip b/.yarn/cache/typescript-npm-5.5.2-78d461a8f7-9118b20f24.zip new file mode 100644 index 00000000000..8565226d65c Binary files /dev/null and b/.yarn/cache/typescript-npm-5.5.2-78d461a8f7-9118b20f24.zip differ diff --git a/.yarn/cache/typescript-patch-869a759905-28b3de2dda.zip b/.yarn/cache/typescript-patch-869a759905-28b3de2dda.zip new file mode 100644 index 00000000000..b0ad100a9ee Binary files /dev/null and b/.yarn/cache/typescript-patch-869a759905-28b3de2dda.zip differ diff --git a/package.json b/package.json index f0d141aec42..bcf21a54327 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "configure": "yarn exec ./scripts/configure.sh", "clean:data": "yarn run dashmate group reset --verbose --group=local --hard", "clean": "yarn run clean:data && yarn run build", - "dashmate": "yarn workspace dashmate run dashmate", + "dashmate": "./packages/dashmate/bin/run.js", "release": "yarn exec ./scripts/release/release.sh", "bench": "yarn workspace @dashevo/bench-suite bench" }, diff --git a/packages/dash-spv/config/config.js b/packages/dash-spv/config/config.js index 267c3536b5f..9284aa873d4 100644 --- a/packages/dash-spv/config/config.js +++ b/packages/dash-spv/config/config.js @@ -1,4 +1,3 @@ -const DashUtil = require('@dashevo/dash-util'); const utils = require('../lib/utils'); module.exports = { @@ -7,7 +6,7 @@ module.exports = { return utils.normalizeHeader({ version: 1, previousblockhash: '0000000000000000000000000000000000000000000000000000000000000000', - merkleroot: DashUtil.nullHash.toString('hex'), + merkleroot: '0000000000000000000000000000000000000000000000000000000000000000', time: 1504510163, bits: '1fffffff', nonce: 2307, diff --git a/packages/dash-spv/lib/merkleproofs.js b/packages/dash-spv/lib/merkleproofs.js index dca09952c35..75c88d32d68 100644 --- a/packages/dash-spv/lib/merkleproofs.js +++ b/packages/dash-spv/lib/merkleproofs.js @@ -1,5 +1,3 @@ -const DashUtil = require('@dashevo/dash-util'); - const merkleproofs = { /** * validates an array of tx hashes or Transaction instances @@ -11,7 +9,7 @@ const merkleproofs = { validateTxProofs: (merkleBlock, transactions) => { let txToFilter = transactions.slice(); if (typeof transactions[0] === 'string') { - txToFilter = txToFilter.map((tx) => DashUtil.toHash(tx).toString('hex')); + txToFilter = txToFilter.map((tx) => Buffer.from(tx, 'hex').reverse().toString('hex')); } return merkleBlock.validMerkleTree && txToFilter.filter((tx) => merkleBlock.hasTransaction(tx)).length === transactions.length; diff --git a/packages/dash-spv/lib/utils.js b/packages/dash-spv/lib/utils.js index c2119b88a67..d85c683b1f7 100644 --- a/packages/dash-spv/lib/utils.js +++ b/packages/dash-spv/lib/utils.js @@ -1,10 +1,8 @@ /* eslint no-underscore-dangle: ["error", { "allow": ["_getHash"] }] */ /* eslint-disable no-bitwise */ -const DashUtil = require('@dashevo/dash-util'); const dashcore = require('@dashevo/dashcore-lib'); module.exports = { - getCorrectedHash(reversedHashObj) { const clone = Buffer.alloc(32); reversedHashObj.copy(clone); @@ -26,7 +24,7 @@ module.exports = { return new dashcore.BlockHeader({ version: el.version, - prevHash: DashUtil.toHash(el.previousblockhash || el.prevHash), + prevHash: Buffer.from(el.previousblockhash || el.prevHash, 'hex').reverse(), merkleRoot: (el.merkleroot || el.merkleRoot), time: el.time, bits: parseInt(el.bits, 16), @@ -39,8 +37,23 @@ module.exports = { target: header.bits, }; }, + expandTarget(bits) { + if (bits > 0xffffffff) { + throw new Error('"bits" may not be larger than 4 bytes'); + } + + const exponent = bits >>> 24; + if (exponent <= 3) throw new Error('target exponent must be > 3'); + if (exponent > 32) throw new Error('target exponent must be < 32'); + + const mantissa = bits & 0x007fffff; + const target = Buffer.alloc(32).fill(0); + target.writeUInt32BE(mantissa << 8, 32 - exponent); + + return target; + }, validProofOfWork(header) { - const target = DashUtil.expandTarget(header.bits); + const target = this.expandTarget(header.bits); const hash = header._getHash().reverse(); return hash.compare(target) === -1; }, @@ -50,8 +63,8 @@ module.exports = { do { header = new dashcore.BlockHeader({ version: 2, - prevHash: prev ? prev._getHash() : DashUtil.nullHash, - merkleRoot: DashUtil.nullHash, + prevHash: prev ? prev._getHash() : Buffer.alloc(32), + merkleRoot: Buffer.alloc(32), time: prev ? (prev.time + 1) : Math.floor(Date.now() / 1000), bits, nonce: i += 1, diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index 35cac4b1fd6..3a9b8ba5ec1 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -13,7 +13,6 @@ "license": "MIT", "dependencies": { "@dashevo/dark-gravity-wave": "^1.1.1", - "@dashevo/dash-util": "^2.0.3", "@dashevo/dashcore-lib": "~0.21.1", "levelup": "^4.4.0", "memdown": "^5.1.0", diff --git a/packages/dashmate/bin/run.js b/packages/dashmate/bin/run.js index cfd917e73ce..dbd8672988a 100755 --- a/packages/dashmate/bin/run.js +++ b/packages/dashmate/bin/run.js @@ -1,6 +1,5 @@ -async function main() { - const { execute } = await import('@oclif/core'); - await execute({ dir: '/Users/ivanshumkov/Projects/dashpay/platform/packages/dashmate/', development: true }); -} +#!/usr/bin/env node -await main(); +import { run } from '../dist/index.js'; + +await run(); diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index f52fa4ab2ed..540aa7fe8ef 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -40,7 +40,7 @@ const { version } = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT_DIR, 'pack * @param {HomeDir} homeDir * @returns {getBaseConfig} */ -export default function getBaseConfigFactory(homeDir) { +export default function getBaseConfigFactory({ homeDir }) { const prereleaseTag = semver.prerelease(version) === null ? '' : `-${semver.prerelease(version)[0]}`; const dockerImageVersion = `${semver.major(version)}.${semver.minor(version)}${prereleaseTag}`; diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index 6148abbf866..5e526dbdaa4 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -10,7 +10,7 @@ const { merge: lodashMerge } = lodash; * @param {getBaseConfig} getBaseConfig * @returns {getLocalConfig} */ -export default function getLocalConfigFactory(getBaseConfig) { +export default function getLocalConfigFactory({ getBaseConfig }) { /** * @typedef {function} getLocalConfig * @returns {Config} diff --git a/packages/dashmate/configs/defaults/getMainnetConfigFactory.js b/packages/dashmate/configs/defaults/getMainnetConfigFactory.js index a744b69d763..927bc8b0eb2 100644 --- a/packages/dashmate/configs/defaults/getMainnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getMainnetConfigFactory.js @@ -13,7 +13,7 @@ const { merge: lodashMerge } = lodash; * @param {getBaseConfig} getBaseConfig * @returns {getMainnetConfig} */ -export default function getMainnetConfigFactory(homeDir, getBaseConfig) { +export default function getMainnetConfigFactory({ homeDir, getBaseConfig }) { /** * @typedef {function} getMainnetConfig * @returns {Config} diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index 59210678ce1..57fd97d2534 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -10,7 +10,7 @@ const { merge: lodashMerge } = lodash; * @param {getBaseConfig} getBaseConfig * @returns {getTestnetConfig} */ -export default function getTestnetConfigFactory(homeDir, getBaseConfig) { +export default function getTestnetConfigFactory({ homeDir, getBaseConfig }) { /** * @typedef {function} getTestnetConfig * @returns {Config} diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index 664f9bcf3d8..d518354b6cb 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -15,7 +15,7 @@ import { * @param {DefaultConfigs} defaultConfigs * @returns {getConfigFileMigrations} */ -export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) { +export default function getConfigFileMigrationsFactory({ homeDir, defaultConfigs }) { /** * @typedef {function} getConfigFileMigrations * @returns {Object} diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 2c685df7d2c..ae25965c4a3 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -11,8 +11,8 @@ "test:unit": "mocha --recursive test/unit", "test:e2e": "mocha --recursive test/e2e", "helper": "node scripts/helper.js", - "build": "./scripts/build.js", - "dashmate": "node ./dist/bin/run.js" + "build": "rm -rf dist && ./scripts/build.js", + "dashmate": "node ./bin/run.js" }, "repository": { "type": "git", @@ -67,8 +67,7 @@ "@dashevo/masternode-reward-shares-contract": "workspace:*", "@dashevo/wallet-lib": "workspace:*", "@dashevo/withdrawals-contract": "workspace:*", - "@oclif/core": "3.27.0", - "@oclif/plugin-help": "6.0.5", + "@oclif/core": "^4.0.7", "ajv": "^8.6.0", "ajv-formats": "^2.1.1", "awilix": "^4.2.6", @@ -99,12 +98,17 @@ "table": "^6.8.1", "wrap-ansi": "^7.0.0" }, + "optionalDependencies": { + "typescript": "^5" + }, "devDependencies": { "@babel/core": "^7.23.3", "@babel/eslint-parser": "^7.23.3", + "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.15", "chai": "^4.3.10", "chai-as-promised": "^7.1.1", "dirty-chai": "^2.0.1", + "ejs": "^3.1.6", "esbuild": "^0.21.5", "esbuild-plugin-fileloc": "^0.0.6", "eslint": "^8.53.0", @@ -134,15 +138,16 @@ "additionalHelpFlags": [ "-h" ], - "commands": "src/commands", + "commands": { + "strategy": "explicit", + "target": "./dist/index.js", + "identifier": "COMMANDS" + }, "bin": "dashmate", "macos": { "identifier": "org.dash.dashmate", "sign": "'Developer ID Installer: The Dash Foundation, Inc.'" }, - "plugins": [ - "@oclif/plugin-help" - ], "topics": { "config": { "description": "Manage configs" diff --git a/packages/dashmate/scripts/build.js b/packages/dashmate/scripts/build.js index 69423526e65..7fb7755655b 100755 --- a/packages/dashmate/scripts/build.js +++ b/packages/dashmate/scripts/build.js @@ -4,7 +4,7 @@ import * as esbuild from 'esbuild'; import fileloc from 'esbuild-plugin-fileloc'; await esbuild.build({ - entryPoints: ['./bin/run.js', './src/commands/index.js'], + entryPoints: ['./src/index.js', 'src/help.js'], bundle: true, outdir: './dist', platform: 'node', @@ -12,8 +12,10 @@ await esbuild.build({ format: 'esm', inject: ['./scripts/build/shim.js'], plugins: [fileloc.filelocPlugin()], + // external: ['ejs'], + treeShaking: true, loader: { - '.node': 'file', - // '.proto': 'file', + '.node': 'copy', }, + mainFields: ['main'], }); diff --git a/packages/dashmate/src/commands/config/index.js b/packages/dashmate/src/commands/config/index.js index ddd3080055b..85589c2a99c 100644 --- a/packages/dashmate/src/commands/config/index.js +++ b/packages/dashmate/src/commands/config/index.js @@ -22,13 +22,12 @@ export default class ConfigCommand extends ConfigBaseCommand { * @param {Config} config * @return {Promise} */ - async runWithDependencies( - args, - { + async runWithDependencies({ + flags: { format, }, config, - ) { + }) { let configOptions; if (format === OUTPUT_FORMATS.JSON) { configOptions = JSON.stringify(config.getOptions(), null, 2); diff --git a/packages/dashmate/src/commands/index.js b/packages/dashmate/src/commands/index.js deleted file mode 100644 index 5a4f34d0b86..00000000000 --- a/packages/dashmate/src/commands/index.js +++ /dev/null @@ -1,34 +0,0 @@ -// Iterate over all files in this directory and build an explicit list of commands -// -// import { glob } from 'glob'; -// import path from 'path'; -// import { fileURLToPath } from 'url'; -// -// const currentFile = fileURLToPath(import.meta.url); -// const currentDir = path.dirname(currentFile); - -// eslint-disable-next-line import/prefer-default-export -export const COMMANDS = {}; -// -// for (const file of glob.sync(`${currentDir}/**/*.js`)) { -// if (file === currentFile) { -// continue; -// } -// -// const relativePath = path.relative(currentDir, file); -// const dirName = path.dirname(relativePath); -// let baseName = path.basename(relativePath, '.js'); -// -// // If the baseName is 'index', it means the command is the directory itself -// if (baseName === 'index') { -// baseName = ''; -// } -// -// const commandName = path.join(dirName, baseName).replace(path.sep, ' ').trim(); -// -// COMMANDS[commandName] = (await import(`./${relativePath}`)).default; -// } - -COMMANDS['setup'] = (await import('./setup.js')).default; - -console.dir(COMMANDS); diff --git a/packages/dashmate/src/commands/setup.js b/packages/dashmate/src/commands/setup.js index 8b09ce8bc9f..461390a8450 100644 --- a/packages/dashmate/src/commands/setup.js +++ b/packages/dashmate/src/commands/setup.js @@ -44,11 +44,11 @@ export default class SetupCommand extends BaseCommand { * @param {DefaultConfigs} defaultConfigs * @return {Promise} */ - async runWithDependencies( - { + async runWithDependencies({ + args: { preset, }, - { + flags: { 'node-count': nodeCount, 'debug-logs': debugLogs, 'miner-interval': minerInterval, @@ -59,7 +59,7 @@ export default class SetupCommand extends BaseCommand { setupRegularPresetTask, dockerCompose, defaultConfigs, - ) { + }) { if (nodeCount !== null && (nodeCount < 3)) { throw new Error('node-count flag should be not less than 3'); } diff --git a/packages/dashmate/src/config/configFile/ConfigFileJsonRepository.js b/packages/dashmate/src/config/configFile/ConfigFileJsonRepository.js index 7772f71bc5a..a03ecbae2ea 100644 --- a/packages/dashmate/src/config/configFile/ConfigFileJsonRepository.js +++ b/packages/dashmate/src/config/configFile/ConfigFileJsonRepository.js @@ -13,7 +13,7 @@ export default class ConfigFileJsonRepository { * @param {migrateConfigFile} migrateConfigFile * @param {HomeDir} homeDir */ - constructor(migrateConfigFile, homeDir) { + constructor({ migrateConfigFile, homeDir }) { this.migrateConfigFile = migrateConfigFile; this.ajv = new Ajv(); this.configFilePath = homeDir.joinPath('config.json'); diff --git a/packages/dashmate/src/config/configFile/createConfigFileFactory.js b/packages/dashmate/src/config/configFile/createConfigFileFactory.js index 3707758c8c6..84aae406663 100644 --- a/packages/dashmate/src/config/configFile/createConfigFileFactory.js +++ b/packages/dashmate/src/config/configFile/createConfigFileFactory.js @@ -9,7 +9,7 @@ import { PACKAGE_ROOT_DIR } from '../../constants.js'; * @param {HomeDir} homeDir * @return {createConfigFile} */ -export default function createConfigFileFactory(defaultConfigs, homeDir) { +export default function createConfigFileFactory({ defaultConfigs, homeDir }) { /** * @typedef {function} createConfigFile * @returns {ConfigFile} diff --git a/packages/dashmate/src/config/generateEnvsFactory.js b/packages/dashmate/src/config/generateEnvsFactory.js index fcb0491ecf7..bf25e58fc8b 100644 --- a/packages/dashmate/src/config/generateEnvsFactory.js +++ b/packages/dashmate/src/config/generateEnvsFactory.js @@ -9,7 +9,7 @@ import { DASHMATE_HELPER_DOCKER_IMAGE } from '../constants.js'; * @param {getConfigProfiles} getConfigProfiles * @return {generateEnvs} */ -export default function generateEnvsFactory(configFile, homeDir, getConfigProfiles) { +export default function generateEnvsFactory({ configFile, homeDir, getConfigProfiles }) { /** * @typedef {function} generateEnvs * @param {Config} config diff --git a/packages/dashmate/src/constants.js b/packages/dashmate/src/constants.js index c2ef3b574f7..bcfebf03f09 100644 --- a/packages/dashmate/src/constants.js +++ b/packages/dashmate/src/constants.js @@ -41,7 +41,8 @@ export const HPMN_COLLATERAL_AMOUNT = 4000; // number of blocks to wait before core DKG exchange session export const MIN_BLOCKS_BEFORE_DKG = 6; -export const PACKAGE_ROOT_DIR = path.join(__dirname, '..'); +// export const PACKAGE_ROOT_DIR = path.join(__dirname, '..'); +export const PACKAGE_ROOT_DIR = path.join(url.fileURLToPath(import.meta.url), '../..'); export const TEMPLATES_DIR = path.join(PACKAGE_ROOT_DIR, 'templates'); const { version } = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT_DIR, 'package.json'), 'utf8')); diff --git a/packages/dashmate/src/core/startCoreFactory.js b/packages/dashmate/src/core/startCoreFactory.js index 71fe923e48a..5b215597db1 100644 --- a/packages/dashmate/src/core/startCoreFactory.js +++ b/packages/dashmate/src/core/startCoreFactory.js @@ -3,20 +3,18 @@ import CoreService from './CoreService.js'; /** * @param {createRpcClient} createRpcClient * @param {waitForCoreStart} waitForCoreStart - * @param {waitForCoreSync} waitForCoreSync * @param {DockerCompose} dockerCompose * @param {getConnectionHost} getConnectionHost * @param {ensureFileMountExists} ensureFileMountExists * @return {startCore} */ -export default function startCoreFactory( +export default function startCoreFactory({ createRpcClient, waitForCoreStart, - waitForCoreSync, dockerCompose, getConnectionHost, ensureFileMountExists, -) { +}) { /** * @typedef startCore * @param {Config} config diff --git a/packages/dashmate/src/createDIContainer.js b/packages/dashmate/src/createDIContainer.js index 3c032e3a0e8..bae9b40a430 100644 --- a/packages/dashmate/src/createDIContainer.js +++ b/packages/dashmate/src/createDIContainer.js @@ -128,11 +128,11 @@ export default async function createDIContainer(options = {}) { HomeDir.createWithPathOrDefault(options.DASHMATE_HOME_DIR) )).singleton(), getServiceList: asFunction(getServiceListFactory).singleton(), - configFileRepository: asClass(ConfigFileJsonRepository).singleton(), - getBaseConfig: asFunction(getBaseConfigFactory).singleton(), - getLocalConfig: asFunction(getLocalConfigFactory).singleton(), - getTestnetConfig: asFunction(getTestnetConfigFactory).singleton(), - getMainnetConfig: asFunction(getMainnetConfigFactory).singleton(), + configFileRepository: asClass(ConfigFileJsonRepository).singleton().proxy(), + getBaseConfig: asFunction(getBaseConfigFactory).singleton().proxy(), + getLocalConfig: asFunction(getLocalConfigFactory).singleton().proxy(), + getTestnetConfig: asFunction(getTestnetConfigFactory).singleton().proxy(), + getMainnetConfig: asFunction(getMainnetConfigFactory).singleton().proxy(), defaultConfigs: asFunction(( getBaseConfig, getLocalConfig, @@ -144,12 +144,12 @@ export default async function createDIContainer(options = {}) { getTestnetConfig, getMainnetConfig, ])).singleton(), - createConfigFile: asFunction(createConfigFileFactory).singleton(), - getConfigFileMigrations: asFunction(getConfigFileMigrationsFactory).singleton(), + createConfigFile: asFunction(createConfigFileFactory).singleton().proxy(), + getConfigFileMigrations: asFunction(getConfigFileMigrationsFactory).singleton().proxy(), migrateConfigFile: asFunction(migrateConfigFileFactory).singleton(), isHelper: asValue(process.env.DASHMATE_HELPER === '1'), - getConnectionHost: asFunction(getConnectionHostFactory).singleton(), - generateEnvs: asFunction(generateEnvsFactory).singleton(), + getConnectionHost: asFunction(getConnectionHostFactory).singleton().proxy(), + generateEnvs: asFunction(generateEnvsFactory).singleton().proxy(), getConfigProfiles: asFunction(getConfigProfilesFactory).singleton(), ensureFileMountExists: asFunction(ensureFileMountExistsFactory).singleton(), // `configFile` and `config` are registering on command init @@ -175,7 +175,7 @@ export default async function createDIContainer(options = {}) { container.register({ renderTemplate: asFunction(renderTemplateFactory).singleton(), renderServiceTemplates: asFunction(renderServiceTemplatesFactory).singleton(), - writeServiceConfigs: asFunction(writeServiceConfigsFactory).singleton(), + writeServiceConfigs: asFunction(writeServiceConfigsFactory).singleton().proxy(), writeConfigTemplates: asFunction(writeConfigTemplatesFactory).singleton(), }); @@ -191,7 +191,7 @@ export default async function createDIContainer(options = {}) { getCertificate: asValue(getCertificate), listCertificates: asValue(listCertificates), createSelfSignedCertificate: asValue(createSelfSignedCertificate), - verificationServer: asClass(VerificationServer).singleton(), + verificationServer: asClass(VerificationServer).singleton().proxy(), }); /** @@ -210,7 +210,7 @@ export default async function createDIContainer(options = {}) { docker: asFunction(() => ( new Docker(dockerOptions) )).singleton(), - dockerCompose: asClass(DockerCompose).singleton(), + dockerCompose: asClass(DockerCompose).singleton().proxy(), startedContainers: asFunction(() => ( new StartedContainers() )).singleton(), @@ -227,7 +227,7 @@ export default async function createDIContainer(options = {}) { waitForCoreStart: asValue(waitForCoreStart), waitForCoreSync: asValue(waitForCoreSync), waitForMasternodesSync: asValue(waitForMasternodesSync), - startCore: asFunction(startCoreFactory).singleton(), + startCore: asFunction(startCoreFactory).singleton().proxy(), waitForBlocks: asValue(waitForBlocks), waitForConfirmations: asValue(waitForConfirmations), generateBlsKeys: asValue(generateBlsKeys), @@ -269,22 +269,24 @@ export default async function createDIContainer(options = {}) { container.register({ buildServicesTask: asFunction(buildServicesTaskFactory).singleton(), startGroupNodesTask: asFunction(startGroupNodesTaskFactory).singleton(), - generateToAddressTask: asFunction(generateToAddressTaskFactory).singleton(), - registerMasternodeTask: asFunction(registerMasternodeTaskFactory).singleton(), + generateToAddressTask: asFunction(generateToAddressTaskFactory).singleton().proxy(), + registerMasternodeTask: asFunction(registerMasternodeTaskFactory).singleton().proxy(), startNodeTask: asFunction(startNodeTaskFactory).singleton(), stopNodeTask: asFunction(stopNodeTaskFactory).singleton(), restartNodeTask: asFunction(restartNodeTaskFactory).singleton(), resetNodeTask: asFunction(resetNodeTaskFactory).singleton(), - setupLocalPresetTask: asFunction(setupLocalPresetTaskFactory).singleton(), - setupRegularPresetTask: asFunction(setupRegularPresetTaskFactory).singleton(), - configureCoreTask: asFunction(configureCoreTaskFactory).singleton(), + setupLocalPresetTask: asFunction(setupLocalPresetTaskFactory).singleton().proxy(), + setupRegularPresetTask: asFunction(setupRegularPresetTaskFactory).singleton().proxy(), + configureCoreTask: asFunction(configureCoreTaskFactory).singleton().proxy(), configureTenderdashTask: asFunction(configureTenderdashTaskFactory).singleton(), waitForNodeToBeReadyTask: asFunction(waitForNodeToBeReadyTaskFactory).singleton(), - enableCoreQuorumsTask: asFunction(enableCoreQuorumsTaskFactory).singleton(), + enableCoreQuorumsTask: asFunction(enableCoreQuorumsTaskFactory).singleton().proxy(), registerMasternodeGuideTask: asFunction(registerMasternodeGuideTaskFactory).singleton(), - obtainZeroSSLCertificateTask: asFunction(obtainZeroSSLCertificateTaskFactory).singleton(), - obtainSelfSignedCertificateTask: asFunction(obtainSelfSignedCertificateTaskFactory).singleton(), - saveCertificateTask: asFunction(saveCertificateTaskFactory), + obtainZeroSSLCertificateTask: asFunction(obtainZeroSSLCertificateTaskFactory) + .singleton().proxy(), + obtainSelfSignedCertificateTask: asFunction(obtainSelfSignedCertificateTaskFactory) + .singleton().proxy(), + saveCertificateTask: asFunction(saveCertificateTaskFactory).proxy(), reindexNodeTask: asFunction(reindexNodeTaskFactory).singleton(), getCoreScope: asFunction(getCoreScopeFactory).singleton(), getMasternodeScope: asFunction(getMasternodeScopeFactory).singleton(), diff --git a/packages/dashmate/src/docker/DockerCompose.js b/packages/dashmate/src/docker/DockerCompose.js index 38353b98d33..da76f3b105b 100644 --- a/packages/dashmate/src/docker/DockerCompose.js +++ b/packages/dashmate/src/docker/DockerCompose.js @@ -63,7 +63,7 @@ export default class DockerCompose { * @param {generateEnvs} generateEnvs * @param {getServiceList} getServiceList */ - constructor(docker, startedContainers, homeDir, generateEnvs, getServiceList) { + constructor({ docker, startedContainers, homeDir, generateEnvs, getServiceList}) { this.#docker = docker; this.#startedContainers = startedContainers; this.#homeDir = homeDir; diff --git a/packages/dashmate/src/docker/getConnectionHostFactory.js b/packages/dashmate/src/docker/getConnectionHostFactory.js index b676f15aa89..551f285c7ae 100644 --- a/packages/dashmate/src/docker/getConnectionHostFactory.js +++ b/packages/dashmate/src/docker/getConnectionHostFactory.js @@ -3,7 +3,7 @@ * @param {boolean} isHelper * @return {getConnectionHost} */ -export default function getConnectionHostFactory(dockerCompose, isHelper) { +export default function getConnectionHostFactory({ dockerCompose, isHelper }) { /** * Get proper service endpoint url * @typedef {function} getConnectionHost diff --git a/packages/dashmate/src/ejs.js b/packages/dashmate/src/ejs.js new file mode 100644 index 00000000000..36325b3d3bd --- /dev/null +++ b/packages/dashmate/src/ejs.js @@ -0,0 +1,3 @@ +import ejs from 'ejs'; + +export default ejs; diff --git a/packages/dashmate/src/help.js b/packages/dashmate/src/help.js new file mode 100644 index 00000000000..af524d7a567 --- /dev/null +++ b/packages/dashmate/src/help.js @@ -0,0 +1,11 @@ +import {Command, HelpBase} from '@oclif/core'; + +export default class CustomHelp extends HelpBase { + showHelp(args) { + console.log('This will be displayed in multi-command CLIs'); + } + + showCommandHelp(command, topics) { + console.log('This will be displayed in single-command CLIs'); + } +} diff --git a/packages/dashmate/src/index.js b/packages/dashmate/src/index.js new file mode 100644 index 00000000000..39233e6bb10 --- /dev/null +++ b/packages/dashmate/src/index.js @@ -0,0 +1,11 @@ +import { execute } from '@oclif/core'; + +// eslint-disable-next-line import/prefer-default-export +export const COMMANDS = { + setup: (await import('./commands/setup.js')).default, + config: (await import('./commands/config/index.js')).default, +}; + +export async function run() { + await execute({ dir: import.meta.url, development: Boolean(process.env.DEBUG) }); +} diff --git a/packages/dashmate/src/listr/tasks/registerMasternodeTaskFactory.js b/packages/dashmate/src/listr/tasks/registerMasternodeTaskFactory.js index 93ba94beca7..7c6ebc71cbf 100644 --- a/packages/dashmate/src/listr/tasks/registerMasternodeTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/registerMasternodeTaskFactory.js @@ -12,7 +12,6 @@ import { * * @param {startCore} startCore * @param {createNewAddress} createNewAddress - * @param {generateToAddress} generateToAddress * @param {generateBlocks} generateBlocks * @param {waitForCoreSync} waitForCoreSync * @param {importPrivateKey} importPrivateKey @@ -23,10 +22,9 @@ import { * @param {waitForBalanceToConfirm} waitForBalanceToConfirm * @return {registerMasternodeTask} */ -export default function registerMasternodeTaskFactory( +export default function registerMasternodeTaskFactory({ startCore, createNewAddress, - generateToAddress, generateBlocks, waitForCoreSync, importPrivateKey, @@ -35,7 +33,7 @@ export default function registerMasternodeTaskFactory( waitForConfirmations, registerMasternode, waitForBalanceToConfirm, -) { +}) { /** * @typedef {registerMasternodeTask} * @param {Config} config diff --git a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js index 93966875254..772780c981e 100644 --- a/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js @@ -12,7 +12,6 @@ const { PrivateKey } = DashCoreLib; * @param {writeConfigTemplates} writeConfigTemplates * @param {startCore} startCore * @param {generateBlocks} generateBlocks - * @param {waitForCoreSync} waitForCoreSync * @param {activateCoreSpork} activateCoreSpork * @param {generateToAddressTask} generateToAddressTask * @param {registerMasternodeTask} registerMasternodeTask @@ -22,11 +21,10 @@ const { PrivateKey } = DashCoreLib; * @param {ConfigFile} configFile * @return {configureCoreTask} */ -export default function configureCoreTaskFactory( +export default function configureCoreTaskFactory({ writeConfigTemplates, startCore, generateBlocks, - waitForCoreSync, activateCoreSpork, generateToAddressTask, registerMasternodeTask, @@ -34,7 +32,7 @@ export default function configureCoreTaskFactory( enableCoreQuorumsTask, waitForMasternodesSync, configFile, -) { +}) { const WAIT_FOR_NODES_TIMEOUT = 60 * 5 * 1000; /** diff --git a/packages/dashmate/src/listr/tasks/setup/local/enableCoreQuorumsTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/local/enableCoreQuorumsTaskFactory.js index 49fbbd47379..d2f99729d54 100644 --- a/packages/dashmate/src/listr/tasks/setup/local/enableCoreQuorumsTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/local/enableCoreQuorumsTaskFactory.js @@ -10,7 +10,7 @@ import waitForMasternodeProbes from '../../../../core/quorum/waitForMasternodePr * @param {generateBlocks} generateBlocks * @return {enableCoreQuorumsTask} */ -export default function enableCoreQuorumsTaskFactory(generateBlocks) { +export default function enableCoreQuorumsTaskFactory({ generateBlocks }) { /** * @typedef {enableCoreQuorumsTask} * @return {Listr} diff --git a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js index 51e9918a06d..8a2dd763904 100644 --- a/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js @@ -15,7 +15,7 @@ import generateRandomString from '../../../util/generateRandomString.js'; * @param {generateHDPrivateKeys} generateHDPrivateKeys * @param {HomeDir} homeDir */ -export default function setupLocalPresetTaskFactory( +export default function setupLocalPresetTaskFactory({ configFile, configureCoreTask, obtainSelfSignedCertificateTask, @@ -23,7 +23,7 @@ export default function setupLocalPresetTaskFactory( resolveDockerHostIp, generateHDPrivateKeys, homeDir, -) { +}) { /** * @typedef {setupLocalPresetTask} * @return {Listr} diff --git a/packages/dashmate/src/listr/tasks/setup/setupRegularPresetTaskFactory.js b/packages/dashmate/src/listr/tasks/setup/setupRegularPresetTaskFactory.js index 544ab8003f2..34edd8bc080 100644 --- a/packages/dashmate/src/listr/tasks/setup/setupRegularPresetTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/setup/setupRegularPresetTaskFactory.js @@ -18,24 +18,18 @@ import generateRandomString from '../../../util/generateRandomString.js'; /** * @param {ConfigFile} configFile - * @param {generateBlsKeys} generateBlsKeys - * @param {registerMasternodeTask} registerMasternodeTask - * @param {obtainZeroSSLCertificateTask} obtainZeroSSLCertificateTask * @param {registerMasternodeGuideTask} registerMasternodeGuideTask * @param {configureNodeTask} configureNodeTask * @param {configureSSLCertificateTask} configureSSLCertificateTask * @param {DefaultConfigs} defaultConfigs */ -export default function setupRegularPresetTaskFactory( +export default function setupRegularPresetTaskFactory({ configFile, - generateBlsKeys, - registerMasternodeTask, - obtainZeroSSLCertificateTask, registerMasternodeGuideTask, configureNodeTask, configureSSLCertificateTask, defaultConfigs, -) { +}) { /** * @typedef {setupRegularPresetTask} * @return {Listr} diff --git a/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js b/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js index eba5de00e46..461d51bbf30 100644 --- a/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js +++ b/packages/dashmate/src/listr/tasks/ssl/VerificationServer.js @@ -12,7 +12,7 @@ export default class VerificationServer { * @param {StartedContainers} startedContainers * @param {HomeDir} homeDir */ - constructor(docker, dockerPull, startedContainers, homeDir) { + constructor({ docker, dockerPull, startedContainers, homeDir }) { this.docker = docker; this.dockerPull = dockerPull; this.startedContainers = startedContainers; diff --git a/packages/dashmate/src/listr/tasks/ssl/saveCertificateTask.js b/packages/dashmate/src/listr/tasks/ssl/saveCertificateTask.js index bbcfac1ea04..2bcf44c2f16 100644 --- a/packages/dashmate/src/listr/tasks/ssl/saveCertificateTask.js +++ b/packages/dashmate/src/listr/tasks/ssl/saveCertificateTask.js @@ -6,7 +6,7 @@ import fs from 'fs'; * @param {HomeDir} homeDir * @return {saveCertificateTask} */ -export default function saveCertificateTaskFactory(homeDir) { +export default function saveCertificateTaskFactory({ homeDir }) { /** * @typedef {function} saveCertificateTask * @param {Config} config diff --git a/packages/dashmate/src/listr/tasks/ssl/selfSigned/obtainSelfSignedCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/ssl/selfSigned/obtainSelfSignedCertificateTaskFactory.js index f29ec615b7f..574f74ac775 100644 --- a/packages/dashmate/src/listr/tasks/ssl/selfSigned/obtainSelfSignedCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/ssl/selfSigned/obtainSelfSignedCertificateTaskFactory.js @@ -7,12 +7,12 @@ import { Listr } from 'listr2'; * @param {saveCertificateTask} saveCertificateTask * @return {obtainSelfSignedCertificateTask} */ -export default function obtainSelfSignedCertificateTaskFactory( +export default function obtainSelfSignedCertificateTaskFactory({ generateKeyPair, generateCsr, createSelfSignedCertificate, saveCertificateTask, -) { +}) { /** * @typedef {obtainSelfSignedCertificateTask} * @param {Config} config diff --git a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js index 12718ad4de4..01b992466cd 100644 --- a/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js @@ -12,24 +12,20 @@ import wait from '../../../../util/wait.js'; * @param {verifyDomain} verifyDomain * @param {downloadCertificate} downloadCertificate * @param {getCertificate} getCertificate - * @param {listCertificates} listCertificates - * @param {saveCertificateTask} saveCertificateTask * @param {VerificationServer} verificationServer * @param {HomeDir} homeDir * @return {obtainZeroSSLCertificateTask} */ -export default function obtainZeroSSLCertificateTaskFactory( +export default function obtainZeroSSLCertificateTaskFactory({ generateCsr, generateKeyPair, createZeroSSLCertificate, verifyDomain, downloadCertificate, getCertificate, - listCertificates, - saveCertificateTask, verificationServer, homeDir, -) { +}) { /** * @typedef {obtainZeroSSLCertificateTask} * @param {Config} config diff --git a/packages/dashmate/src/listr/tasks/wallet/generateToAddressTaskFactory.js b/packages/dashmate/src/listr/tasks/wallet/generateToAddressTaskFactory.js index cb139be8632..2e2d5b49f27 100644 --- a/packages/dashmate/src/listr/tasks/wallet/generateToAddressTaskFactory.js +++ b/packages/dashmate/src/listr/tasks/wallet/generateToAddressTaskFactory.js @@ -7,17 +7,15 @@ import { Observable } from 'rxjs'; * @param {startCore} startCore * @param {createNewAddress} createNewAddress * @param {generateToAddress} generateToAddress - * @param {generateBlocks} generateBlocks * @param {waitForBalanceToConfirm} waitForBalanceToConfirm * @return {generateToAddressTask} */ -export default function generateToAddressTaskFactory( +export default function generateToAddressTaskFactory({ startCore, createNewAddress, generateToAddress, - generateBlocks, waitForBalanceToConfirm, -) { +}) { /** * @typedef {generateToAddressTask} * @param {Config} config diff --git a/packages/dashmate/src/oclif/command/BaseCommand.js b/packages/dashmate/src/oclif/command/BaseCommand.js index 157a60259d6..0ab9f3d6f39 100644 --- a/packages/dashmate/src/oclif/command/BaseCommand.js +++ b/packages/dashmate/src/oclif/command/BaseCommand.js @@ -1,6 +1,6 @@ import { Command, Flags, settings } from '@oclif/core'; -import { asValue } from 'awilix'; +import { asValue, InjectionMode } from 'awilix'; import graceful from 'node-graceful'; @@ -86,11 +86,14 @@ export default class BaseCommand extends Command { throw new Error('`run` or `runWithDependencies` must be implemented'); } - const params = getFunctionParams(this.runWithDependencies, 2); + // const params = getFunctionParams(this.runWithDependencies, 2); - const dependencies = params.map((paramName) => this.container.resolve(paramName)); + // const dependencies = params.map((paramName) => this.container.resolve(paramName)); - return this.runWithDependencies(this.parsedArgs, this.parsedFlags, ...dependencies); + return this.container.build(this.runWithDependencies, { + injectionMode: InjectionMode.PROXY, + injector: () => ({ args: this.parsedArgs, flags: this.parsedFlags }), + }); } async finally(err) { diff --git a/packages/dashmate/src/templates/writeServiceConfigsFactory.js b/packages/dashmate/src/templates/writeServiceConfigsFactory.js index e6ba7558566..906ce948390 100644 --- a/packages/dashmate/src/templates/writeServiceConfigsFactory.js +++ b/packages/dashmate/src/templates/writeServiceConfigsFactory.js @@ -5,7 +5,7 @@ import path from 'path'; * @param {HomeDir} homeDir * @return {writeServiceConfigs} */ -export default function writeServiceConfigsFactory(homeDir) { +export default function writeServiceConfigsFactory({ homeDir }) { /** * Write service config files * diff --git a/yarn.lock b/yarn.lock index fd76aed3e1d..0a403e8e6e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1599,7 +1599,6 @@ __metadata: resolution: "@dashevo/dash-spv@workspace:packages/dash-spv" dependencies: "@dashevo/dark-gravity-wave": "npm:^1.1.1" - "@dashevo/dash-util": "npm:^2.0.3" "@dashevo/dashcore-lib": "npm:~0.21.1" chai: "npm:^4.3.10" eslint: "npm:^8.53.0" @@ -1614,16 +1613,6 @@ __metadata: languageName: unknown linkType: soft -"@dashevo/dash-util@npm:^2.0.3": - version: 2.0.3 - resolution: "@dashevo/dash-util@npm:2.0.3" - dependencies: - bn.js: "npm:^4.6.4" - buffer-reverse: "npm:^1.0.1" - checksum: 22a14466b3c8249975c0e2bf88424fe5caca2405a1bd530213c7cf83dd3fcaee8bc58bcec5fd5947840bf4d5688ffedfb8b89348e29a44f8bb9abff299d9e24e - languageName: node - linkType: hard - "@dashevo/dashcore-lib@npm:~0.21.1": version: 0.21.1 resolution: "@dashevo/dashcore-lib@npm:0.21.1" @@ -2719,42 +2708,6 @@ __metadata: languageName: node linkType: hard -"@oclif/core@npm:3.27.0, @oclif/core@npm:^3.9.1": - version: 3.27.0 - resolution: "@oclif/core@npm:3.27.0" - dependencies: - "@types/cli-progress": "npm:^3.11.5" - ansi-escapes: "npm:^4.3.2" - ansi-styles: "npm:^4.3.0" - cardinal: "npm:^2.1.1" - chalk: "npm:^4.1.2" - clean-stack: "npm:^3.0.1" - cli-progress: "npm:^3.12.0" - color: "npm:^4.2.3" - debug: "npm:^4.3.5" - ejs: "npm:^3.1.10" - get-package-type: "npm:^0.1.0" - globby: "npm:^11.1.0" - hyperlinker: "npm:^1.0.0" - indent-string: "npm:^4.0.0" - is-wsl: "npm:^2.2.0" - js-yaml: "npm:^3.14.1" - minimatch: "npm:^9.0.4" - natural-orderby: "npm:^2.0.3" - object-treeify: "npm:^1.1.33" - password-prompt: "npm:^1.1.3" - slice-ansi: "npm:^4.0.0" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - supports-color: "npm:^8.1.1" - supports-hyperlinks: "npm:^2.2.0" - widest-line: "npm:^3.1.0" - wordwrap: "npm:^1.0.0" - wrap-ansi: "npm:^7.0.0" - checksum: c525a0a495566f3f57fc3a30a04553c2e02f402afb6e79f55e456f52168ed76abfaf5d693aeb7edc1ff7f1464233f72f02ba694b48237615addbda199532b571 - languageName: node - linkType: hard - "@oclif/core@npm:^2.15.0": version: 2.15.0 resolution: "@oclif/core@npm:2.15.0" @@ -2825,12 +2778,28 @@ __metadata: languageName: node linkType: hard -"@oclif/plugin-help@npm:6.0.5": - version: 6.0.5 - resolution: "@oclif/plugin-help@npm:6.0.5" +"@oclif/core@npm:^4.0.7": + version: 4.0.7 + resolution: "@oclif/core@npm:4.0.7" dependencies: - "@oclif/core": "npm:^3.9.1" - checksum: 2b232ec927eb61f6695f4dbe53655b5d470027377d8d9b2224b2c1a7e1bfc0c16181e2cba5f67402d504a183cfee49b78c3050c04a8f94aeb2774be1e01b3335 + ansi-escapes: "npm:^4.3.2" + ansis: "npm:^3.1.1" + clean-stack: "npm:^3.0.1" + cli-spinners: "npm:^2.9.2" + debug: "npm:^4.3.5" + ejs: "npm:^3.1.10" + get-package-type: "npm:^0.1.0" + globby: "npm:^11.1.0" + indent-string: "npm:^4.0.0" + is-wsl: "npm:^2.2.0" + lilconfig: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + string-width: "npm:^4.2.3" + supports-color: "npm:^8" + widest-line: "npm:^3.1.0" + wordwrap: "npm:^1.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 03908b04e0c3ae67f3d5f26f540554f37f7859f10376d19a1d286b844317d7e6e28bb96ba92de8e3ccc0fd21809d14c5a695c417bae573d8112b83a044943689 languageName: node linkType: hard @@ -3352,7 +3321,7 @@ __metadata: languageName: node linkType: hard -"@types/cli-progress@npm:^3.11.0, @types/cli-progress@npm:^3.11.5": +"@types/cli-progress@npm:^3.11.0": version: 3.11.5 resolution: "@types/cli-progress@npm:3.11.5" dependencies: @@ -4050,6 +4019,17 @@ __metadata: languageName: node linkType: hard +"@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.15": + version: 3.0.0-rc.15 + resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" + dependencies: + tslib: "npm:^2.4.0" + peerDependencies: + esbuild: ">=0.10.0" + checksum: 454f521088c1fa24fda51f83ca4a50ba6e3bd147e5dee8c899e6bf24a7196186532c3abb18480e83395708ffb7238c9cac5b82595c3985ce93593b5afbd0a9f0 + languageName: node + linkType: hard + "@yarnpkg/fslib@npm:^3.0.0-rc.42": version: 3.0.0-rc.42 resolution: "@yarnpkg/fslib@npm:3.0.0-rc.42" @@ -4420,6 +4400,13 @@ __metadata: languageName: node linkType: hard +"ansis@npm:^3.1.1": + version: 3.2.0 + resolution: "ansis@npm:3.2.0" + checksum: 1edfb98008d173e18cea1f8c539a62bd013905d51b65c1404f7b34cb92733858296abda48800a3522e08e2151c08306c809ce7c2ec83e37f178a53ea0f6843f3 + languageName: node + linkType: hard + "anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -4873,13 +4860,6 @@ __metadata: languageName: node linkType: hard -"big.js@npm:^5.2.2": - version: 5.2.2 - resolution: "big.js@npm:5.2.2" - checksum: c04416aeb084f4aa1c5857722439c327cc0ada9bd99ab80b650e3f30e2e4f1b92a04527ed1e7df8ffcd7c0ea311745a04af12d53e2f091bf09a06f1292003827 - languageName: node - linkType: hard - "bin-links@npm:^3.0.0": version: 3.0.0 resolution: "bin-links@npm:3.0.0" @@ -5134,13 +5114,6 @@ __metadata: languageName: node linkType: hard -"buffer-reverse@npm:^1.0.1": - version: 1.0.1 - resolution: "buffer-reverse@npm:1.0.1" - checksum: e350872a89b17af0a7e1bd7a73239a535164f3f010b0800add44f2e52bd0511548dc5b96c20309effba969868c385023d2d02a0add6155f6a76da7b3073b77bd - languageName: node - linkType: hard - "buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" @@ -5642,6 +5615,13 @@ __metadata: languageName: node linkType: hard +"cli-spinners@npm:^2.9.2": + version: 2.9.2 + resolution: "cli-spinners@npm:2.9.2" + checksum: a0a863f442df35ed7294424f5491fa1756bd8d2e4ff0c8736531d886cec0ece4d85e8663b77a5afaf1d296e3cbbebff92e2e99f52bbea89b667cbe789b994794 + languageName: node + linkType: hard + "cli-table@npm:^0.3.1": version: 0.3.11 resolution: "cli-table@npm:0.3.11" @@ -5811,16 +5791,6 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.9.0": - version: 1.9.1 - resolution: "color-string@npm:1.9.1" - dependencies: - color-name: "npm:^1.0.0" - simple-swizzle: "npm:^0.2.2" - checksum: 72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd - languageName: node - linkType: hard - "color-support@npm:^1.1.2": version: 1.1.3 resolution: "color-support@npm:1.1.3" @@ -5840,16 +5810,6 @@ __metadata: languageName: node linkType: hard -"color@npm:^4.2.3": - version: 4.2.3 - resolution: "color@npm:4.2.3" - dependencies: - color-convert: "npm:^2.0.1" - color-string: "npm:^1.9.0" - checksum: b23f5e500a79ea22428db43d1a70642d983405c0dd1f95ef59dbdb9ba66afbb4773b334fa0b75bb10b0552fd7534c6b28d4db0a8b528f91975976e70973c0152 - languageName: node - linkType: hard - "colorette@npm:^2.0.14, colorette@npm:^2.0.19, colorette@npm:^2.0.7": version: 2.0.20 resolution: "colorette@npm:2.0.20" @@ -6502,8 +6462,8 @@ __metadata: "@dashevo/masternode-reward-shares-contract": "workspace:*" "@dashevo/wallet-lib": "workspace:*" "@dashevo/withdrawals-contract": "workspace:*" - "@oclif/core": "npm:3.27.0" - "@oclif/plugin-help": "npm:6.0.5" + "@oclif/core": "npm:^4.0.7" + "@yarnpkg/esbuild-plugin-pnp": "npm:^3.0.0-rc.15" ajv: "npm:^8.6.0" ajv-formats: "npm:^2.1.1" awilix: "npm:^4.2.6" @@ -6517,6 +6477,7 @@ __metadata: dockerode: "npm:^3.3.5" dot: "npm:^1.1.3" dotenv: "npm:^8.6.0" + ejs: "npm:^3.1.6" enquirer: "github:dashpay/enquirer#patch-1" esbuild: "npm:^0.21.5" esbuild-plugin-fileloc: "npm:^0.0.6" @@ -6536,7 +6497,6 @@ __metadata: mocha-sinon: "npm:^2.1.2" node-forge: "npm:^1.3.1" node-graceful: "npm:^3.0.1" - node-loader: "npm:^2.0.0" oclif: "npm:^4.0.3" pretty-bytes: "npm:^5.3.0" pretty-ms: "npm:^7.0.0" @@ -6547,7 +6507,11 @@ __metadata: sinon: "npm:^17.0.1" sinon-chai: "npm:^3.7.0" table: "npm:^6.8.1" + typescript: "npm:^5" wrap-ansi: "npm:^7.0.0" + dependenciesMeta: + typescript: + optional: true bin: dashmate: ./bin/run.js languageName: unknown @@ -7024,7 +6988,7 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.10, ejs@npm:^3.1.8, ejs@npm:^3.1.9": +"ejs@npm:^3.1.10, ejs@npm:^3.1.6, ejs@npm:^3.1.8, ejs@npm:^3.1.9": version: 3.1.10 resolution: "ejs@npm:3.1.10" dependencies: @@ -7071,13 +7035,6 @@ __metadata: languageName: node linkType: hard -"emojis-list@npm:^3.0.0": - version: 3.0.0 - resolution: "emojis-list@npm:3.0.0" - checksum: 114f47d6d45612621497d2b1556c8f142c35332a591780a54e863e42d281e72d6c7d7c419f2e419319d4eb7f6ebf1db82d9744905d90f275db20d06a763b5e19 - languageName: node - linkType: hard - "enabled@npm:2.0.x": version: 2.0.0 resolution: "enabled@npm:2.0.0" @@ -10100,7 +10057,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.2, json5@npm:^2.2.3": +"json5@npm:^2.2.0, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -10370,6 +10327,13 @@ __metadata: languageName: node linkType: hard +"lilconfig@npm:^3.1.2": + version: 3.1.2 + resolution: "lilconfig@npm:3.1.2" + checksum: 8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0 + languageName: node + linkType: hard + "lines-and-columns@npm:^1.1.6": version: 1.1.6 resolution: "lines-and-columns@npm:1.1.6" @@ -10429,17 +10393,6 @@ __metadata: languageName: node linkType: hard -"loader-utils@npm:^2.0.0": - version: 2.0.4 - resolution: "loader-utils@npm:2.0.4" - dependencies: - big.js: "npm:^5.2.2" - emojis-list: "npm:^3.0.0" - json5: "npm:^2.1.2" - checksum: 28bd9af2025b0cb2fc6c9c2d8140a75a3ab61016e5a86edf18f63732216e985a50bf2479a662555beb472a54d12292e380423705741bfd2b54cab883aa067f18 - languageName: node - linkType: hard - "localforage@npm:^1.10.0": version: 1.10.0 resolution: "localforage@npm:1.10.0" @@ -11675,17 +11628,6 @@ __metadata: languageName: node linkType: hard -"node-loader@npm:^2.0.0": - version: 2.0.0 - resolution: "node-loader@npm:2.0.0" - dependencies: - loader-utils: "npm:^2.0.0" - peerDependencies: - webpack: ^5.0.0 - checksum: 3deae08203cc841f8bccb9025e6267d8f103c6e3fe9fceaafce93c99937a249d93b25ed3f4e19cf1779bb97d55101be87197835e9246d93f832fea9a3b136818 - languageName: node - linkType: hard - "node-preload@npm:^0.2.1": version: 0.2.1 resolution: "node-preload@npm:0.2.1" @@ -12619,16 +12561,6 @@ __metadata: languageName: node linkType: hard -"password-prompt@npm:^1.1.3": - version: 1.1.3 - resolution: "password-prompt@npm:1.1.3" - dependencies: - ansi-escapes: "npm:^4.3.2" - cross-spawn: "npm:^7.0.3" - checksum: 1cf7001e66868b2ed7a03e036bc2f1dd45eb6dc8fee7e3e2056370057c484be25e7468fee00a1378e1ee8eca77ba79f48bee5ce15dcb464413987ace63c68b35 - languageName: node - linkType: hard - "path-browserify@npm:^1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" @@ -14706,7 +14638,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": +"supports-color@npm:8.1.1, supports-color@npm:^8, supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -15457,6 +15389,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5": + version: 5.5.2 + resolution: "typescript@npm:5.5.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 9118b20f248e76b0dbff8737fef65dfa89d02668d4e633d2c5ceac99033a0ca5e8a1c1a53bc94da68e8f67677a88f318663dde859c9e9a09c1e116415daec2ba + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^3.9.5#optional!builtin": version: 3.9.10 resolution: "typescript@patch:typescript@npm%3A3.9.10#optional!builtin::version=3.9.10&hash=3bd3d3" @@ -15467,6 +15409,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5#optional!builtin": + version: 5.5.2 + resolution: "typescript@patch:typescript@npm%3A5.5.2#optional!builtin::version=5.5.2&hash=29ae49" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 28b3de2ddaf63a7620e7ddbe5d377af71ce93ecc558c41bf0e3d88661d8e6e7aa6c7739164fef98055f69819e41faca49252938ef3633a3dff2734cca6a9042e + languageName: node + linkType: hard + "ua-parser-js@npm:^1.0.33": version: 1.0.33 resolution: "ua-parser-js@npm:1.0.33"