@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 +1 -1
- package/src/project/isProject/index.js +1 -1
- package/src/project/isProject/sync.js +1 -1
- package/src/template/build/lib/email/index.js +24 -6
- package/src/template/lib/manifest/defaultContent.json +1 -0
- package/src/template/new/index.js +0 -3
- package/src/template/new/index.test.js +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
15
|
-
const
|
|
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`,
|
|
@@ -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`)
|