Initial commit from prod-batam

This commit is contained in:
mario
2025-05-27 10:51:12 +07:00
commit 025b96229b
3361 changed files with 304068 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import Listr from 'listr';
import chalk from 'chalk';
import removeExtension from './removeExtension.js';
export default async function removeExtensions(ohifExtensionsToRemove) {
// Auto generate Listr tasks...
const taskEntries = [];
ohifExtensionsToRemove.forEach(packageName => {
const title = `Removing ohif-extension ${packageName}`;
taskEntries.push({
title,
task: async () => await removeExtension(packageName),
});
});
const tasks = new Listr(taskEntries, {
exitOnError: true,
});
await tasks
.run()
.then(() => {
let extensonsString = '';
ohifExtensionsToRemove.forEach(packageName => {
extensonsString += ` ${packageName}`;
});
console.log(`${chalk.green.bold(`Extensions removed:${extensonsString}`)} `);
})
.catch(error => {
console.log(error.message);
});
}