@budibase/worker 3.2.35 → 3.2.37
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.2.
|
|
4
|
+
"version": "3.2.37",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "39f78eda743e69d71d9a247f6dd63a44856b3c72"
|
|
118
118
|
}
|
|
@@ -322,27 +322,27 @@ export async function save(
|
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
function enrichOIDCLogos(oidcLogos: OIDCLogosConfig) {
|
|
326
326
|
if (!oidcLogos) {
|
|
327
327
|
return
|
|
328
328
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
329
|
+
oidcLogos.config = Object.keys(oidcLogos.config || {}).reduce(
|
|
330
|
+
(acc: any, key: string) => {
|
|
331
|
+
if (!key.endsWith("Etag")) {
|
|
332
|
+
const etag = oidcLogos.config[`${key}Etag`]
|
|
333
|
+
const objectStoreUrl = objectStore.getGlobalFileUrl(
|
|
334
|
+
oidcLogos.type,
|
|
335
|
+
key,
|
|
336
|
+
etag
|
|
337
|
+
)
|
|
338
|
+
acc[key] = objectStoreUrl
|
|
339
|
+
} else {
|
|
340
|
+
acc[key] = oidcLogos.config[key]
|
|
341
|
+
}
|
|
342
|
+
return acc
|
|
343
|
+
},
|
|
344
|
+
{}
|
|
345
|
+
)
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
export async function find(ctx: UserCtx<void, FindConfigResponse>) {
|
|
@@ -370,7 +370,7 @@ export async function find(ctx: UserCtx<void, FindConfigResponse>) {
|
|
|
370
370
|
|
|
371
371
|
async function handleConfigType(type: ConfigType, config: Config) {
|
|
372
372
|
if (type === ConfigType.OIDC_LOGOS) {
|
|
373
|
-
|
|
373
|
+
enrichOIDCLogos(config)
|
|
374
374
|
} else if (type === ConfigType.AI) {
|
|
375
375
|
await handleAIConfig(config)
|
|
376
376
|
}
|
|
@@ -396,7 +396,7 @@ export async function publicOidc(ctx: Ctx<void, GetPublicOIDCConfigResponse>) {
|
|
|
396
396
|
const oidcCustomLogos = await configs.getOIDCLogosDoc()
|
|
397
397
|
|
|
398
398
|
if (oidcCustomLogos) {
|
|
399
|
-
|
|
399
|
+
enrichOIDCLogos(oidcCustomLogos)
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
if (!oidcConfig) {
|
|
@@ -427,7 +427,7 @@ export async function publicSettings(
|
|
|
427
427
|
|
|
428
428
|
// enrich the logo url - empty url means deleted
|
|
429
429
|
if (config.logoUrl && config.logoUrl !== "") {
|
|
430
|
-
config.logoUrl =
|
|
430
|
+
config.logoUrl = objectStore.getGlobalFileUrl(
|
|
431
431
|
"settings",
|
|
432
432
|
"logoUrl",
|
|
433
433
|
config.logoUrlEtag
|
|
@@ -437,7 +437,7 @@ export async function publicSettings(
|
|
|
437
437
|
// enrich the favicon url - empty url means deleted
|
|
438
438
|
const faviconUrl =
|
|
439
439
|
branding.faviconUrl && branding.faviconUrl !== ""
|
|
440
|
-
?
|
|
440
|
+
? objectStore.getGlobalFileUrl(
|
|
441
441
|
"settings",
|
|
442
442
|
"faviconUrl",
|
|
443
443
|
branding.faviconUrlEtag
|
|
@@ -522,7 +522,7 @@ export async function upload(ctx: UserCtx<void, UploadConfigFileResponse>) {
|
|
|
522
522
|
|
|
523
523
|
ctx.body = {
|
|
524
524
|
message: "File has been uploaded and url stored to config.",
|
|
525
|
-
url:
|
|
525
|
+
url: objectStore.getGlobalFileUrl(type, name, etag),
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|