Took a look in the code:
local scale_degrees = {2,1,2,2,2,1,2}
So this means they are the modal scales and the array is shifted around with an extra counter…
So they should be
1 Dorian,
2 Phrygian,
3 Lydian,
4 Mixolydian,
5 Aeolian,
6 Locrian,
7 Ionian