Merge branch 'develop' of github.com:Budibase/budibase into fix/api-key-error
This commit is contained in:
commit
c106c3291a
32 changed files with 192 additions and 2573 deletions
|
@ -232,6 +232,9 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Values.imagePullSecrets }}
|
{{ if .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
||||||
|
|
|
@ -50,5 +50,8 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
status: {}
|
status: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -72,6 +72,9 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Values.imagePullSecrets }}
|
{{ if .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
||||||
|
|
|
@ -78,6 +78,9 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Values.imagePullSecrets }}
|
{{ if .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
||||||
|
|
|
@ -50,6 +50,9 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Values.imagePullSecrets }}
|
{{ if .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
||||||
|
|
|
@ -222,6 +222,9 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ if .Values.schedulerName }}
|
||||||
|
schedulerName: {{ .Values.schedulerName | quote }}
|
||||||
|
{{ end }}
|
||||||
{{ if .Values.imagePullSecrets }}
|
{{ if .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/nano": "10.1.2",
|
"@budibase/nano": "10.1.2",
|
||||||
"@budibase/pouchdb-replication-stream": "1.2.10",
|
"@budibase/pouchdb-replication-stream": "1.2.10",
|
||||||
"@budibase/types": "2.4.27-alpha.0",
|
"@budibase/types": "2.4.27-alpha.3",
|
||||||
"@shopify/jest-koa-mocks": "5.0.1",
|
"@shopify/jest-koa-mocks": "5.0.1",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-cloudfront-sign": "2.2.0",
|
"aws-cloudfront-sign": "2.2.0",
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
export class BudibaseError extends Error {
|
|
||||||
code: string
|
|
||||||
type: string
|
|
||||||
|
|
||||||
constructor(message: string, code: string, type: string) {
|
|
||||||
super(message)
|
|
||||||
this.code = code
|
|
||||||
this.type = type
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +1,87 @@
|
||||||
import * as licensing from "./licensing"
|
// BASE
|
||||||
|
|
||||||
// combine all error codes into single object
|
export abstract class BudibaseError extends Error {
|
||||||
|
code: string
|
||||||
|
|
||||||
export const codes = {
|
constructor(message: string, code: ErrorCode) {
|
||||||
...licensing.codes,
|
super(message)
|
||||||
|
this.code = code
|
||||||
|
}
|
||||||
|
|
||||||
|
protected getPublicError?(): any
|
||||||
}
|
}
|
||||||
|
|
||||||
// combine all error types
|
// ERROR HANDLING
|
||||||
export const types = [licensing.type]
|
|
||||||
|
|
||||||
// combine all error contexts
|
export enum ErrorCode {
|
||||||
const context = {
|
USAGE_LIMIT_EXCEEDED = "usage_limit_exceeded",
|
||||||
...licensing.context,
|
FEATURE_DISABLED = "feature_disabled",
|
||||||
|
HTTP = "http",
|
||||||
}
|
}
|
||||||
|
|
||||||
// derive a public error message using codes, types and any custom contexts
|
/**
|
||||||
|
* For the given error, build the public representation that is safe
|
||||||
|
* to be exposed over an api.
|
||||||
|
*/
|
||||||
export const getPublicError = (err: any) => {
|
export const getPublicError = (err: any) => {
|
||||||
let error
|
let error
|
||||||
if (err.code || err.type) {
|
if (err.code) {
|
||||||
// add generic error information
|
// add generic error information
|
||||||
error = {
|
error = {
|
||||||
code: err.code,
|
code: err.code,
|
||||||
type: err.type,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err.code && context[err.code]) {
|
if (err.getPublicError) {
|
||||||
error = {
|
error = {
|
||||||
...error,
|
...error,
|
||||||
// get any additional context from this error
|
// get any additional context from this error
|
||||||
...context[err.code](err),
|
...err.getPublicError(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return error
|
return error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTTP
|
||||||
|
|
||||||
|
export class HTTPError extends BudibaseError {
|
||||||
|
status: number
|
||||||
|
|
||||||
|
constructor(message: string, httpStatus: number, code = ErrorCode.HTTP) {
|
||||||
|
super(message, code)
|
||||||
|
this.status = httpStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LICENSING
|
||||||
|
|
||||||
|
export class UsageLimitError extends HTTPError {
|
||||||
|
limitName: string
|
||||||
|
|
||||||
|
constructor(message: string, limitName: string) {
|
||||||
|
super(message, 400, ErrorCode.USAGE_LIMIT_EXCEEDED)
|
||||||
|
this.limitName = limitName
|
||||||
|
}
|
||||||
|
|
||||||
|
getPublicError() {
|
||||||
|
return {
|
||||||
|
limitName: this.limitName,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FeatureDisabledError extends HTTPError {
|
||||||
|
featureName: string
|
||||||
|
|
||||||
|
constructor(message: string, featureName: string) {
|
||||||
|
super(message, 400, ErrorCode.FEATURE_DISABLED)
|
||||||
|
this.featureName = featureName
|
||||||
|
}
|
||||||
|
|
||||||
|
getPublicError() {
|
||||||
|
return {
|
||||||
|
featureName: this.featureName,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { BudibaseError } from "./base"
|
|
||||||
|
|
||||||
export class GenericError extends BudibaseError {
|
|
||||||
constructor(message: string, code: string, type: string) {
|
|
||||||
super(message, code, type ? type : "generic")
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { GenericError } from "./generic"
|
|
||||||
|
|
||||||
export class HTTPError extends GenericError {
|
|
||||||
status: number
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
message: string,
|
|
||||||
httpStatus: number,
|
|
||||||
code = "http",
|
|
||||||
type = "generic"
|
|
||||||
) {
|
|
||||||
super(message, code, type)
|
|
||||||
this.status = httpStatus
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +1 @@
|
||||||
export * from "./errors"
|
export * from "./errors"
|
||||||
export { UsageLimitError, FeatureDisabledError } from "./licensing"
|
|
||||||
export { HTTPError } from "./http"
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
import { HTTPError } from "./http"
|
|
||||||
|
|
||||||
export const type = "license_error"
|
|
||||||
|
|
||||||
export const codes = {
|
|
||||||
USAGE_LIMIT_EXCEEDED: "usage_limit_exceeded",
|
|
||||||
FEATURE_DISABLED: "feature_disabled",
|
|
||||||
}
|
|
||||||
|
|
||||||
export const context = {
|
|
||||||
[codes.USAGE_LIMIT_EXCEEDED]: (err: any) => {
|
|
||||||
return {
|
|
||||||
limitName: err.limitName,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[codes.FEATURE_DISABLED]: (err: any) => {
|
|
||||||
return {
|
|
||||||
featureName: err.featureName,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export class UsageLimitError extends HTTPError {
|
|
||||||
limitName: string
|
|
||||||
|
|
||||||
constructor(message: string, limitName: string) {
|
|
||||||
super(message, 400, codes.USAGE_LIMIT_EXCEEDED, type)
|
|
||||||
this.limitName = limitName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class FeatureDisabledError extends HTTPError {
|
|
||||||
featureName: string
|
|
||||||
|
|
||||||
constructor(message: string, featureName: string) {
|
|
||||||
super(message, 400, codes.FEATURE_DISABLED, type)
|
|
||||||
this.featureName = featureName
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
||||||
"@budibase/shared-core": "2.4.27-alpha.0",
|
"@budibase/shared-core": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@spectrum-css/accordion": "3.0.24",
|
"@spectrum-css/accordion": "3.0.24",
|
||||||
"@spectrum-css/actionbutton": "1.0.1",
|
"@spectrum-css/actionbutton": "1.0.1",
|
||||||
"@spectrum-css/actiongroup": "1.0.1",
|
"@spectrum-css/actiongroup": "1.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -58,11 +58,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.4.27-alpha.0",
|
"@budibase/bbui": "2.4.27-alpha.3",
|
||||||
"@budibase/client": "2.4.27-alpha.0",
|
"@budibase/client": "2.4.27-alpha.3",
|
||||||
"@budibase/frontend-core": "2.4.27-alpha.0",
|
"@budibase/frontend-core": "2.4.27-alpha.3",
|
||||||
"@budibase/shared-core": "2.4.27-alpha.0",
|
"@budibase/shared-core": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -29,9 +29,9 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.4.27-alpha.0",
|
"@budibase/backend-core": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@budibase/types": "2.4.27-alpha.0",
|
"@budibase/types": "2.4.27-alpha.3",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,11 +19,11 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.4.27-alpha.0",
|
"@budibase/bbui": "2.4.27-alpha.3",
|
||||||
"@budibase/frontend-core": "2.4.27-alpha.0",
|
"@budibase/frontend-core": "2.4.27-alpha.3",
|
||||||
"@budibase/shared-core": "2.4.27-alpha.0",
|
"@budibase/shared-core": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@budibase/types": "2.4.27-alpha.0",
|
"@budibase/types": "2.4.27-alpha.3",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.4.27-alpha.0",
|
"@budibase/bbui": "2.4.27-alpha.3",
|
||||||
"@budibase/shared-core": "2.4.27-alpha.0",
|
"@budibase/shared-core": "2.4.27-alpha.3",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/sdk",
|
"name": "@budibase/sdk",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase Public API SDK",
|
"description": "Budibase Public API SDK",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -43,12 +43,12 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "10.0.3",
|
"@apidevtools/swagger-parser": "10.0.3",
|
||||||
"@budibase/backend-core": "2.4.27-alpha.0",
|
"@budibase/backend-core": "2.4.27-alpha.3",
|
||||||
"@budibase/client": "2.4.27-alpha.0",
|
"@budibase/client": "2.4.27-alpha.3",
|
||||||
"@budibase/pro": "2.4.27-alpha.0",
|
"@budibase/pro": "2.4.27-alpha.3",
|
||||||
"@budibase/shared-core": "2.4.27-alpha.0",
|
"@budibase/shared-core": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@budibase/types": "2.4.27-alpha.0",
|
"@budibase/types": "2.4.27-alpha.3",
|
||||||
"@bull-board/api": "3.7.0",
|
"@bull-board/api": "3.7.0",
|
||||||
"@bull-board/koa": "3.9.4",
|
"@bull-board/koa": "3.9.4",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -20,10 +20,10 @@ import {
|
||||||
cache,
|
cache,
|
||||||
tenancy,
|
tenancy,
|
||||||
context,
|
context,
|
||||||
errors,
|
|
||||||
events,
|
events,
|
||||||
migrations,
|
migrations,
|
||||||
objectStore,
|
objectStore,
|
||||||
|
ErrorCode,
|
||||||
} from "@budibase/backend-core"
|
} from "@budibase/backend-core"
|
||||||
import { USERS_TABLE_SCHEMA } from "../../constants"
|
import { USERS_TABLE_SCHEMA } from "../../constants"
|
||||||
import { buildDefaultDocs } from "../../db/defaultData/datasource_bb_default"
|
import { buildDefaultDocs } from "../../db/defaultData/datasource_bb_default"
|
||||||
|
@ -378,7 +378,7 @@ async function appPostCreate(ctx: BBContext, app: App) {
|
||||||
return quotas.addRows(rowCount)
|
return quotas.addRows(rowCount)
|
||||||
})
|
})
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.code && err.code === errors.codes.USAGE_LIMIT_EXCEEDED) {
|
if (err.code && err.code === ErrorCode.USAGE_LIMIT_EXCEEDED) {
|
||||||
// this import resulted in row usage exceeding the quota
|
// this import resulted in row usage exceeding the quota
|
||||||
// delete the app
|
// delete the app
|
||||||
// skip pre and post-steps as no rows have been added to quotas yet
|
// skip pre and post-steps as no rows have been added to quotas yet
|
||||||
|
|
|
@ -1278,14 +1278,14 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@2.4.27-alpha.0":
|
"@budibase/backend-core@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.27-alpha.0.tgz#0fa33cf5aa23b166ecb2e5f1f8a9bafa13b2c254"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.27-alpha.3.tgz#c067bf894f90e0f86c85bc4cc711c76974a32be3"
|
||||||
integrity sha512-iuPu19TyHGWCXnCl9P3yuSPDCsxXg1bvVu6DDAyPNUORUzonbrwlopZb4leDvP7Sc9BJbORW8E9QyErsnpUpXA==
|
integrity sha512-m8m/lJAB2y36MCE72tRH6O4nAQaECg+9n1W4ozAqtfMWW6JqGLvd4Naxd+LEgO8OOw/vLvzWLbFtek3MasgXCg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/nano" "10.1.2"
|
"@budibase/nano" "10.1.2"
|
||||||
"@budibase/pouchdb-replication-stream" "1.2.10"
|
"@budibase/pouchdb-replication-stream" "1.2.10"
|
||||||
"@budibase/types" "2.4.27-alpha.0"
|
"@budibase/types" "2.4.27-alpha.3"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-cloudfront-sign "2.2.0"
|
aws-cloudfront-sign "2.2.0"
|
||||||
|
@ -1417,14 +1417,14 @@
|
||||||
pouchdb-promise "^6.0.4"
|
pouchdb-promise "^6.0.4"
|
||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
|
|
||||||
"@budibase/pro@2.4.27-alpha.0":
|
"@budibase/pro@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.27-alpha.0.tgz#ab2e8a014894a62b3584d8f40b306e3d82eb24b6"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.27-alpha.3.tgz#c2264116fc5cfbf379d0fb9fae74fb9d8b2a8345"
|
||||||
integrity sha512-Opug1Ewefnc3t5d5a/TzDXfNfRO8BJ/wKpX3JBJLQDpMxYgBbqa4l7XECnnawA6TN1Dayvk0l++BXEjRDKAGyQ==
|
integrity sha512-/OtPXehLN9DerycSCcnCrtY4hxBp229RGx2sFuu/gy/1xrOcMqcZ2+ZLNFhVR/LFm95JQzpPU0TCsJF0bBj+jQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.4.27-alpha.0"
|
"@budibase/backend-core" "2.4.27-alpha.3"
|
||||||
"@budibase/string-templates" "2.3.20"
|
"@budibase/string-templates" "2.3.20"
|
||||||
"@budibase/types" "2.4.27-alpha.0"
|
"@budibase/types" "2.4.27-alpha.3"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
|
@ -1463,10 +1463,10 @@
|
||||||
lodash "^4.17.20"
|
lodash "^4.17.20"
|
||||||
vm2 "^3.9.4"
|
vm2 "^3.9.4"
|
||||||
|
|
||||||
"@budibase/types@2.4.27-alpha.0":
|
"@budibase/types@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.27-alpha.0.tgz#b5e5d468e35caa3b2da1372c8fb90099425efac6"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.27-alpha.3.tgz#1251f2d0a058022fa72bd971ca1017eb0a37253a"
|
||||||
integrity sha512-BSEXIZhIdNXCTUpBY5yxNgBsMeWdAkQko+UKzUNzuMVuBCtEc5xkrbATwYiVapOGJLfw3xWUTZcuCkEVTaZOrA==
|
integrity sha512-2xplbfF2RZMrzXnOoXTLJLMGRapYcu7QturO/S7OMz3WXJ8gsd0U0lh/pi7i1L7YEs34xmKLNjmeMGbwozTfPw==
|
||||||
|
|
||||||
"@bull-board/api@3.7.0":
|
"@bull-board/api@3.7.0":
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/shared-core",
|
"name": "@budibase/shared-core",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Shared data utils",
|
"description": "Shared data utils",
|
||||||
"main": "dist/cjs/src/index.js",
|
"main": "dist/cjs/src/index.js",
|
||||||
"types": "dist/mjs/src/index.d.ts",
|
"types": "dist/mjs/src/index.d.ts",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\""
|
"dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/types": "2.4.27-alpha.0"
|
"@budibase/types": "2.4.27-alpha.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^7.6.0",
|
"concurrently": "^7.6.0",
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@budibase/types@2.4.5-alpha.0":
|
|
||||||
version "2.4.5-alpha.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.5-alpha.0.tgz#70fea09b5e471fe8fa6a760a1a2dd0dd74caac3a"
|
|
||||||
integrity sha512-tVFM9XnKwcCOo7nw6v7C8ZsK9hQLQBv3kHDn7/MFWnDMFCj72pUdtP/iFrAKr2c3tE84lkkWJfNHIolMSktHZA==
|
|
||||||
|
|
||||||
ansi-regex@^5.0.1:
|
ansi-regex@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/types",
|
"name": "@budibase/types",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase types",
|
"description": "Budibase types",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
"types": "dist/mjs/index.d.ts",
|
"types": "dist/mjs/index.d.ts",
|
||||||
|
|
|
@ -81,10 +81,12 @@ export const isSSOAccount = (account: Account): account is SSOAccount =>
|
||||||
|
|
||||||
export enum AccountSSOProviderType {
|
export enum AccountSSOProviderType {
|
||||||
GOOGLE = "google",
|
GOOGLE = "google",
|
||||||
|
MICROSOFT = "microsoft",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum AccountSSOProvider {
|
export enum AccountSSOProvider {
|
||||||
GOOGLE = "google",
|
GOOGLE = "google",
|
||||||
|
MICROSOFT = "microsoft",
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AccountSSO {
|
export interface AccountSSO {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.4.27-alpha.0",
|
"version": "2.4.27-alpha.3",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.4.27-alpha.0",
|
"@budibase/backend-core": "2.4.27-alpha.3",
|
||||||
"@budibase/pro": "2.4.27-alpha.0",
|
"@budibase/pro": "2.4.27-alpha.3",
|
||||||
"@budibase/string-templates": "2.4.27-alpha.0",
|
"@budibase/string-templates": "2.4.27-alpha.3",
|
||||||
"@budibase/types": "2.4.27-alpha.0",
|
"@budibase/types": "2.4.27-alpha.3",
|
||||||
"@koa/router": "8.0.8",
|
"@koa/router": "8.0.8",
|
||||||
"@sentry/node": "6.17.7",
|
"@sentry/node": "6.17.7",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
|
|
|
@ -3,7 +3,6 @@ import {
|
||||||
getInviteCodes,
|
getInviteCodes,
|
||||||
updateInviteCode,
|
updateInviteCode,
|
||||||
} from "../../../utilities/redis"
|
} from "../../../utilities/redis"
|
||||||
// import sdk from "../../../sdk"
|
|
||||||
import * as userSdk from "../../../sdk/users"
|
import * as userSdk from "../../../sdk/users"
|
||||||
import env from "../../../environment"
|
import env from "../../../environment"
|
||||||
import {
|
import {
|
||||||
|
@ -26,11 +25,11 @@ import {
|
||||||
import {
|
import {
|
||||||
accounts,
|
accounts,
|
||||||
cache,
|
cache,
|
||||||
errors,
|
|
||||||
events,
|
events,
|
||||||
migrations,
|
migrations,
|
||||||
tenancy,
|
tenancy,
|
||||||
platform,
|
platform,
|
||||||
|
ErrorCode,
|
||||||
} from "@budibase/backend-core"
|
} from "@budibase/backend-core"
|
||||||
import { checkAnyUserExists } from "../../../utilities/users"
|
import { checkAnyUserExists } from "../../../utilities/users"
|
||||||
import { isEmailConfigured } from "../../../utilities/email"
|
import { isEmailConfigured } from "../../../utilities/email"
|
||||||
|
@ -421,7 +420,7 @@ export const inviteAccept = async (
|
||||||
email: user.email,
|
email: user.email,
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.code === errors.codes.USAGE_LIMIT_EXCEEDED) {
|
if (err.code === ErrorCode.USAGE_LIMIT_EXCEEDED) {
|
||||||
// explicitly re-throw limit exceeded errors
|
// explicitly re-throw limit exceeded errors
|
||||||
ctx.throw(400, err)
|
ctx.throw(400, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,14 +475,14 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@2.4.27-alpha.0":
|
"@budibase/backend-core@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.27-alpha.0.tgz#0fa33cf5aa23b166ecb2e5f1f8a9bafa13b2c254"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.4.27-alpha.3.tgz#c067bf894f90e0f86c85bc4cc711c76974a32be3"
|
||||||
integrity sha512-iuPu19TyHGWCXnCl9P3yuSPDCsxXg1bvVu6DDAyPNUORUzonbrwlopZb4leDvP7Sc9BJbORW8E9QyErsnpUpXA==
|
integrity sha512-m8m/lJAB2y36MCE72tRH6O4nAQaECg+9n1W4ozAqtfMWW6JqGLvd4Naxd+LEgO8OOw/vLvzWLbFtek3MasgXCg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/nano" "10.1.2"
|
"@budibase/nano" "10.1.2"
|
||||||
"@budibase/pouchdb-replication-stream" "1.2.10"
|
"@budibase/pouchdb-replication-stream" "1.2.10"
|
||||||
"@budibase/types" "2.4.27-alpha.0"
|
"@budibase/types" "2.4.27-alpha.3"
|
||||||
"@shopify/jest-koa-mocks" "5.0.1"
|
"@shopify/jest-koa-mocks" "5.0.1"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-cloudfront-sign "2.2.0"
|
aws-cloudfront-sign "2.2.0"
|
||||||
|
@ -564,14 +564,14 @@
|
||||||
pouchdb-promise "^6.0.4"
|
pouchdb-promise "^6.0.4"
|
||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
|
|
||||||
"@budibase/pro@2.4.27-alpha.0":
|
"@budibase/pro@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.27-alpha.0.tgz#ab2e8a014894a62b3584d8f40b306e3d82eb24b6"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.4.27-alpha.3.tgz#c2264116fc5cfbf379d0fb9fae74fb9d8b2a8345"
|
||||||
integrity sha512-Opug1Ewefnc3t5d5a/TzDXfNfRO8BJ/wKpX3JBJLQDpMxYgBbqa4l7XECnnawA6TN1Dayvk0l++BXEjRDKAGyQ==
|
integrity sha512-/OtPXehLN9DerycSCcnCrtY4hxBp229RGx2sFuu/gy/1xrOcMqcZ2+ZLNFhVR/LFm95JQzpPU0TCsJF0bBj+jQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "2.4.27-alpha.0"
|
"@budibase/backend-core" "2.4.27-alpha.3"
|
||||||
"@budibase/string-templates" "2.3.20"
|
"@budibase/string-templates" "2.3.20"
|
||||||
"@budibase/types" "2.4.27-alpha.0"
|
"@budibase/types" "2.4.27-alpha.3"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
bull "4.10.1"
|
bull "4.10.1"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
|
@ -592,10 +592,10 @@
|
||||||
lodash "^4.17.20"
|
lodash "^4.17.20"
|
||||||
vm2 "^3.9.4"
|
vm2 "^3.9.4"
|
||||||
|
|
||||||
"@budibase/types@2.4.27-alpha.0":
|
"@budibase/types@2.4.27-alpha.3":
|
||||||
version "2.4.27-alpha.0"
|
version "2.4.27-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.27-alpha.0.tgz#b5e5d468e35caa3b2da1372c8fb90099425efac6"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.27-alpha.3.tgz#1251f2d0a058022fa72bd971ca1017eb0a37253a"
|
||||||
integrity sha512-BSEXIZhIdNXCTUpBY5yxNgBsMeWdAkQko+UKzUNzuMVuBCtEc5xkrbATwYiVapOGJLfw3xWUTZcuCkEVTaZOrA==
|
integrity sha512-2xplbfF2RZMrzXnOoXTLJLMGRapYcu7QturO/S7OMz3WXJ8gsd0U0lh/pi7i1L7YEs34xmKLNjmeMGbwozTfPw==
|
||||||
|
|
||||||
"@cspotcode/source-map-support@^0.8.0":
|
"@cspotcode/source-map-support@^0.8.0":
|
||||||
version "0.8.1"
|
version "0.8.1"
|
||||||
|
|
Loading…
Reference in a new issue