@budibase/worker 1.4.8-alpha.8 → 1.4.8-alpha.9

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": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "1.4.8-alpha.8",
4
+ "version": "1.4.8-alpha.9",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "author": "Budibase",
37
37
  "license": "GPL-3.0",
38
38
  "dependencies": {
39
- "@budibase/backend-core": "1.4.8-alpha.8",
40
- "@budibase/pro": "1.4.8-alpha.7",
41
- "@budibase/string-templates": "1.4.8-alpha.8",
42
- "@budibase/types": "1.4.8-alpha.8",
39
+ "@budibase/backend-core": "1.4.8-alpha.9",
40
+ "@budibase/pro": "1.4.8-alpha.8",
41
+ "@budibase/string-templates": "1.4.8-alpha.9",
42
+ "@budibase/types": "1.4.8-alpha.9",
43
43
  "@koa/router": "8.0.8",
44
44
  "@sentry/node": "6.17.7",
45
45
  "@techpass/passport-openidconnect": "0.3.2",
@@ -104,5 +104,5 @@
104
104
  "./scripts/jestSetup.js"
105
105
  ]
106
106
  },
107
- "gitHead": "e4a7cf7d33c1c16e6854583b4df2a863cd17b73e"
107
+ "gitHead": "cef27c68ef3d7606b266629904a1a1b4bf877246"
108
108
  }
@@ -10,6 +10,8 @@ exports.sendEmail = async ctx => {
10
10
  contents,
11
11
  from,
12
12
  subject,
13
+ cc,
14
+ bcc,
13
15
  automation,
14
16
  } = ctx.request.body
15
17
  let user
@@ -23,6 +25,8 @@ exports.sendEmail = async ctx => {
23
25
  contents,
24
26
  from,
25
27
  subject,
28
+ cc,
29
+ bcc,
26
30
  automation,
27
31
  })
28
32
  ctx.body = {
@@ -12,7 +12,13 @@ function buildEmailSendValidation() {
12
12
  return joiValidator.body(Joi.object({
13
13
  email: Joi.string().email({
14
14
  multiple: true,
15
- }),
15
+ }),
16
+ cc: Joi.string().email({
17
+ multiple: true,
18
+ }).allow("", null),
19
+ bcc: Joi.string().email({
20
+ multiple: true,
21
+ }).allow("", null),
16
22
  purpose: Joi.string().valid(...Object.values(EmailTemplatePurpose)),
17
23
  workspaceId: Joi.string().allow("", null),
18
24
  from: Joi.string().allow("", null),
@@ -174,7 +174,7 @@ exports.isEmailConfigured = async (workspaceId = null) => {
174
174
  exports.sendEmail = async (
175
175
  email,
176
176
  purpose,
177
- { workspaceId, user, from, contents, subject, info, automation } = {}
177
+ { workspaceId, user, from, contents, subject, info, cc, bcc, automation } = {}
178
178
  ) => {
179
179
  const db = getGlobalDB()
180
180
  let config = (await getSmtpConfiguration(db, workspaceId, automation)) || {}
@@ -197,6 +197,8 @@ exports.sendEmail = async (
197
197
  message = {
198
198
  ...message,
199
199
  to: email,
200
+ cc: cc,
201
+ bcc: bcc,
200
202
  }
201
203
 
202
204
  if (subject || config.subject) {