Call graphs (Sequence diagrams) - AutolabJS/autolabcli GitHub Wiki

NOTE: These diagrams have been created by Vaibhav Garg

Initialization

Used for initializing the autolabcli application.

PlantUML code for initialization
@startuml
Actor user
== Init ==
autonumber
user -> index : autolab init
index -> init : init()
init -> console : log()
init -> chalk : yellow()
init -> figlet : textSync()
init -> console : log()
init -> Date : now()
init -> Math: floor()
init -> Date : now()
init -> Math: floor()
init -> Date : now()
init -> Math: floor()
init -> Math: floor()
init -> chalk : blue()
init -> console : log()
init -> inquirer : prompt(questions)
init -> "status:Spinner" : setSpinnerString()
init -> "status:Spinner" : start()
init -> chalk : red()
init -> console : log()
init -> process : exit()
init -> Date : now()
init -> Math: floor()
init -> chalk : green()
init -> console : log()
init-> fs : readdirSync()
init -> _ : without()
init -> git : init()
init -> chalk : blue()
init -> console : log()
init -> chalk : blue()
init -> console : log()
init -> request : post()
@enduml

Create Repository

Used for creating a repository on gitlab and creating a local git directory for the lab.

PlantUML code for Creating a repository
@startuml
Actor user
== Create Repository ==
autonumber
user -> index : autolab git create
index -> git : createRepo()
git -> inquirer : prompt(question)
git -> console : log()
git -> chalk : green()
git -> console : log()
git -> fs : writeFile()
git -> console : log()
git -> chalk : red()
git -> console : log()
git -> chalk : yellow()
git -> console : log()
git -> console : log()
git -> request : post()
@enduml

Delete Repository

Used for deleting an repository on gitlab and deleting the local git directory for the lab.

PlantUML code for Deleting a repository
@startuml
Actor user
== Delete Repository ==
autonumber
user -> index : autolab git delete
index -> git : deleteRepo()
git -> inquirer : prompt(question)
git -> chalk : green()
git -> console : log()
git -> chalk : red()
git -> console : log()
git -> chalk : yellow()
git -> console : log()
git -> request : delete()@enduml

Change Host

Used for changing the address of the AutolabJS host name.

PlantUML code for Changing AutolabJS Server Address
@startuml
Actor user
== Change Host ==
autonumber
user -> index : autolab git changeserver
index -> git : changeHost()
git -> inquirer : prompt(question)
git -> console : log()

Change Language

Used for changing the programming language for a lab.

PlantUML code for Changing the programming language of a lab
@startuml
Actor user
== Change Language ==
autonumber
user -> index : autolab git changelang
index -> git : changeLang()
git -> inquirer : prompt(question)
git -> console : log()

Push Commits

Used for commiting a lab to local git repo and pushing the changes to remote gitlab repository.

PlantUML code for push commits
@startuml
Actor user
== Push Commits ==
autonumber
user -> index : autolab git push
index -> git : push()
git -> inquirer : prompt(question)
git -> "status:Spinner" : setSpinnerString()
git -> "status:Spinner" : start()
git -> "git:simple-git" : add()
git -> "git:simple-git" : commit()
git-> fs : readFileSync()
git -> "git:simple-git" : addRemote()
git -> "git:simple-git" : push()
git -> "status:Spinner" : stop()

Submit Solution

Used for submitting a lab for evaluation to AutolabJS.

PlantUML code for submitting a lab solution to AutolabJS
@startuml
Actor user
== Submit Solution ==
autonumber
user -> index : autolab submit
index -> submit : submit()
submit -> "spinner:Spinner" : setSpinnerString()
submit -> "spinner:Spinner" : setSpinnerString()
submit -> "spinner:Spinner" : start()
submit -> "socket:require" : emit()
submit -> "socket:require" : on()
submit -> chalk : red()
submit -> console : log()
submit -> process : exit()
submit -> "socket:require" : on()
submit -> chalk : yellow()
submit -> console : log()
submit -> process : exit()
submit -> "socket:require" : on()
submit -> chalk : green()
submit -> console : log()
submit -> "table:Table" : toString()
submit -> console : log()
submit -> chalk : red()
submit -> console : log()
submit -> chalk : blue()
submit -> console : log()
submit -> chalk : yellow()
submit -> console : log()
submit -> console : log()
submit -> "spinner:Spinner" : stop()
submit -> process : exit()

Display Commands

Used for displaying the list of commands.

PlantUML code for displaying the list of commands
@startuml
Actor user
== Display list of autolab commands==
autonumber
user -> index : autolab help
index -> help : help()
help -> chalk : blue()
help -> console : log()
help -> "table:Table" : toString()
help -> console : log()

Exit

Used for cleaning up the local configuration and exiting.

PlantUML code for Exit
@startuml
Actor user
== Exit ==
autonumber
user -> index : autolab exit
index -> rev : exit()

References

  1. PlantUML documentation
  2. PlantUML online service
⚠️ **GitHub.com Fallback** ⚠️