Skip to content

Commit abb1742

Browse files
committed
Squashed commit of the following:
commit 04e69ea Author: Jeromy Cannon <[email protected]> Date: Thu Dec 26 13:22:26 2024 +0000 Squashed commit of the following: commit 5ab8bfdffd3c5d1932e7ed6a61e736d7216b4248 Author: Jeromy Cannon <[email protected]> Date: Thu Dec 26 13:15:50 2024 +0000 got `solo init` to work. Signed-off-by: Jeromy Cannon <[email protected]> commit 8bcf11c95ca5e310b177ed00be3a58a24fdbbac6 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 22:00:08 2024 +0000 remove eslint errors Signed-off-by: Jeromy Cannon <[email protected]> commit de0046a370e14582500ce25e412cb8c8fb7158a1 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 21:59:51 2024 +0000 removed isolated modules, it seems to be adding js files and dist folders in incorrect locations Signed-off-by: Jeromy Cannon <[email protected]> commit 4909cbdcf289ba35d68620bab88bb73815f5ecc2 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 21:59:23 2024 +0000 change eslint back, if we need to override, we can use @ignore tags and document Signed-off-by: Jeromy Cannon <[email protected]> Signed-off-by: Jeromy Cannon <[email protected]> commit 8c16717 Author: Jeromy Cannon <[email protected]> Date: Thu Dec 26 13:24:23 2024 +0000 Squashed commit of the following: commit 294aa0a Author: Ivo Yankov <[email protected]> Date: Thu Dec 26 10:36:26 2024 +0200 chore: add build step to unit test CI Signed-off-by: Ivo Yankov <[email protected]> commit f67071c Author: Ivo Yankov <[email protected]> Date: Thu Dec 26 10:26:14 2024 +0200 fix: update mocha scripts in package.json Signed-off-by: Ivo Yankov <[email protected]> commit be6d88e Author: Ivo Yankov <[email protected]> Date: Thu Dec 26 09:54:26 2024 +0200 chore: run formatter Signed-off-by: Ivo Yankov <[email protected]> commit c0b8b16 Author: Ivo Yankov <[email protected]> Date: Thu Dec 26 09:52:14 2024 +0200 fix: various unit tests Signed-off-by: Ivo Yankov <[email protected]> commit 5a05b87 Author: Ivo Yankov <[email protected]> Date: Thu Dec 26 08:13:22 2024 +0200 fix: injections in tests Signed-off-by: Ivo Yankov <[email protected]> commit 6178ccf Merge: 24269fe c3a9691 Author: Ivo Yankov <[email protected]> Date: Tue Dec 24 15:39:32 2024 +0200 Merge remote-tracking branch 'origin/00822-implement-inversion-of-control-2' into 00822-implement-inversion-of-control-2 # Conflicts: # src/core/account_manager.ts # src/core/config/local_config.ts # src/core/config_manager.ts # src/core/lease/lease_manager.ts # src/core/profile_manager.ts # src/index.ts # test/setup.ts # test/test_container.ts # test/test_util.ts # test/unit/commands/base.test.ts # test/unit/commands/context.test.ts # test/unit/commands/network.test.ts # test/unit/core/platform_installer.test.ts # test/unit/core/profile_manager.test.ts commit c3a9691 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 20:35:20 2024 +0000 add reflect metadata back Signed-off-by: Jeromy Cannon <[email protected]> commit dd13b95 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 20:28:06 2024 +0000 fixed eslint errors from `npm run check` Signed-off-by: Jeromy Cannon <[email protected]> commit 6d7522c Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 20:14:08 2024 +0000 npm run format Signed-off-by: Jeromy Cannon <[email protected]> commit f323ca7 Author: Jeromy Cannon <[email protected]> Date: Mon Dec 23 19:59:26 2024 +0000 Squashed commit of the following: commit 24269fe Author: Ivo Yankov <[email protected]> Date: Fri Dec 20 11:03:26 2024 +0200 wip: attempting to fix tests Signed-off-by: Ivo Yankov <[email protected]> commit 7698f16 Author: Ivo Yankov <[email protected]> Date: Thu Dec 19 15:41:38 2024 +0200 chore: format Signed-off-by: Ivo Yankov <[email protected]> commit 507a081 Author: Ivo Yankov <[email protected]> Date: Thu Dec 19 14:53:36 2024 +0200 feat: implement IOC in core classes Signed-off-by: Ivo Yankov <[email protected]> commit c582f12 Author: Ivo Yankov <[email protected]> Date: Wed Dec 18 17:32:22 2024 +0200 wip: refactoring dependencies Signed-off-by: Ivo Yankov <[email protected]> Signed-off-by: Jeromy Cannon <[email protected]> commit 1b9b7e6 Author: Jan Milenkov <[email protected]> Date: Mon Dec 23 21:22:56 2024 +0200 feat: dynamically construct the genesis-network.json and add it to the values file to be used during network deploy (#982) Signed-off-by: Jeromy Cannon <[email protected]> Co-authored-by: Jeromy Cannon <[email protected]> commit 3c3673a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 23 08:12:58 2024 -0600 chore(deps): bump jfrog/setup-jfrog-cli from 4.5.2 to 4.5.3 (#1015) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 299cd85 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 23 08:12:30 2024 -0600 chore(deps): bump helm/kind-action from 1.11.0 to 1.12.0 (#1014) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 1d57fb8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 23 07:47:07 2024 -0600 chore(deps): bump chalk from 5.4.0 to 5.4.1 (#1013) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit a4e5cd8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 23 07:26:24 2024 -0600 chore(deps): bump inquirer from 12.2.0 to 12.3.0 (#1012) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7a69623 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Dec 22 19:20:53 2024 +0000 chore(deps-dev): bump eslint-plugin-n from 17.15.0 to 17.15.1 (#1011) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7bb0e99 Author: Jeromy Cannon <[email protected]> Date: Sun Dec 22 07:31:54 2024 +0000 fix: refactored Taskfiles, fixed bugs with taskfile, lease interval, sdk node client connection, and commands missing quiet flag (#978) Signed-off-by: Jeromy Cannon <[email protected]> commit 861c579 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Dec 19 11:06:35 2024 -0600 chore(deps-dev): bump globals from 15.13.0 to 15.14.0 (#1007) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit e80bda8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Dec 19 11:06:22 2024 -0600 chore(deps): bump chalk from 5.3.0 to 5.4.0 (#1008) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f4b49aa Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Dec 19 10:47:50 2024 -0600 chore(deps): bump @hashgraph/sdk from 2.55.1 to 2.56.0 (#1009) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit c9711c5 Author: Ivo Yankov <[email protected]> Date: Thu Dec 19 18:47:03 2024 +0200 feat: update `solo context connect` to connect to single remote cluster (#993) Signed-off-by: Ivo Yankov <[email protected]> commit 043efcf Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 18 16:56:19 2024 -0600 chore(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0 (#1002) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 8115945 Author: Pranali Deshmukh <[email protected]> Date: Thu Dec 19 00:55:58 2024 +0200 docs(README): Updated the "Install Solo" section. (#1004) Signed-off-by: Pranali Deshmukh <[email protected]> commit 01ed969 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 18 11:19:09 2024 -0600 chore(deps): bump actions/setup-java from 4.5.0 to 4.6.0 (#1003) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Jeromy Cannon <[email protected]> commit 24269fe Author: Ivo Yankov <[email protected]> Date: Fri Dec 20 11:03:26 2024 +0200 wip: attempting to fix tests Signed-off-by: Ivo Yankov <[email protected]> commit 7698f16 Author: Ivo Yankov <[email protected]> Date: Thu Dec 19 15:41:38 2024 +0200 chore: format Signed-off-by: Ivo Yankov <[email protected]> commit 507a081 Author: Ivo Yankov <[email protected]> Date: Thu Dec 19 14:53:36 2024 +0200 feat: implement IOC in core classes Signed-off-by: Ivo Yankov <[email protected]> commit c582f12 Author: Ivo Yankov <[email protected]> Date: Wed Dec 18 17:32:22 2024 +0200 wip: refactoring dependencies Signed-off-by: Ivo Yankov <[email protected]> Signed-off-by: Jeromy Cannon <[email protected]>
1 parent 813a4ab commit abb1742

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+581
-382
lines changed

.github/workflows/zxc-unit-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ jobs:
7575
id: npm-deps
7676
run: npm ci
7777

78+
- name: Compile Project
79+
run: npm run build
80+
7881
- name: Run Unit Tests
7982
run: npm test
8083

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NOTES:
1818
## Customizing the examples
1919

2020
* take a look at the Taskfile.yml sitting in the subdirectory for the deployment you want to run
21-
* make sure your cluster can handle the number in SOLO_NETWORK_SIZE, if not, then you will have to update that and make it match the number of nodes in the `init-containers-values.yaml`: `hedera.nodes[]`
21+
* make sure your cluster can handle the number in SOLO\_NETWORK\_SIZE, if not, then you will have to update that and make it match the number of nodes in the `init-containers-values.yaml`: `hedera.nodes[]`
2222
* take a look at the `init-containers-values.yaml` file and make sure the values are correct for your deployment with special attention to:
2323
* resources
2424
* nodeSelector

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@
1111
"access": "public"
1212
},
1313
"scripts": {
14-
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'test/unit/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
15-
"test-mathex": "cross-env MOCHA_SUITE_NAME=\"MathEx Unit Tests\" c8 --report-dir='coverage/unit-mathex' mocha 'test/unit/**/math_ex*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
16-
"test-e2e-all": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" c8 --report-dir='coverage/e2e-all' mocha 'test/e2e/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-all.xml",
17-
"test-e2e-integration": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --report-dir='coverage/e2e-integration' mocha 'test/e2e/integration/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
18-
"test-e2e-leases": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Lease Tests\" c8 --report-dir='coverage/e2e-leases' mocha 'test/e2e/integration/core/lease*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
19-
"test-e2e-standard": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --report-dir='coverage/e2e-standard' mocha 'test/e2e/**/*.ts' --ignore 'test/unit/**/*.ts' --ignore 'test/e2e/integration/**/*.ts' --ignore 'test/e2e/commands/mirror_node*.ts' --ignore 'test/e2e/commands/node*.ts' --ignore 'test/e2e/commands/separate_node*.ts' --ignore 'test/e2e/commands/relay*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-standard.xml --timeout 30000",
20-
"test-e2e-mirror-node": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" c8 --report-dir='coverage/e2e-mirror-node' mocha 'test/e2e/commands/mirror_node.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-mirror-node.xml",
21-
"test-e2e-node-pem-stop": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" c8 --report-dir='coverage/e2e-node-pem-stop' mocha 'test/e2e/commands/node_pem_stop.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-stop.xml",
22-
"test-e2e-node-pem-kill": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" c8 --report-dir='coverage/e2e-node-pem-kill' mocha 'test/e2e/commands/node_pem_kill.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-kill.xml",
23-
"test-e2e-node-local-hedera": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local Hedera Tests\" c8 --report-dir='coverage/e2e-node-local-hedera' mocha 'test/e2e/commands/node_local_hedera.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-hedera.xml",
24-
"test-e2e-node-local-ptt": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local PTT Tests\" c8 --report-dir='coverage/e2e-node-local-ptt' mocha 'test/e2e/commands/node_local_ptt.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-ptt.xml",
25-
"test-e2e-node-add": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Tests\" c8 --report-dir='coverage/e2e-node-add' mocha 'test/e2e/commands/node_add.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add.xml",
26-
"test-e2e-node-add-local": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Local Tests\" c8 --report-dir='coverage/e2e-node-add-local' mocha 'test/e2e/commands/node_add_local.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-local.xml",
27-
"test-e2e-node-add-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-add-separate-commands' mocha 'test/e2e/commands/separate_node_add*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-separate-commands.xml",
28-
"test-e2e-node-update": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update Tests\" c8 --report-dir='coverage/e2e-node-update' mocha 'test/e2e/commands/node_update*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update.xml",
29-
"test-e2e-node-update-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-update-separate-commands' mocha 'test/e2e/commands/separate_node_update.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update-separate-commands.xml",
30-
"test-e2e-node-delete": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete Tests\" c8 --report-dir='coverage/e2e-node-delete' mocha 'test/e2e/commands/node_delete*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete.xml",
31-
"test-e2e-node-delete-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-delete-separate-commands' mocha 'test/e2e/commands/separate_node_delete*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete-separate-commands.xml",
32-
"test-e2e-node-upgrade": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Upgrade Tests\" c8 --report-dir='coverage/e2e-node-upgrade' mocha 'test/e2e/commands/node_upgrade*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-upgrade.xml",
33-
"test-e2e-relay": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Relay Tests\" c8 --report-dir='coverage/e2e-relay' mocha 'test/e2e/commands/relay.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-relay.xml",
34-
"solo-test": "tsx --no-deprecation --no-warnings solo.ts",
14+
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'dist/test/unit/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
15+
"test-mathex": "cross-env MOCHA_SUITE_NAME=\"MathEx Unit Tests\" c8 --report-dir='coverage/unit-mathex' mocha 'dist/test/unit/**/math_ex*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
16+
"test-e2e-all": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" c8 --report-dir='coverage/e2e-all' mocha 'dist/test/e2e/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-all.xml",
17+
"test-e2e-integration": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --report-dir='coverage/e2e-integration' mocha 'dist/test/e2e/integration/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
18+
"test-e2e-leases": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Lease Tests\" c8 --report-dir='coverage/e2e-leases' mocha 'dist/test/e2e/integration/core/lease*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
19+
"test-e2e-standard": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --report-dir='coverage/e2e-standard' mocha 'dist/test/e2e/**/*.js' --ignore 'test/unit/**/*.js' --ignore 'test/e2e/integration/**/*.js' --ignore 'test/e2e/commands/mirror_node*.js' --ignore 'test/e2e/commands/node*.js' --ignore 'test/e2e/commands/separate_node*.js' --ignore 'test/e2e/commands/relay*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-standard.xml --timeout 30000",
20+
"test-e2e-mirror-node": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" c8 --report-dir='coverage/e2e-mirror-node' mocha 'dist/test/e2e/commands/mirror_node.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-mirror-node.xml",
21+
"test-e2e-node-pem-stop": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" c8 --report-dir='coverage/e2e-node-pem-stop' mocha 'dist/test/e2e/commands/node_pem_stop.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-stop.xml",
22+
"test-e2e-node-pem-kill": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" c8 --report-dir='coverage/e2e-node-pem-kill' mocha 'dist/test/e2e/commands/node_pem_kill.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-kill.xml",
23+
"test-e2e-node-local-hedera": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local Hedera Tests\" c8 --report-dir='coverage/e2e-node-local-hedera' mocha 'dist/test/e2e/commands/node_local_hedera.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-hedera.xml",
24+
"test-e2e-node-local-ptt": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local PTT Tests\" c8 --report-dir='coverage/e2e-node-local-ptt' mocha 'dist/test/e2e/commands/node_local_ptt.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-ptt.xml",
25+
"test-e2e-node-add": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Tests\" c8 --report-dir='coverage/e2e-node-add' mocha 'dist/test/e2e/commands/node_add.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add.xml",
26+
"test-e2e-node-add-local": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Local Tests\" c8 --report-dir='coverage/e2e-node-add-local' mocha 'dist/test/e2e/commands/node_add_local.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-local.xml",
27+
"test-e2e-node-add-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-add-separate-commands' mocha 'dist/test/e2e/commands/separate_node_add*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-separate-commands.xml",
28+
"test-e2e-node-update": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update Tests\" c8 --report-dir='coverage/e2e-node-update' mocha 'dist/test/e2e/commands/node_update*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update.xml",
29+
"test-e2e-node-update-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-update-separate-commands' mocha 'dist/test/e2e/commands/separate_node_update.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update-separate-commands.xml",
30+
"test-e2e-node-delete": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete Tests\" c8 --report-dir='coverage/e2e-node-delete' mocha 'dist/test/e2e/commands/node_delete*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete.xml",
31+
"test-e2e-node-delete-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-delete-separate-commands' mocha 'dist/test/e2e/commands/separate_node_delete*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete-separate-commands.xml",
32+
"test-e2e-node-upgrade": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Upgrade Tests\" c8 --report-dir='coverage/e2e-node-upgrade' mocha 'dist/test/e2e/commands/node_upgrade*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-upgrade.xml",
33+
"test-e2e-relay": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Relay Tests\" c8 --report-dir='coverage/e2e-relay' mocha 'dist/test/e2e/commands/relay.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-relay.xml",
34+
"solo-test": "tsx --no-deprecation --no-warnings solo.js",
3535
"solo": "node --no-deprecation --no-warnings dist/solo.js",
3636
"check": "remark . --quiet --frail && eslint . && tsc && madge --circular src/* && cd docs; jsdoc -c jsdoc.conf.json",
3737
"format": "remark . --quiet --frail --output && eslint --fix . && tsc && madge --circular src/*",
@@ -71,6 +71,7 @@
7171
"stream-buffers": "^3.0.3",
7272
"tar": "^7.4.3",
7373
"tsx": "^4.19.2",
74+
"tsyringe-neo": "^5.1.0",
7475
"uuid": "^11.0.3",
7576
"validator": "^13.12.0",
7677
"winston": "^3.17.0",

src/commands/base.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export abstract class BaseCommand extends ShellRunner {
4848
protected readonly remoteConfigManager: RemoteConfigManager;
4949

5050
constructor(opts: Opts) {
51-
if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required');
51+
// if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required');
5252
if (!opts || !opts.helm) throw new Error('An instance of core/Helm is required');
5353
if (!opts || !opts.k8) throw new Error('An instance of core/K8 is required');
5454
if (!opts || !opts.chartManager) throw new Error('An instance of core/ChartManager is required');
@@ -57,8 +57,7 @@ export abstract class BaseCommand extends ShellRunner {
5757
if (!opts || !opts.localConfig) throw new Error('An instance of core/LocalConfig is required');
5858
if (!opts || !opts.remoteConfigManager)
5959
throw new Error('An instance of core/config/RemoteConfigManager is required');
60-
61-
super(opts.logger);
60+
super();
6261

6362
this.helm = opts.helm;
6463
this.k8 = opts.k8;

src/core/account_manager.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ import type {NetworkNodeServices} from './network_node_services.js';
4040
import {NetworkNodeServicesBuilder} from './network_node_services.js';
4141
import path from 'path';
4242

43-
import {type SoloLogger} from './logging.js';
44-
import {type K8} from './k8.js';
43+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
44+
import {SoloLogger} from './logging.js';
45+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
46+
import {K8} from './k8.js';
4547
import {type AccountIdWithKeyPairObject, type ExtendedNetServer} from '../types/index.js';
4648
import {type NodeAlias, type PodName, type SdkNetworkEndpoint} from '../types/aliases.js';
4749
import {IGNORED_NODE_ACCOUNT_ID} from './constants.js';
4850
import {sleep} from './helpers.js';
4951
import {Duration} from './time/duration.js';
52+
import {autoInjectable} from 'tsyringe-neo';
5053

5154
const REASON_FAILED_TO_GET_KEYS = 'failed to get keys for accountId';
5255
const REASON_SKIPPED = 'skipped since it does not have a genesis key';
@@ -55,17 +58,15 @@ const REASON_FAILED_TO_CREATE_K8S_S_KEY = 'failed to create k8s scrt key';
5558
const FULFILLED = 'fulfilled';
5659
const REJECTED = 'rejected';
5760

61+
@autoInjectable()
5862
export class AccountManager {
5963
private _portForwards: ExtendedNetServer[];
6064
public _nodeClient: Client | null;
6165

6266
constructor(
63-
private readonly logger: SoloLogger,
64-
private readonly k8: K8,
67+
private readonly logger?: SoloLogger,
68+
private readonly k8?: K8,
6569
) {
66-
if (!logger) throw new Error('An instance of core/SoloLogger is required');
67-
if (!k8) throw new Error('An instance of core/K8 is required');
68-
6970
this._portForwards = [];
7071
this._nodeClient = null;
7172
}

src/core/certificate_manager.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,26 @@ import fs from 'fs';
2020
import {Templates} from './templates.js';
2121
import {GrpcProxyTlsEnums} from './enumerations.js';
2222

23-
import type {ConfigManager} from './config_manager.js';
24-
import type {K8} from './k8.js';
25-
import type {SoloLogger} from './logging.js';
23+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
24+
import {ConfigManager} from './config_manager.js';
25+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
26+
import {K8} from './k8.js';
27+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
28+
import {SoloLogger} from './logging.js';
2629
import type {ListrTaskWrapper} from 'listr2';
2730
import type {NodeAlias} from '../types/aliases.js';
31+
import {autoInjectable} from 'tsyringe-neo';
2832

2933
/**
3034
* Used to handle interactions with certificates data and inject it into the K8s cluster secrets
3135
*/
36+
@autoInjectable()
3237
export class CertificateManager {
3338
constructor(
34-
private readonly k8: K8,
35-
private readonly logger: SoloLogger,
36-
private readonly configManager: ConfigManager,
37-
) {
38-
if (!k8) throw new MissingArgumentError('an instance of core/K8 is required');
39-
if (!logger) throw new MissingArgumentError('an instance of core/SoloLogger is required');
40-
if (!configManager) throw new MissingArgumentError('an instance of core/ConfigManager is required');
41-
}
39+
private readonly k8?: K8,
40+
private readonly logger?: SoloLogger,
41+
private readonly configManager?: ConfigManager,
42+
) {}
4243

4344
/**
4445
* Reads the certificate and key and build the secret with the appropriate structure

0 commit comments

Comments
 (0)