@notifiles/sdk 1.1.3 → 1.1.5

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.3",
4
+ "version": "1.1.5",
5
5
  "description": "",
6
6
  "author": {
7
7
  "name": "adoucoure",
@@ -1,2 +1,6 @@
1
1
  export { default as isValid } from './isValid.js'
2
2
  export { default as upload } from './upload.js'
3
+ export { default as syncFolder } from './syncFolder.js'
4
+ export { default as remove } from './remove.js'
5
+ export { default as previewRemoteUrl } from './previewRemoteUrl.js'
6
+ // export { default as uploadFolder } from './uploadFolder.js'
@@ -0,0 +1,21 @@
1
+ export default async ({
2
+ filename,
3
+ auth,
4
+ // contentType = 'image/png'
5
+ }) => {
6
+
7
+ try {
8
+ const {
9
+ accessKey,
10
+ storageZoneName,
11
+ pullZone
12
+ } = auth
13
+
14
+ const url = `https://${pullZone}.b-cdn.net/${filename}`
15
+ return url
16
+
17
+ } catch (e) {
18
+ console.error(e)
19
+ }
20
+ return null
21
+ }
@@ -0,0 +1,14 @@
1
+
2
+ export default async ({
3
+
4
+ }) => {
5
+
6
+ try {
7
+ //#TODO
8
+ return { success: false }
9
+
10
+ } catch (e) {
11
+ console.error(e)
12
+ }
13
+ return null
14
+ }
@@ -0,0 +1,14 @@
1
+
2
+ export default async ({
3
+
4
+ }) => {
5
+
6
+ try {
7
+ //#TODO
8
+ return { success: false }
9
+
10
+ } catch (e) {
11
+ console.error(e)
12
+ }
13
+ return null
14
+ }
@@ -0,0 +1,14 @@
1
+
2
+ export default async ({
3
+
4
+ }) => {
5
+
6
+ try {
7
+ //#TODO
8
+ return { success: false }
9
+
10
+ } catch (e) {
11
+ console.error(e)
12
+ }
13
+ return null
14
+ }
@@ -11,7 +11,7 @@ export default async ({
11
11
  } = auth
12
12
 
13
13
  const url = `https://${endPoint}/${bucketName}/${filename}`
14
- return { url }
14
+ return url
15
15
 
16
16
  } catch (e) {
17
17
  console.error(e)
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
  import adaptSettings from '../../lib/adaptSettings.js'
4
4
 
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform/email.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
 
4
4
  export default async ({
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
  import adaptSettings from '../../lib/adaptSettings.js'
4
4
 
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
 
4
4
  export default async ({
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform/email.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
 
4
4
  export default async ({
@@ -1,8 +1,4 @@
1
-
2
1
  export * as build from './build/index.js'
3
- export * as cloudify from './cloudify/index.js'
4
- export * as consolidate from './consolidate/index.js'
5
- export * as contain from './consolidate/index.js'
6
2
  export * as sync from './sync/index.js'
7
3
  export * as update from './update/index.js'
8
4
  export { default as create } from './new/index.js'
@@ -20,7 +20,6 @@ export default async ({
20
20
  const defaultContent = await importJSONAsync('./defaultContent.json')
21
21
  let content = {
22
22
  ...defaultContent,
23
- createdAt: (new Date()),
24
23
  ...data,
25
24
  }
26
25
 
@@ -54,6 +54,7 @@ export default async ({
54
54
  const emailPath = fsPath.join(folderPath, "email.tsx")
55
55
  const email = (emailType === 'mastered') ? await emailTemplateMaster({}) : await emailTemplate({})
56
56
  await fs.promises.writeFile(emailPath, email, 'utf8')
57
+ await fs.promises.writeFile(fsPath.join(folderPath, "email.subject.txt"), "", 'utf8')
57
58
 
58
59
  const textMessagePath = fsPath.join(folderPath, "textMessage.txt")
59
60
  const textMessage = await textmessageTemplate({})
@@ -1,5 +1,5 @@
1
1
 
2
- test('creates a new post', async () => {
2
+ test('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
@@ -1,4 +1,4 @@
1
- import perform from './lib/perform.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
 
4
4
  export default async ({
@@ -1,4 +1,4 @@
1
- import perform from './lib/email.js'
1
+ import perform from './entry.js'
2
2
  import getEntries from '../../lib/entries/getAtPath.js'
3
3
 
4
4
  export default async ({
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- describe.skip('project', () => {
3
+ describe('project', () => {
4
4
  it('Updates and syncs to minio', async () => {
5
5
  const fsPath = (await import('path')).default
6
6
  let path = `${fsPath.resolve(process.env.TEST_MOCK_FOLDER)}`