UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

129 lines 7.1 kB
// SPDX-License-Identifier: Apache-2.0 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; import { inject, injectable } from 'tsyringe-neo'; import { InjectTokens } from '../core/dependency-injection/inject-tokens.js'; import { patchInject } from '../core/dependency-injection/container-helper.js'; import { BlockCommandDefinition } from './command-definitions/block-command-definition.js'; import { ClusterReferenceCommandDefinition } from './command-definitions/cluster-reference-command-definition.js'; import { ConsensusCommandDefinition } from './command-definitions/consensus-command-definition.js'; import { MirrorCommandDefinition } from './command-definitions/mirror-command-definition.js'; import { OneShotCommandDefinition } from './command-definitions/one-shot-command-definition.js'; import { LedgerCommandDefinition } from './command-definitions/ledger-command-definition.js'; import { KeysCommandDefinition } from './command-definitions/keys-command-definition.js'; import { ExplorerCommandDefinition } from './command-definitions/explorer-command-definition.js'; import { DeploymentCommandDefinition } from './command-definitions/deployment-command-definition.js'; import { RelayCommandDefinition } from './command-definitions/relay-command-definition.js'; import { RapidFireCommandDefinition } from './command-definitions/rapid-fire-command-definition.js'; import { BackupRestoreCommandDefinition } from './command-definitions/backup-restore-command-definition.js'; import { CacheCommandDefinition } from './command-definitions/cache-command-definition.js'; /** * Return a list of Yargs command builder to be exposed through CLI * @returns an array of Yargs command builder */ let Commands = class Commands { init; backupRestore; block; cluster; consensus; deployment; explorer; keys; ledger; mirror; relay; oneShot; rapidFire; cache; constructor(init, backupRestore, block, cluster, consensus, deployment, explorer, keys, ledger, mirror, relay, oneShot, rapidFire, cache) { this.init = init; this.backupRestore = backupRestore; this.block = block; this.cluster = cluster; this.consensus = consensus; this.deployment = deployment; this.explorer = explorer; this.keys = keys; this.ledger = ledger; this.mirror = mirror; this.relay = relay; this.oneShot = oneShot; this.rapidFire = rapidFire; this.cache = cache; this.init = patchInject(init, InjectTokens.InitCommand, this.constructor.name); this.backupRestore = patchInject(backupRestore, InjectTokens.BackupRestoreCommandDefinition, this.constructor.name); this.block = patchInject(block, InjectTokens.BlockCommandDefinition, this.constructor.name); this.cluster = patchInject(cluster, InjectTokens.ClusterReferenceCommandDefinition, this.constructor.name); this.consensus = patchInject(consensus, InjectTokens.ConsensusCommandDefinition, this.constructor.name); this.deployment = patchInject(deployment, InjectTokens.DeploymentCommandDefinition, this.constructor.name); this.explorer = patchInject(explorer, InjectTokens.ExplorerCommandDefinition, this.constructor.name); this.keys = patchInject(keys, InjectTokens.KeysCommandDefinition, this.constructor.name); this.ledger = patchInject(ledger, InjectTokens.LedgerCommandDefinition, this.constructor.name); this.mirror = patchInject(mirror, InjectTokens.MirrorCommandDefinition, this.constructor.name); this.relay = patchInject(relay, InjectTokens.RelayCommandDefinition, this.constructor.name); this.oneShot = patchInject(oneShot, InjectTokens.OneShotCommandDefinition, this.constructor.name); this.rapidFire = patchInject(rapidFire, InjectTokens.RapidFireCommandDefinition, this.constructor.name); this.cache = patchInject(cache, InjectTokens.CacheCommandDefinition, this.constructor.name); } getCommandDefinitions() { return [ this.init.getCommandDefinition(), this.backupRestore.getCommandDefinition(), this.block.getCommandDefinition(), this.cluster.getCommandDefinition(), this.consensus.getCommandDefinition(), this.deployment.getCommandDefinition(), this.explorer.getCommandDefinition(), this.keys.getCommandDefinition(), this.ledger.getCommandDefinition(), this.mirror.getCommandDefinition(), this.relay.getCommandDefinition(), this.cache.getCommandDefinition(), this.oneShot.getCommandDefinition(), this.rapidFire.getCommandDefinition(), ]; } }; Commands = __decorate([ injectable(), __param(0, inject(InjectTokens.InitCommand)), __param(1, inject(InjectTokens.BackupRestoreCommandDefinition)), __param(2, inject(InjectTokens.BlockCommandDefinition)), __param(3, inject(InjectTokens.ClusterReferenceCommandDefinition)), __param(4, inject(InjectTokens.ConsensusCommandDefinition)), __param(5, inject(InjectTokens.DeploymentCommandDefinition)), __param(6, inject(InjectTokens.ExplorerCommandDefinition)), __param(7, inject(InjectTokens.KeysCommandDefinition)), __param(8, inject(InjectTokens.LedgerCommandDefinition)), __param(9, inject(InjectTokens.MirrorCommandDefinition)), __param(10, inject(InjectTokens.RelayCommandDefinition)), __param(11, inject(InjectTokens.OneShotCommandDefinition)), __param(12, inject(InjectTokens.RapidFireCommandDefinition)), __param(13, inject(InjectTokens.CacheCommandDefinition)), __metadata("design:paramtypes", [Function, BackupRestoreCommandDefinition, BlockCommandDefinition, ClusterReferenceCommandDefinition, ConsensusCommandDefinition, DeploymentCommandDefinition, ExplorerCommandDefinition, KeysCommandDefinition, LedgerCommandDefinition, MirrorCommandDefinition, RelayCommandDefinition, OneShotCommandDefinition, RapidFireCommandDefinition, CacheCommandDefinition]) ], Commands); export { Commands }; //# sourceMappingURL=commands.js.map