2024-10-18 07:04:57 -04:00
|
|
|
import minimist from 'minimist'
|
|
|
|
import ProjectDeleter from '../app/src/Features/Project/ProjectDeleter.js'
|
2022-08-08 04:54:38 -04:00
|
|
|
|
|
|
|
async function main() {
|
|
|
|
const argv = minimist(process.argv.slice(2))
|
|
|
|
const projectId = argv['project-id']
|
|
|
|
|
|
|
|
if (!projectId) {
|
|
|
|
throw new Error('set --project-id')
|
|
|
|
}
|
|
|
|
console.log(`Soft deleting project ${projectId}`)
|
|
|
|
// soft delete, project will be permanently deleted after 90 days
|
|
|
|
await ProjectDeleter.promises.deleteProject(projectId)
|
|
|
|
}
|
|
|
|
|
2024-10-18 07:04:57 -04:00
|
|
|
try {
|
|
|
|
await main()
|
|
|
|
console.log('Done.')
|
|
|
|
process.exit(0)
|
|
|
|
} catch (error) {
|
|
|
|
console.error(error)
|
|
|
|
process.exit(1)
|
|
|
|
}
|