@notifiles/sdk 1.1.5 → 1.1.6

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@notifiles/sdk",
3
3
  "type": "module",
4
- "version": "1.1.5",
4
+ "version": "1.1.6",
5
5
  "description": "",
6
6
  "author": {
7
7
  "name": "adoucoure",
@@ -9,6 +9,7 @@ import emailTemplateMaster from './templates/email.mastered.js'
9
9
  import textmessageTemplate from './templates/textmessage.js'
10
10
  import pushnotificationTemplate from './templates/pushnotification.js'
11
11
  import _slug from 'slug'
12
+ import ensureDirectoryExists from '../../lib/fs/ensureDirectoryExists.js'
12
13
 
13
14
  export default async ({
14
15
  path,
@@ -29,6 +30,8 @@ export default async ({
29
30
  await fs.promises.rmdir(folderPath, { recursive: true })
30
31
  }
31
32
 
33
+ await ensureDirectoryExists(folderPath)
34
+
32
35
  await fs.promises.mkdir(folderPath)
33
36
  await fs.promises.mkdir(`${folderPath}/attachments`)
34
37
  await fs.promises.mkdir(`${folderPath}/.cache`)