@notifiles/sdk 1.1.6 → 1.1.8

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.6",
4
+ "version": "1.1.8",
5
5
  "description": "",
6
6
  "author": {
7
7
  "name": "adoucoure",
@@ -21,6 +21,6 @@ export default async (props) => {
21
21
  return false
22
22
  }
23
23
 
24
- const manifestPath = fsPath.join(path, 'manifest.yaml')
24
+ const manifestPath = fsPath.join(path, 'notifiles.config.js')
25
25
  return checkFileExists(manifestPath)
26
26
  }
@@ -9,7 +9,7 @@ export default ({ path }) => {
9
9
  return false
10
10
  }
11
11
 
12
- const targetPath = `${path}/manifest.yaml`
12
+ const targetPath = `${path}/notifiles.config.js`
13
13
  const exists = fs.existsSync(targetPath)
14
14
  return exists
15
15
  } catch (e) {
@@ -1,7 +1,7 @@
1
- import { execa } from 'execa'
2
- import fs from 'fs'
3
- import translate from './translate.js'
4
- import htmlToHast from '../../../../lib/remark/htmlToHast.js'
1
+ import { execa } from 'execa';
2
+ import fs from 'fs';
3
+ import translate from './translate.js';
4
+ import htmlToHast from '../../../../lib/remark/htmlToHast.js';
5
5
 
6
6
  export default async (props) => {
7
7
 
@@ -11,8 +11,26 @@ export default async (props) => {
11
11
  code,
12
12
  language } = entry
13
13
 
14
- const { stdout } = await execa`npx react-email@2.1.4 export --pretty --plainText --dir ${path} --outDir ${path}/.build/temp/email/${code}/text`;
15
- const { stdoutB } = await execa`npx react-email@2.1.4 export --pretty --dir ${path} --outDir ${path}/.build/temp/email/${code}/html`;
14
+
15
+ // const a = await fs.promises.readFile(`${path}/email.tsx`, 'utf8')
16
+ // // const a = (await import(`${path}/email.tsx`))
17
+ // const component = React.createElement()
18
+ // const html_ = await renderAsync(a, {
19
+ // pretty: true,
20
+ // })
21
+
22
+
23
+ const { stdout } = await execa`npx react-email@2.1.4 export
24
+ --pretty
25
+ --plainText
26
+ --dir ${path}
27
+ --outDir ${path}/.build/temp/email/${code}/text`
28
+
29
+ const { stdoutB } = await execa`npx react-email@2.1.4 export
30
+ --pretty
31
+ --dir ${path}
32
+ --outDir ${path}/.build/temp/email/${code}/html`
33
+
16
34
 
17
35
  await fs.promises.cp(
18
36
  `${path}/.build/temp/email/${code}/html/email.html`,
@@ -2,6 +2,7 @@
2
2
  "id": "codevalidation",
3
3
  "groupId": "",
4
4
  "dependsOnUser": true,
5
+ "status": "published",
5
6
  "agent": {
6
7
  "type": "manual",
7
8
  "params": {}
@@ -9,7 +9,6 @@ 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'
13
12
 
14
13
  export default async ({
15
14
  path,
@@ -30,8 +29,6 @@ export default async ({
30
29
  await fs.promises.rmdir(folderPath, { recursive: true })
31
30
  }
32
31
 
33
- await ensureDirectoryExists(folderPath)
34
-
35
32
  await fs.promises.mkdir(folderPath)
36
33
  await fs.promises.mkdir(`${folderPath}/attachments`)
37
34
  await fs.promises.mkdir(`${folderPath}/.cache`)
@@ -1,5 +1,5 @@
1
1
 
2
- test('creates a new template', async () => {
2
+ test.skip('creates a new template', async () => {
3
3
  const fsPath = (await import('path')).default
4
4
  let path = `${fsPath.resolve(process.env.TEST_MOCK_FOLDER)}`
5
5
  const operation = (await import('./index.js')).default