Merge branch 'develop' of github.com:Budibase/budibase into public-api-sdk

This commit is contained in:
Andrew Kingston 2022-09-20 15:29:39 +01:00
commit 3fd54967d9
27 changed files with 160 additions and 153 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"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": "1.3.22-alpha.3",
"@budibase/types": "1.4.3-alpha.0",
"@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",

View File

@ -2,7 +2,7 @@ import env from "../environment"
import { SEPARATOR, DocumentType } from "../db/constants"
import cls from "./FunctionContext"
import { dangerousGetDB, closeDB } from "../db"
import { baseGlobalDBName } from "../tenancy/utils"
import { baseGlobalDBName } from "../db/tenancy"
import { IdentityContext } from "@budibase/types"
import { DEFAULT_TENANT_ID as _DEFAULT_TENANT_ID } from "../constants"
import { ContextKey } from "./constants"

View File

@ -1,5 +1,5 @@
import { DEFAULT_TENANT_ID } from "../constants"
import { StaticDatabases, SEPARATOR } from "../db/constants"
import { StaticDatabases, SEPARATOR } from "./constants"
import { getTenantId } from "../context"
export const getGlobalDBName = (tenantId?: string) => {

View File

@ -3,7 +3,7 @@ import { DEFAULT_TENANT_ID, Configs } from "../constants"
import env from "../environment"
import { SEPARATOR, DocumentType, UNICODE_MAX, ViewName } from "./constants"
import { getTenantId, getGlobalDB } from "../context"
import { getGlobalDBName } from "../tenancy"
import { getGlobalDBName } from "./tenancy"
import fetch from "node-fetch"
import { doWithDB, allDbs } from "./index"
import { getCouchInfo } from "./pouch"
@ -16,6 +16,7 @@ import * as events from "../events"
export * from "./constants"
export * from "./conversions"
export { default as Replication } from "./Replication"
export * from "./tenancy"
/**
* Generates a new app ID.

View File

@ -3,12 +3,8 @@ import { doWithDB } from "../db"
import { DocumentType, StaticDatabases } from "../db/constants"
import { getAllApps } from "../db/utils"
import environment from "../environment"
import {
doInTenant,
getTenantIds,
getGlobalDBName,
getTenantId,
} from "../tenancy"
import { doInTenant, getTenantIds, getTenantId } from "../tenancy"
import { getGlobalDBName } from "../db/tenancy"
import * as context from "../context"
import { DEFINITIONS } from "."
import {

View File

@ -1,11 +1,9 @@
import * as context from "../context"
import * as tenancy from "./tenancy"
import * as utils from "./utils"
const pkg = {
...context,
...tenancy,
...utils,
}
export = pkg

View File

@ -1,7 +1,7 @@
import { doWithDB } from "../db"
import { queryPlatformView } from "../db/views"
import { StaticDatabases, ViewName } from "../db/constants"
import { getGlobalDBName } from "./utils"
import { getGlobalDBName } from "../db/tenancy"
import {
getTenantId,
DEFAULT_TENANT_ID,
@ -9,7 +9,7 @@ import {
getTenantIDFromAppID,
} from "../context"
import env from "../environment"
import { PlatformUser, PlatformUserByEmail } from "@budibase/types"
import { PlatformUser } from "@budibase/types"
const TENANT_DOC = StaticDatabases.PLATFORM_INFO.docs.tenants
const PLATFORM_INFO_DB = StaticDatabases.PLATFORM_INFO.name

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"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": "1.3.22-alpha.3",
"@budibase/string-templates": "1.4.3-alpha.0",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -71,10 +71,10 @@
}
},
"dependencies": {
"@budibase/bbui": "1.3.22-alpha.3",
"@budibase/client": "1.3.22-alpha.3",
"@budibase/frontend-core": "1.3.22-alpha.3",
"@budibase/string-templates": "1.3.22-alpha.3",
"@budibase/bbui": "1.4.3-alpha.0",
"@budibase/client": "1.4.3-alpha.0",
"@budibase/frontend-core": "1.4.3-alpha.0",
"@budibase/string-templates": "1.4.3-alpha.0",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -97,7 +97,7 @@
backgroundColour={templateEntry.background}
icon={templateEntry.icon}
>
{#if $licensing?.usageMetrics?.apps < 100}
{#if !($licensing?.usageMetrics?.apps >= 100)}
<Button
cta
on:click={() => {

View File

@ -8,6 +8,7 @@
import { ExpiringKeys } from "./constants"
import { getBanners } from "./licensingBanners"
import { banner } from "@budibase/bbui"
import { FEATURE_FLAGS, isEnabled } from "../../../helpers/featureFlags"
const oneDayInSeconds = 86400
@ -81,7 +82,12 @@
}
}
$: if (userLoaded && licensingLoaded && loaded) {
$: if (
userLoaded &&
licensingLoaded &&
loaded &&
isEnabled(FEATURE_FLAGS.LICENSING)
) {
queuedModals = processModals()
queuedBanners = getBanners()
showNextModal()

View File

@ -56,7 +56,7 @@
{
title: "Plugins",
href: "/builder/portal/manage/plugins",
badge: "New",
badge: "Beta",
},
{

View File

@ -10,7 +10,7 @@
Search,
} from "@budibase/bbui"
import { onMount } from "svelte"
import { plugins } from "stores/portal"
import { plugins, admin } from "stores/portal"
import PluginRow from "./_components/PluginRow.svelte"
import AddPluginModal from "./_components/AddPluginModal.svelte"
@ -20,9 +20,12 @@
let filterOptions = [
{ label: "All plugins", value: "all" },
{ label: "Components", value: "component" },
{ label: "Datasources", value: "datasource" },
]
if (!$admin.cloud) {
filterOptions.push({ label: "Datasources", value: "datasource" })
}
$: filteredPlugins = $plugins
.filter(plugin => {
return filter === "all" || plugin.schema.type === filter

View File

@ -3,10 +3,12 @@ import { API } from "api"
import { auth } from "stores/portal"
import { Constants } from "@budibase/frontend-core"
import { StripeStatus } from "components/portal/licensing/constants"
import { FEATURE_FLAGS, isEnabled } from "../../helpers/featureFlags"
export const createLicensingStore = () => {
const DEFAULT = {
plans: {},
usageMetrics: {},
}
const oneDayInMilliseconds = 86400000
@ -27,6 +29,7 @@ export const createLicensingStore = () => {
})
},
getUsageMetrics: async () => {
if (isEnabled(FEATURE_FLAGS.LICENSING)) {
const quota = get(store).quotaUsage
const license = get(auth).user.license
const now = new Date()
@ -99,6 +102,7 @@ export const createLicensingStore = () => {
},
}
})
}
},
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
@ -26,7 +26,7 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "1.3.22-alpha.3",
"@budibase/backend-core": "1.4.3-alpha.0",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"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": "1.3.22-alpha.3",
"@budibase/frontend-core": "1.3.22-alpha.3",
"@budibase/string-templates": "1.3.22-alpha.3",
"@budibase/bbui": "1.4.3-alpha.0",
"@budibase/frontend-core": "1.4.3-alpha.0",
"@budibase/string-templates": "1.4.3-alpha.0",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

@ -1,5 +1,6 @@
export const PlanType = {
FREE: "free",
PRO: "pro",
TEAM: "team",
BUSINESS: "business",
ENTERPRISE: "enterprise",

View File

@ -1,5 +1,6 @@
import { isFreePlan } from "./utils.js"
// import { isFreePlan } from "./utils.js"
export const logoEnabled = () => {
return isFreePlan()
return false
// return isFreePlan()
}

View File

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "1.3.22-alpha.3",
"@budibase/bbui": "1.4.3-alpha.0",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "1.3.22-alpha.3",
"@budibase/client": "1.3.22-alpha.3",
"@budibase/pro": "1.3.22-alpha.3",
"@budibase/string-templates": "1.3.22-alpha.3",
"@budibase/types": "1.3.22-alpha.3",
"@budibase/backend-core": "1.4.3-alpha.0",
"@budibase/client": "1.4.3-alpha.0",
"@budibase/pro": "1.4.3-alpha.0",
"@budibase/string-templates": "1.4.3-alpha.0",
"@budibase/types": "1.4.3-alpha.0",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

@ -1,15 +1,12 @@
const env = require("../../environment")
const { getAllApps } = require("@budibase/backend-core/db")
const { getAllApps, getGlobalDBName } = require("@budibase/backend-core/db")
const {
exportDB,
sendTempFile,
readFileSync,
} = require("../../utilities/fileSystem")
const { stringToReadStream } = require("../../utilities")
const {
getGlobalDBName,
getGlobalDB,
} = require("@budibase/backend-core/tenancy")
const { getGlobalDB } = require("@budibase/backend-core/tenancy")
const { create } = require("./application")
const { getDocParams, DocumentType, isDevAppID } = require("../../db/utils")

View File

@ -1094,12 +1094,12 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.22-alpha.2.tgz#6ae1e42e4163f8ffaa9a7d5891145419f7484279"
integrity sha512-bzBpsq6LmpbwVe6UScgLUcN59pYq0nokzq32VA6rXWfTuPz+Y0jKGJuIY3JkPOuTsVAoqlwQH2XLOs6BZlZ7Ag==
"@budibase/backend-core@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.3-alpha.0.tgz#5b96bd4f41fb8692daeeb1ac95c2960b9344ca88"
integrity sha512-erkKqDBTJx4XXmVGclm63AVmFZL0ziR4Go1S5tJJHhLpxqrd3STN1HNzfCIi59f35Cqc0VMp9LouS2u0Uly+KQ==
dependencies:
"@budibase/types" "1.3.22-alpha.2"
"@budibase/types" "1.4.3-alpha.0"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
@ -1180,13 +1180,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.22-alpha.2.tgz#9c0a91d664af9e6cac90d9e4e0bc8cc1d9bdb06c"
integrity sha512-3tVyaXskgMqDFLLPwTa5JgA4OrjIAxrflB8p6jknofQd0UwxHckuInz5BfJVVDqSHi65jif1+YHE0XqSJDuDrg==
"@budibase/pro@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.3-alpha.0.tgz#5e356146eb8822d21a22b2c280f4f7ff856277f5"
integrity sha512-xkPyFg0Nvv88GlnC7h1Hh3FhR8C3Y3UpUPdUNg7zpkEUs/q0r13R9lM8jSrY0CsqCJleTZ+G8AECS9V5sWBH/w==
dependencies:
"@budibase/backend-core" "1.3.22-alpha.2"
"@budibase/types" "1.3.22-alpha.2"
"@budibase/backend-core" "1.4.3-alpha.0"
"@budibase/types" "1.4.3-alpha.0"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1209,10 +1209,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.22-alpha.2.tgz#4b207cca8f9a897b7d95a074a240fbf8a05b2bd6"
integrity sha512-zZLhm9q9pZci0R+7EAwYUqkGQ2K+3Dwc5SI9kpQTaWEecLuAmujFERcd6K5wZfWCAzjcb2LsB6lvADxcW6rj3Q==
"@budibase/types@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.3-alpha.0.tgz#7a440dc3c6bee2167dc1c8a6be1af717ef4764b4"
integrity sha512-0AuWmIGrXfhQvkWgoT8Uvsk+6lZhom5bE3JpI2mAmixiZKJSg+GPPFua1Uw1JLdjznVTropCDF2zoEPd/+oKxw==
"@bull-board/api@3.7.0":
version "3.7.0"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.3.22-alpha.3",
"version": "1.4.3-alpha.0",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -36,10 +36,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "1.3.22-alpha.3",
"@budibase/pro": "1.3.22-alpha.3",
"@budibase/string-templates": "1.3.22-alpha.3",
"@budibase/types": "1.3.22-alpha.3",
"@budibase/backend-core": "1.4.3-alpha.0",
"@budibase/pro": "1.4.3-alpha.0",
"@budibase/string-templates": "1.4.3-alpha.0",
"@budibase/types": "1.4.3-alpha.0",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -291,12 +291,12 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.22-alpha.2.tgz#6ae1e42e4163f8ffaa9a7d5891145419f7484279"
integrity sha512-bzBpsq6LmpbwVe6UScgLUcN59pYq0nokzq32VA6rXWfTuPz+Y0jKGJuIY3JkPOuTsVAoqlwQH2XLOs6BZlZ7Ag==
"@budibase/backend-core@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.3-alpha.0.tgz#5b96bd4f41fb8692daeeb1ac95c2960b9344ca88"
integrity sha512-erkKqDBTJx4XXmVGclm63AVmFZL0ziR4Go1S5tJJHhLpxqrd3STN1HNzfCIi59f35Cqc0VMp9LouS2u0Uly+KQ==
dependencies:
"@budibase/types" "1.3.22-alpha.2"
"@budibase/types" "1.4.3-alpha.0"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
@ -327,21 +327,21 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.22-alpha.2.tgz#9c0a91d664af9e6cac90d9e4e0bc8cc1d9bdb06c"
integrity sha512-3tVyaXskgMqDFLLPwTa5JgA4OrjIAxrflB8p6jknofQd0UwxHckuInz5BfJVVDqSHi65jif1+YHE0XqSJDuDrg==
"@budibase/pro@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.3-alpha.0.tgz#5e356146eb8822d21a22b2c280f4f7ff856277f5"
integrity sha512-xkPyFg0Nvv88GlnC7h1Hh3FhR8C3Y3UpUPdUNg7zpkEUs/q0r13R9lM8jSrY0CsqCJleTZ+G8AECS9V5sWBH/w==
dependencies:
"@budibase/backend-core" "1.3.22-alpha.2"
"@budibase/types" "1.3.22-alpha.2"
"@budibase/backend-core" "1.4.3-alpha.0"
"@budibase/types" "1.4.3-alpha.0"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@1.3.22-alpha.2":
version "1.3.22-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.22-alpha.2.tgz#4b207cca8f9a897b7d95a074a240fbf8a05b2bd6"
integrity sha512-zZLhm9q9pZci0R+7EAwYUqkGQ2K+3Dwc5SI9kpQTaWEecLuAmujFERcd6K5wZfWCAzjcb2LsB6lvADxcW6rj3Q==
"@budibase/types@1.4.3-alpha.0":
version "1.4.3-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.3-alpha.0.tgz#7a440dc3c6bee2167dc1c8a6be1af717ef4764b4"
integrity sha512-0AuWmIGrXfhQvkWgoT8Uvsk+6lZhom5bE3JpI2mAmixiZKJSg+GPPFua1Uw1JLdjznVTropCDF2zoEPd/+oKxw==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"