@directivegames/genesys.sdk 3.3.12 → 3.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,10 @@ export const handlers = {
116
116
  return res;
117
117
  },
118
118
  deleteProject: async (projectPath) => {
119
- if (!fs.existsSync(projectPath)) {
119
+ try {
120
+ await fs.promises.access(projectPath);
121
+ }
122
+ catch {
120
123
  return {
121
124
  success: false,
122
125
  message: 'Project not found',
@@ -126,11 +129,7 @@ export const handlers = {
126
129
  handlers.ui.showLoadingOverlay('Deleting Project...');
127
130
  try {
128
131
  const { folder: projectFolder } = getProjectFolderAndFile(projectPath, logger);
129
- const entries = fs.readdirSync(projectFolder, { withFileTypes: true });
130
- for (const entry of entries) {
131
- const fullPath = pathlib.join(projectFolder, entry.name);
132
- fs.rmSync(fullPath, { recursive: true, force: true });
133
- }
132
+ await fs.promises.rm(projectFolder, { recursive: true, force: true });
134
133
  // Remove the project from the projects list
135
134
  appState.removeProject(projectPath);
136
135
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directivegames/genesys.sdk",
3
- "version": "3.3.12",
3
+ "version": "3.3.13",
4
4
  "description": "Genesys SDK - A development toolkit for game development",
5
5
  "author": "Directive Games",
6
6
  "main": "index.js",