init.ts 711 B

12345678910111213141516171819202122232425
  1. import { hireStorageWorkingGroupLead } from '../../services/runtime/hireLead'
  2. import ApiCommandBase from '../../command-base/ApiCommandBase'
  3. /**
  4. * CLI command:
  5. * Initialize development environment. Sets Alice as storage working group
  6. * leader.
  7. *
  8. * @remarks
  9. * Should be run only during the development.
  10. * Shell command: "dev:init"
  11. */
  12. export default class DevInit extends ApiCommandBase {
  13. static description = 'Initialize development environment. Sets Alice as storage working group leader.'
  14. static flags = {
  15. ...ApiCommandBase.flags,
  16. }
  17. async run(): Promise<void> {
  18. await this.ensureDevelopmentChain()
  19. const api = await this.getApi()
  20. await hireStorageWorkingGroupLead(api)
  21. }
  22. }