Merge branch 'develop' of github.com:Budibase/budibase into refactor/backend-core-import
This commit is contained in:
commit
4fd408defc
|
@ -60,8 +60,6 @@ spec:
|
|||
secretKeyRef:
|
||||
name: {{ template "budibase.fullname" . }}
|
||||
key: jwtSecret
|
||||
- name: LOG_LEVEL
|
||||
value: {{ .Values.services.apps.logLevel | default "info" | quote }}
|
||||
{{ if .Values.services.objectStore.region }}
|
||||
- name: AWS_REGION
|
||||
value: {{ .Values.services.objectStore.region }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase backend core libraries used in server and worker",
|
||||
"main": "dist/src/index.js",
|
||||
"types": "dist/src/index.d.ts",
|
||||
|
@ -20,7 +20,7 @@
|
|||
"test:watch": "jest --watchAll"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/types": "2.1.32-alpha.3",
|
||||
"@budibase/types": "2.1.32-alpha.5",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-sdk": "2.1030.0",
|
||||
|
|
|
@ -145,7 +145,9 @@ export const queryView = async <T>(
|
|||
return docs.length <= 1 ? (docs[0] as T) : (docs as T[])
|
||||
}
|
||||
} catch (err: any) {
|
||||
if (err != null && err.name === "not_found") {
|
||||
const pouchNotFound = err && err.name === "not_found"
|
||||
const couchNotFound = err && err.status === 404
|
||||
if (pouchNotFound || couchNotFound) {
|
||||
await removeDeprecated(db, viewName)
|
||||
await createFunc()
|
||||
return queryView(viewName, params, db, createFunc, opts)
|
||||
|
|
|
@ -89,6 +89,7 @@ export async function createASession(
|
|||
userId,
|
||||
}
|
||||
await client.store(key, session, EXPIRY_SECONDS)
|
||||
return session
|
||||
}
|
||||
|
||||
export async function updateSessionTTL(session: Session) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"module": "dist/bbui.es.js",
|
||||
|
@ -38,7 +38,7 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@spectrum-css/actionbutton": "^1.0.1",
|
||||
"@spectrum-css/actiongroup": "^1.0.1",
|
||||
"@spectrum-css/avatar": "^3.0.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -71,10 +71,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.1.32-alpha.3",
|
||||
"@budibase/client": "2.1.32-alpha.3",
|
||||
"@budibase/frontend-core": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/bbui": "2.1.32-alpha.5",
|
||||
"@budibase/client": "2.1.32-alpha.5",
|
||||
"@budibase/frontend-core": "2.1.32-alpha.5",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
@ -26,9 +26,9 @@
|
|||
"outputPath": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/types": "2.1.32-alpha.3",
|
||||
"@budibase/backend-core": "2.1.32-alpha.5",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@budibase/types": "2.1.32-alpha.5",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"license": "MPL-2.0",
|
||||
"module": "dist/budibase-client.js",
|
||||
"main": "dist/budibase-client.js",
|
||||
|
@ -19,9 +19,9 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.1.32-alpha.3",
|
||||
"@budibase/frontend-core": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/bbui": "2.1.32-alpha.5",
|
||||
"@budibase/frontend-core": "2.1.32-alpha.5",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.1.32-alpha.3",
|
||||
"@budibase/bbui": "2.1.32-alpha.5",
|
||||
"lodash": "^4.17.21",
|
||||
"svelte": "^3.46.2"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/sdk",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase Public API SDK",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase Web Server",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -43,11 +43,11 @@
|
|||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "10.0.3",
|
||||
"@budibase/backend-core": "2.1.32-alpha.3",
|
||||
"@budibase/client": "2.1.32-alpha.3",
|
||||
"@budibase/pro": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/types": "2.1.32-alpha.3",
|
||||
"@budibase/backend-core": "2.1.32-alpha.5",
|
||||
"@budibase/client": "2.1.32-alpha.5",
|
||||
"@budibase/pro": "2.1.32-alpha.5",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@budibase/types": "2.1.32-alpha.5",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
|
|
@ -1273,12 +1273,12 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d"
|
||||
integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w==
|
||||
"@budibase/backend-core@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25"
|
||||
integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw==
|
||||
dependencies:
|
||||
"@budibase/types" "2.1.32-alpha.3"
|
||||
"@budibase/types" "2.1.32-alpha.5"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -1361,13 +1361,13 @@
|
|||
svelte-flatpickr "^3.2.3"
|
||||
svelte-portal "^1.0.0"
|
||||
|
||||
"@budibase/pro@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5"
|
||||
integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ==
|
||||
"@budibase/pro@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d"
|
||||
integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.1.32-alpha.3"
|
||||
"@budibase/types" "2.1.32-alpha.3"
|
||||
"@budibase/backend-core" "2.1.32-alpha.5"
|
||||
"@budibase/types" "2.1.32-alpha.5"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
|
@ -1391,10 +1391,10 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
"@budibase/types@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51"
|
||||
integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg==
|
||||
"@budibase/types@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f"
|
||||
integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA==
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { BBContext } from "./koa"
|
||||
import { Hosting } from "./hosting"
|
||||
|
||||
export interface AuthToken {
|
||||
userId: string
|
||||
|
@ -10,6 +11,7 @@ export interface CreateSession {
|
|||
sessionId: string
|
||||
tenantId: string
|
||||
csrfToken?: string
|
||||
hosting?: Hosting
|
||||
}
|
||||
|
||||
export interface Session extends CreateSession {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
export enum FeatureFlag {
|
||||
LICENSING = "LICENSING",
|
||||
}
|
||||
|
||||
export interface TenantFeatureFlags {
|
||||
[key: string]: FeatureFlag[]
|
||||
}
|
|
@ -10,3 +10,4 @@ export * from "./auth"
|
|||
export * from "./locks"
|
||||
export * from "./db"
|
||||
export * from "./middleware"
|
||||
export * from "./featureFlag"
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
import { Context, Request } from "koa"
|
||||
import { User, Role, UserRoles } from "../documents"
|
||||
import { License } from "../sdk"
|
||||
import { User, Role, UserRoles, Account } from "../documents"
|
||||
import { FeatureFlag, License } from "../sdk"
|
||||
|
||||
export interface ContextUser extends Omit<User, "roles"> {
|
||||
globalId?: string
|
||||
license: License
|
||||
license?: License
|
||||
userId?: string
|
||||
roleId?: string | null
|
||||
role?: Role
|
||||
roles?: UserRoles
|
||||
csrfToken?: string
|
||||
featureFlags?: FeatureFlag[]
|
||||
accountPortalAccess?: boolean
|
||||
account?: Account
|
||||
}
|
||||
|
||||
export interface BBRequest extends Request {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.32-alpha.3",
|
||||
"version": "2.1.32-alpha.5",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -36,10 +36,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.1.32-alpha.3",
|
||||
"@budibase/pro": "2.1.32-alpha.3",
|
||||
"@budibase/string-templates": "2.1.32-alpha.3",
|
||||
"@budibase/types": "2.1.32-alpha.3",
|
||||
"@budibase/backend-core": "2.1.32-alpha.5",
|
||||
"@budibase/pro": "2.1.32-alpha.5",
|
||||
"@budibase/string-templates": "2.1.32-alpha.5",
|
||||
"@budibase/types": "2.1.32-alpha.5",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
|
|
@ -470,12 +470,12 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.3.tgz#d65f97f6c147e75aa83cfb4c22a5b3bd568bf62d"
|
||||
integrity sha512-CSRn29z64bLEW3GLo6cTwpGjvTgIsfDOBwAiStEOlezzMNlDslvcOBCW0pQUo/0rf5C4zsTy4U1oHDElz7JJ2w==
|
||||
"@budibase/backend-core@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.32-alpha.5.tgz#85d94d85f44c6e9220ce8ce6d7d3e62d15d6bc25"
|
||||
integrity sha512-UV7ng+o7bo+GHAocd3rn6okFsCjf5RfGNs+CRgyB7rW0DZYCTwn1jj71HGYO6eI0FWgkaFYEeiOaNz0BeCssnw==
|
||||
dependencies:
|
||||
"@budibase/types" "2.1.32-alpha.3"
|
||||
"@budibase/types" "2.1.32-alpha.5"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -508,22 +508,22 @@
|
|||
uuid "8.3.2"
|
||||
zlib "1.0.5"
|
||||
|
||||
"@budibase/pro@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.3.tgz#32d67f5fe3aa6a993022e685f55a298b4fc364b5"
|
||||
integrity sha512-FwaWZLI8NVSH3Y4RcSvD1ySJXa5yWFgfGha5Zz5rvy3Tw3oSr/AfH91VW4ZLyzpuBQrMJHxLtDmaz3Ywd/jSkQ==
|
||||
"@budibase/pro@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.32-alpha.5.tgz#ca75dcf90d275e1d78a9ab837a763b703963908d"
|
||||
integrity sha512-OwtCJugVYz+V2IaBLITCec6AtQr7HgABLw0dRrS481o/ibyJh+Syooafwx1ijrvfNl4i8YQVuJuzoPYsZHVwqw==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.1.32-alpha.3"
|
||||
"@budibase/types" "2.1.32-alpha.3"
|
||||
"@budibase/backend-core" "2.1.32-alpha.5"
|
||||
"@budibase/types" "2.1.32-alpha.5"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
node-fetch "^2.6.1"
|
||||
|
||||
"@budibase/types@2.1.32-alpha.3":
|
||||
version "2.1.32-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.3.tgz#87d53d7b5730f0067c1526a62f85afb13db82a51"
|
||||
integrity sha512-4MGPfe63IKJMSS+4HdznyjEnExKGk1rMa2sfVOvRAZWzdVhgo5m0UarwoKf49lDF3NPiqTLdXQnB4p7AmwQbbg==
|
||||
"@budibase/types@2.1.32-alpha.5":
|
||||
version "2.1.32-alpha.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.32-alpha.5.tgz#08389b921673c0e4cbbbaba41ba92356c186dd0f"
|
||||
integrity sha512-/vbEClKbiNdhDuDjYt5DF2e82u6kFe79BETU8ssaJ4lfI6y2YxMnrLSKB38QfCG/XjijAPMO0THTFoSVgqTQCA==
|
||||
|
||||
"@cspotcode/source-map-support@^0.8.0":
|
||||
version "0.8.1"
|
||||
|
|
Loading…
Reference in New Issue