Skip to content

Commit

Permalink
Update compileProcessList.js
Browse files Browse the repository at this point in the history
  • Loading branch information
halfmanbear authored Aug 8, 2024
1 parent 7c56774 commit b060b79
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/pages/Generator/compileProcessList.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
export default function compileProcessList() {
const processes = import.meta.glob('../../profiles/processes/*.json');
return Promise.all(Object.keys(processes).map(async (key) => {
const profile = await processes[key]();
return {
"name": profile.name.replace("-OpenNept4une", ""),
"identifier": profile.name,
"profile": profile
}
}));
}
export default async function compileProcessList() {
try {
const processes = import.meta.glob('../../profiles/processes/*.json');
const processList = await Promise.all(Object.keys(processes).map(async (key) => {
const profile = await processes[key]();
return {
name: profile.name.replace("-OpenNept4une", ""),
identifier: profile.name,
profile: profile
};
}));
return processList;
} catch (error) {
console.error("Error compiling process list:", error);
throw error;
}
}

0 comments on commit b060b79

Please sign in to comment.