This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stages = ['production', 'staging', 'development', 'test'] as const; | |
type Stage = typeof stages[number]; | |
function getStage(stages: Stage[]) { | |
if (!stages.length) return 'production'; | |
for (const stage of stages) { | |
// if any of the provided stages is production, assume we are in production | |
if (stage === 'production') { |