Merge pull request #21097 from overleaf/ls-scripts-to-esm-1

Migrate scripts folder to esm 1/x

GitOrigin-RevId: 4a4bc9a161f144fdb40ce3f2a0a9313b36c6df81
This commit is contained in:
Liangjun Song
2024-10-21 08:04:42 +00:00
committed by Copybot
parent 8bc374c916
commit 26f3f3e2e2
94 changed files with 916 additions and 847 deletions
@@ -0,0 +1,19 @@
import SAMLEmailBatchCheck from '../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck.js'
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
ensureRunningOnMongoSecondaryWithTimeout(300000)
const startInstitutionId = parseInt(process.argv[2])
const emitDetailedData = process.argv.includes('--detailed-data')
try {
const result = await SAMLEmailBatchCheck.promises.checkEmails(
startInstitutionId,
emitDetailedData
)
console.table(result)
process.exit()
} catch (error) {
console.error(error)
process.exit(1)
}