LayerServer: improve script, add unique and valid id check to layers

This commit is contained in:
Pieter Vander Vennet 2024-01-23 22:03:22 +01:00
parent 1d6c9ec1ef
commit ee38cdb9d7
5 changed files with 313 additions and 199 deletions

View file

@ -13,8 +13,15 @@ export default abstract class Script {
ScriptUtils.fixUtils()
const args = [...process.argv]
args.splice(0, 2)
const start = new Date()
this.main(args)
.then((_) => console.log("All done"))
.then((_) =>{
const end = new Date()
const millisNeeded = end.getTime() - start.getTime()
const green = (s) => "\x1b[92m" + s + "\x1b[0m"
console.log(green("All done! (" + millisNeeded + " ms)"))
})
.catch((e) => console.log("ERROR:", e))
}