@budibase/worker 2.22.0 → 2.22.1
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": "2.22.
|
|
4
|
+
"version": "2.22.1",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"author": "Budibase",
|
|
38
38
|
"license": "GPL-3.0",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@budibase/backend-core": "2.22.
|
|
41
|
-
"@budibase/pro": "2.22.
|
|
42
|
-
"@budibase/string-templates": "2.22.
|
|
43
|
-
"@budibase/types": "2.22.
|
|
40
|
+
"@budibase/backend-core": "2.22.1",
|
|
41
|
+
"@budibase/pro": "2.22.1",
|
|
42
|
+
"@budibase/string-templates": "2.22.1",
|
|
43
|
+
"@budibase/types": "2.22.1",
|
|
44
44
|
"@koa/router": "8.0.8",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
46
46
|
"@types/global-agent": "2.1.1",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "b91392adfadf5e27c40a78102046cb3e51a7a792"
|
|
112
112
|
}
|
|
@@ -114,9 +114,16 @@ export const syncAppFavourites = async (processedAppIds: string[]) => {
|
|
|
114
114
|
if (processedAppIds.length === 0) {
|
|
115
115
|
return []
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
|
|
118
|
+
const tenantId = tenancy.getTenantId()
|
|
119
|
+
const appPrefix =
|
|
120
|
+
tenantId === tenancy.DEFAULT_TENANT_ID
|
|
121
|
+
? dbCore.APP_DEV_PREFIX
|
|
122
|
+
: `${dbCore.APP_DEV_PREFIX}${tenantId}_`
|
|
123
|
+
|
|
124
|
+
const apps = await fetchAppsByIds(processedAppIds, appPrefix)
|
|
118
125
|
return apps?.reduce((acc: string[], app) => {
|
|
119
|
-
const id = app.appId.replace(
|
|
126
|
+
const id = app.appId.replace(appPrefix, "")
|
|
120
127
|
if (processedAppIds.includes(id)) {
|
|
121
128
|
acc.push(id)
|
|
122
129
|
}
|
|
@@ -124,9 +131,14 @@ export const syncAppFavourites = async (processedAppIds: string[]) => {
|
|
|
124
131
|
}, [])
|
|
125
132
|
}
|
|
126
133
|
|
|
127
|
-
export const fetchAppsByIds = async (
|
|
134
|
+
export const fetchAppsByIds = async (
|
|
135
|
+
processedAppIds: string[],
|
|
136
|
+
appPrefix: string
|
|
137
|
+
) => {
|
|
128
138
|
return await dbCore.getAppsByIDs(
|
|
129
|
-
processedAppIds.map(appId =>
|
|
139
|
+
processedAppIds.map(appId => {
|
|
140
|
+
return `${appPrefix}${appId}`
|
|
141
|
+
})
|
|
130
142
|
)
|
|
131
143
|
}
|
|
132
144
|
|