@budibase/worker 3.23.16 → 3.23.17

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": "3.23.16",
4
+ "version": "3.23.17",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -109,5 +109,5 @@
109
109
  }
110
110
  }
111
111
  },
112
- "gitHead": "d8e44ca380ec66c232edf988eeb0c8a451afc983"
112
+ "gitHead": "dc0b829769782be5be7fb538483b0facd0392f12"
113
113
  }
@@ -16,7 +16,6 @@ import {
16
16
  ConfigChecklistResponse,
17
17
  ConfigType,
18
18
  Ctx,
19
- IMAPInnerConfig,
20
19
  DeleteConfigResponse,
21
20
  FindConfigResponse,
22
21
  GetPublicOIDCConfigResponse,
@@ -24,7 +23,6 @@ import {
24
23
  GoogleInnerConfig,
25
24
  isAIConfig,
26
25
  isGoogleConfig,
27
- isIMAPConfig,
28
26
  isOIDCConfig,
29
27
  isRecaptchaConfig,
30
28
  isSettingsConfig,
@@ -179,19 +177,6 @@ async function processSMTPConfig(
179
177
  }
180
178
  }
181
179
 
182
- async function processIMAPConfig(
183
- config: IMAPInnerConfig,
184
- existingConfig?: IMAPInnerConfig
185
- ) {
186
- if (config.auth?.pass === PASSWORD_REPLACEMENT) {
187
- if (existingConfig && existingConfig.auth?.pass) {
188
- config.auth.pass = existingConfig.auth.pass
189
- } else {
190
- throw new BadRequestError("IMAP password is required")
191
- }
192
- }
193
- }
194
-
195
180
  async function processSettingsConfig(
196
181
  config: SettingsInnerConfig & SettingsBrandingConfig,
197
182
  existingConfig?: SettingsInnerConfig & SettingsBrandingConfig
@@ -332,9 +317,6 @@ export async function save(
332
317
  case ConfigType.SMTP:
333
318
  await processSMTPConfig(config, existingConfig?.config)
334
319
  break
335
- case ConfigType.IMAP:
336
- await processIMAPConfig(config, existingConfig?.config)
337
- break
338
320
  case ConfigType.SETTINGS:
339
321
  await processSettingsConfig(config, existingConfig?.config)
340
322
  break
@@ -468,10 +450,6 @@ function stripSecrets(config: Config) {
468
450
  if (config.config.auth?.pass) {
469
451
  config.config.auth.pass = PASSWORD_REPLACEMENT
470
452
  }
471
- } else if (isIMAPConfig(config)) {
472
- if (config.config.auth?.pass) {
473
- config.config.auth.pass = PASSWORD_REPLACEMENT
474
- }
475
453
  } else if (isGoogleConfig(config)) {
476
454
  config.config.clientSecret = PASSWORD_REPLACEMENT
477
455
  } else if (isOIDCConfig(config)) {
@@ -19,21 +19,6 @@ function smtpValidation() {
19
19
  }).unknown(true)
20
20
  }
21
21
 
22
- function imapValidation() {
23
- // prettier-ignore
24
- return Joi.object({
25
- port: Joi.number().required(),
26
- host: Joi.string().required(),
27
- secure: Joi.boolean().optional(),
28
- mailbox: Joi.string().optional(),
29
- auth: Joi.object({
30
- type: Joi.string().valid("login", null),
31
- user: Joi.string().required(),
32
- pass: Joi.string().allow("", null),
33
- }).optional(),
34
- }).unknown(true)
35
- }
36
-
37
22
  function settingValidation() {
38
23
  // prettier-ignore
39
24
  return Joi.object({
@@ -115,7 +100,6 @@ function buildConfigSaveValidation() {
115
100
  .conditional("type", {
116
101
  switch: [
117
102
  { is: ConfigType.SMTP, then: smtpValidation() },
118
- { is: ConfigType.IMAP, then: imapValidation() },
119
103
  { is: ConfigType.SETTINGS, then: settingValidation() },
120
104
  { is: ConfigType.ACCOUNT, then: Joi.object().unknown(true) },
121
105
  { is: ConfigType.GOOGLE, then: googleValidation() },