Merge pull request #21284 from overleaf/ls-scripts-to-esm-6

Migrate scripts/ukamf to esm

GitOrigin-RevId: e7318d9fb112304153912303649fc597ef7a19db
This commit is contained in:
Liangjun Song
2024-10-25 08:05:37 +00:00
committed by Copybot
parent 30eb5416f3
commit e3b93f0a22
6 changed files with 36 additions and 40 deletions
@@ -1,5 +1,3 @@
'use strict'
/**
* Run with: node metadata-processor /path/ukamf.xml http://idp/entity/id
*
@@ -11,14 +9,9 @@
* The entity id should be provided by the university.
*/
const { Certificate } = require('@fidm/x509')
const moment = require('moment')
const UKAMFDB = require('./ukamf-db')
main().catch(err => {
console.error(err.stack)
})
import { Certificate } from '@fidm/x509'
import moment from 'moment'
import UKAMFDB from './ukamf-db.js'
async function main() {
const [, , file, entityId] = process.argv
@@ -71,3 +64,9 @@ async function main() {
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
}
}
try {
await main()
} catch (error) {
console.error(error)
}