await generateOneFileUsingCurrentTimeToDeriveDayIndex()

in src/main.ts [62:77]


        await generateOneFileUsingCurrentTimeToDeriveDayIndex(
            zuoraBearerToken,
            salesforceSSMConfig,
            identityAPIBearerToken,
        );
    }
    console.log('main function has completed');
};

function getDayOffsetToGenerate(): number | null {
    // This function is not pure, its return value depends on the time of the day.
    // It returns ether a number or null.
    // null signifies that a file should not be generated at this time.
    // Otherwise the number id a day index of the file.

    const dayIndexesForHour:Record<number, number> = {