Merge remote-tracking branch 'origin/develop' into feature/user-side-panel-ux-updates

This commit is contained in:
Dean 2023-05-02 09:20:08 +01:00
commit 530c4fb00f
31 changed files with 145 additions and 110 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true, "useWorkspaces": true,
"packages": ["packages/*"], "packages": ["packages/*"],

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/backend-core", "name": "@budibase/backend-core",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35", "@budibase/types": "2.5.6-alpha.41",
"@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",

View File

@ -3,7 +3,6 @@ import {
Event, Event,
LicenseActivatedEvent, LicenseActivatedEvent,
LicensePlanChangedEvent, LicensePlanChangedEvent,
LicenseTierChangedEvent,
PlanType, PlanType,
Account, Account,
LicensePortalOpenedEvent, LicensePortalOpenedEvent,
@ -11,22 +10,22 @@ import {
LicenseCheckoutOpenedEvent, LicenseCheckoutOpenedEvent,
LicensePaymentFailedEvent, LicensePaymentFailedEvent,
LicensePaymentRecoveredEvent, LicensePaymentRecoveredEvent,
PriceDuration,
} from "@budibase/types" } from "@budibase/types"
async function tierChanged(account: Account, from: number, to: number) { async function planChanged(
const properties: LicenseTierChangedEvent = { account: Account,
accountId: account.accountId, from: PlanType,
to, to: PlanType,
from, quantity: number | undefined,
} duration: PriceDuration | undefined
await publishEvent(Event.LICENSE_TIER_CHANGED, properties) ) {
}
async function planChanged(account: Account, from: PlanType, to: PlanType) {
const properties: LicensePlanChangedEvent = { const properties: LicensePlanChangedEvent = {
accountId: account.accountId, accountId: account.accountId,
to, to,
from, from,
quantity,
duration,
} }
await publishEvent(Event.LICENSE_PLAN_CHANGED, properties) await publishEvent(Event.LICENSE_PLAN_CHANGED, properties)
} }
@ -74,7 +73,6 @@ async function paymentRecovered(account: Account) {
} }
export default { export default {
tierChanged,
planChanged, planChanged,
activated, activated,
checkoutOpened, checkoutOpened,

View File

@ -123,7 +123,6 @@ beforeAll(async () => {
jest.spyOn(events.plugin, "imported") jest.spyOn(events.plugin, "imported")
jest.spyOn(events.plugin, "deleted") jest.spyOn(events.plugin, "deleted")
jest.spyOn(events.license, "tierChanged")
jest.spyOn(events.license, "planChanged") jest.spyOn(events.license, "planChanged")
jest.spyOn(events.license, "activated") jest.spyOn(events.license, "activated")
jest.spyOn(events.license, "checkoutOpened") jest.spyOn(events.license, "checkoutOpened")

View File

@ -7,16 +7,30 @@ import {
PlanType, PlanType,
PriceDuration, PriceDuration,
PurchasedPlan, PurchasedPlan,
PurchasedPrice,
Quotas, Quotas,
Subscription, Subscription,
} from "@budibase/types" } from "@budibase/types"
export function price(): PurchasedPrice {
return {
amount: 10000,
amountMonthly: 10000,
currency: "usd",
duration: PriceDuration.MONTHLY,
priceId: "price_123",
dayPasses: undefined,
isPerUser: true,
}
}
export const plan = (type: PlanType = PlanType.FREE): PurchasedPlan => { export const plan = (type: PlanType = PlanType.FREE): PurchasedPlan => {
return { return {
type, type,
usesInvoicing: false, usesInvoicing: false,
minUsers: 1, minUsers: 1,
model: PlanModel.PER_USER, model: PlanModel.PER_USER,
price: price(),
} }
} }

View File

@ -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.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35", "@budibase/shared-core": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -58,10 +58,10 @@
} }
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "2.5.6-alpha.35", "@budibase/bbui": "2.5.6-alpha.41",
"@budibase/frontend-core": "2.5.6-alpha.35", "@budibase/frontend-core": "2.5.6-alpha.41",
"@budibase/shared-core": "2.5.6-alpha.35", "@budibase/shared-core": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@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",

View File

@ -43,12 +43,18 @@
} }
$: quotaUsage = $licensing.quotaUsage $: quotaUsage = $licensing.quotaUsage
$: license = $auth.user?.license $: license = $auth.user?.license
$: plan = license?.plan
$: usesInvoicing = plan?.usesInvoicing
$: accountPortalAccess = $auth?.user?.accountPortalAccess $: accountPortalAccess = $auth?.user?.accountPortalAccess
$: quotaReset = quotaUsage?.quotaReset $: quotaReset = quotaUsage?.quotaReset
$: canManagePlan = $: canManagePlan =
($admin.cloud && accountPortalAccess) || (!$admin.cloud && $auth.isAdmin) ($admin.cloud && accountPortalAccess) || (!$admin.cloud && $auth.isAdmin)
$: showButton = !usesInvoicing && accountPortalAccess
const setMonthlyUsage = () => { const setMonthlyUsage = () => {
monthlyUsage = [] monthlyUsage = []
if (quotaUsage.monthly) { if (quotaUsage.monthly) {
@ -121,7 +127,7 @@
const setTextRows = () => { const setTextRows = () => {
textRows = [] textRows = []
if (cancelAt) { if (cancelAt && !usesInvoicing) {
textRows.push({ message: "Subscription has been cancelled" }) textRows.push({ message: "Subscription has been cancelled" })
textRows.push({ textRows.push({
message: `${getDaysRemaining(cancelAt)} days remaining`, message: `${getDaysRemaining(cancelAt)} days remaining`,
@ -213,7 +219,7 @@
description="YOUR CURRENT PLAN" description="YOUR CURRENT PLAN"
title={planTitle()} title={planTitle()}
{primaryActionText} {primaryActionText}
primaryAction={accountPortalAccess ? goToAccountPortal : undefined} primaryAction={showButton ? goToAccountPortal : undefined}
{textRows} {textRows}
> >
<div class="content"> <div class="content">
@ -224,12 +230,6 @@
<Usage {usage} warnWhenFull={WARN_USAGE.includes(usage.name)} /> <Usage {usage} warnWhenFull={WARN_USAGE.includes(usage.name)} />
</div> </div>
{/each} {/each}
</Layout>
</div>
{#if monthlyUsage.length}
<div class="column">
<Layout noPadding gap="M">
<Layout gap="XS" noPadding> <Layout gap="XS" noPadding>
<Heading size="S">Monthly limits</Heading> <Heading size="S">Monthly limits</Heading>
<div class="detail"> <div class="detail">
@ -242,15 +242,11 @@
</Layout> </Layout>
<Layout noPadding gap="M"> <Layout noPadding gap="M">
{#each monthlyUsage as usage} {#each monthlyUsage as usage}
<Usage <Usage {usage} warnWhenFull={WARN_USAGE.includes(usage.name)} />
{usage}
warnWhenFull={WARN_USAGE.includes(usage.name)}
/>
{/each} {/each}
</Layout> </Layout>
</Layout> </Layout>
</div> </div>
{/if}
</div> </div>
</DashCard> </DashCard>
</Layout> </Layout>

View File

@ -176,7 +176,7 @@
<Heading>Backups</Heading> <Heading>Backups</Heading>
{#if !$licensing.backupsEnabled} {#if !$licensing.backupsEnabled}
<Tags> <Tags>
<Tag icon="LockClosed">Pro plan</Tag> <Tag icon="LockClosed">Premium</Tag>
</Tags> </Tags>
{/if} {/if}
</div> </div>

View File

@ -378,7 +378,7 @@
</div> </div>
{#if !$licensing.enforceableSSO} {#if !$licensing.enforceableSSO}
<Tags> <Tags>
<Tag icon="LockClosed">Enterprise plan</Tag> <Tag icon="LockClosed">Enterprise</Tag>
</Tags> </Tags>
{/if} {/if}
</div> </div>

View File

@ -213,7 +213,7 @@
{/if} {/if}
{#if isCloud && !brandingEnabled} {#if isCloud && !brandingEnabled}
<Tags> <Tags>
<Tag icon="LockClosed">Pro</Tag> <Tag icon="LockClosed">Premium</Tag>
</Tags> </Tags>
{/if} {/if}
</div> </div>

View File

@ -94,7 +94,7 @@
<Heading size="M">Groups</Heading> <Heading size="M">Groups</Heading>
{#if !$licensing.groupsEnabled} {#if !$licensing.groupsEnabled}
<Tags> <Tags>
<Tag icon="LockClosed">Pro plan</Tag> <Tag icon="LockClosed">Business</Tag>
</Tags> </Tags>
{/if} {/if}
</div> </div>

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/cli", "name": "@budibase/cli",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35", "@budibase/backend-core": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@budibase/types": "2.5.6-alpha.35", "@budibase/types": "2.5.6-alpha.41",
"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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35", "@budibase/bbui": "2.5.6-alpha.41",
"@budibase/frontend-core": "2.5.6-alpha.35", "@budibase/frontend-core": "2.5.6-alpha.41",
"@budibase/shared-core": "2.5.6-alpha.35", "@budibase/shared-core": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@budibase/types": "2.5.6-alpha.35", "@budibase/types": "2.5.6-alpha.41",
"@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",

View File

@ -1,13 +1,13 @@
{ {
"name": "@budibase/frontend-core", "name": "@budibase/frontend-core",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35", "@budibase/bbui": "2.5.6-alpha.41",
"@budibase/shared-core": "2.5.6-alpha.35", "@budibase/shared-core": "2.5.6-alpha.41",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"socket.io-client": "^4.6.1", "socket.io-client": "^4.6.1",

View File

@ -1,5 +1,6 @@
<script> <script>
import { onMount, tick } from "svelte" import { onMount, tick } from "svelte"
import { clickOutside } from "@budibase/bbui"
export let value export let value
export let focused = false export let focused = false
@ -60,6 +61,7 @@
on:change={handleChange} on:change={handleChange}
on:wheel|stopPropagation on:wheel|stopPropagation
spellcheck="false" spellcheck="false"
use:clickOutside={close}
/> />
{:else} {:else}
<div class="long-form-cell" on:click={editable ? open : null} class:editable> <div class="long-form-cell" on:click={editable ? open : null} class:editable>

View File

@ -2,6 +2,13 @@
import TextCell from "./TextCell.svelte" import TextCell from "./TextCell.svelte"
export let api export let api
export let onChange
const numberOnChange = value => {
const float = parseFloat(value)
const newValue = isNaN(float) ? null : float
onChange(newValue)
}
</script> </script>
<TextCell {...$$props} bind:api type="number" /> <TextCell {...$$props} onChange={numberOnChange} bind:api type="number" />

View File

@ -1,5 +1,5 @@
<script> <script>
import { Icon } from "@budibase/bbui" import { Icon, clickOutside } from "@budibase/bbui"
import { getColor } from "../lib/utils" import { getColor } from "../lib/utils"
import { onMount } from "svelte" import { onMount } from "svelte"
@ -118,6 +118,7 @@
class:invertX class:invertX
class:invertY class:invertY
on:wheel={e => e.stopPropagation()} on:wheel={e => e.stopPropagation()}
use:clickOutside={close}
> >
{#each options as option, idx} {#each options as option, idx}
{@const color = getOptionColor(option)} {@const color = getOptionColor(option)}

View File

@ -18,7 +18,7 @@
<script> <script>
import { getColor } from "../lib/utils" import { getColor } from "../lib/utils"
import { onMount, getContext } from "svelte" import { onMount, getContext } from "svelte"
import { Icon, Input, ProgressCircle } from "@budibase/bbui" import { Icon, Input, ProgressCircle, clickOutside } from "@budibase/bbui"
import { debounce } from "../../../utils/utils" import { debounce } from "../../../utils/utils"
export let value export let value
@ -284,7 +284,13 @@
</div> </div>
{#if isOpen} {#if isOpen}
<div class="dropdown" class:invertX class:invertY on:wheel|stopPropagation> <div
class="dropdown"
class:invertX
class:invertY
on:wheel|stopPropagation
use:clickOutside={close}
>
<div class="search"> <div class="search">
<Input <Input
autofocus autofocus

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/sdk", "name": "@budibase/sdk",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"description": "Budibase Public API SDK", "description": "Budibase Public API SDK",
"author": "Budibase", "author": "Budibase",
"license": "MPL-2.0", "license": "MPL-2.0",

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -45,12 +45,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.5.6-alpha.35", "@budibase/backend-core": "2.5.6-alpha.41",
"@budibase/client": "2.5.6-alpha.35", "@budibase/client": "2.5.6-alpha.41",
"@budibase/pro": "2.5.6-alpha.35", "@budibase/pro": "2.5.6-alpha.41",
"@budibase/shared-core": "2.5.6-alpha.35", "@budibase/shared-core": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@budibase/types": "2.5.6-alpha.35", "@budibase/types": "2.5.6-alpha.41",
"@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",

View File

@ -27,6 +27,7 @@ export const isProdAppID = dbCore.isProdAppID
export const USER_METDATA_PREFIX = `${DocumentType.ROW}${SEPARATOR}${dbCore.InternalTable.USER_METADATA}${SEPARATOR}` export const USER_METDATA_PREFIX = `${DocumentType.ROW}${SEPARATOR}${dbCore.InternalTable.USER_METADATA}${SEPARATOR}`
export const LINK_USER_METADATA_PREFIX = `${DocumentType.LINK}${SEPARATOR}${dbCore.InternalTable.USER_METADATA}${SEPARATOR}` export const LINK_USER_METADATA_PREFIX = `${DocumentType.LINK}${SEPARATOR}${dbCore.InternalTable.USER_METADATA}${SEPARATOR}`
export const TABLE_ROW_PREFIX = `${DocumentType.ROW}${SEPARATOR}${DocumentType.TABLE}` export const TABLE_ROW_PREFIX = `${DocumentType.ROW}${SEPARATOR}${DocumentType.TABLE}`
export const AUTOMATION_LOG_PREFIX = `${DocumentType.AUTOMATION_LOG}${SEPARATOR}`
export const ViewName = dbCore.ViewName export const ViewName = dbCore.ViewName
export const InternalTables = dbCore.InternalTable export const InternalTables = dbCore.InternalTable
export const UNICODE_MAX = dbCore.UNICODE_MAX export const UNICODE_MAX = dbCore.UNICODE_MAX

View File

@ -3,6 +3,7 @@ import { budibaseTempDir } from "../../../utilities/budibaseDir"
import { streamFile, createTempFolder } from "../../../utilities/fileSystem" import { streamFile, createTempFolder } from "../../../utilities/fileSystem"
import { ObjectStoreBuckets } from "../../../constants" import { ObjectStoreBuckets } from "../../../constants"
import { import {
AUTOMATION_LOG_PREFIX,
LINK_USER_METADATA_PREFIX, LINK_USER_METADATA_PREFIX,
TABLE_ROW_PREFIX, TABLE_ROW_PREFIX,
USER_METDATA_PREFIX, USER_METDATA_PREFIX,
@ -20,11 +21,15 @@ const uuid = require("uuid/v4")
const tar = require("tar") const tar = require("tar")
const MemoryStream = require("memorystream") const MemoryStream = require("memorystream")
type ExportOpts = { interface DBDumpOpts {
filter?: any filter?: any
exportPath?: string exportPath?: string
}
interface ExportOpts extends DBDumpOpts {
tar?: boolean tar?: boolean
excludeRows?: boolean excludeRows?: boolean
excludeLogs?: boolean
} }
function tarFilesToTmp(tmpDir: string, files: string[]) { function tarFilesToTmp(tmpDir: string, files: string[]) {
@ -49,7 +54,7 @@ function tarFilesToTmp(tmpDir: string, files: string[]) {
* a filter function or the name of the export. * a filter function or the name of the export.
* @return {*} either a readable stream or a string * @return {*} either a readable stream or a string
*/ */
export async function exportDB(dbName: string, opts: ExportOpts = {}) { export async function exportDB(dbName: string, opts: DBDumpOpts = {}) {
const exportOpts = { const exportOpts = {
filter: opts?.filter, filter: opts?.filter,
batch_size: 1000, batch_size: 1000,
@ -76,11 +81,14 @@ export async function exportDB(dbName: string, opts: ExportOpts = {}) {
}) })
} }
function defineFilter(excludeRows?: boolean) { function defineFilter(excludeRows?: boolean, excludeLogs?: boolean) {
const ids = [USER_METDATA_PREFIX, LINK_USER_METADATA_PREFIX] const ids = [USER_METDATA_PREFIX, LINK_USER_METADATA_PREFIX]
if (excludeRows) { if (excludeRows) {
ids.push(TABLE_ROW_PREFIX) ids.push(TABLE_ROW_PREFIX)
} }
if (excludeLogs) {
ids.push(AUTOMATION_LOG_PREFIX)
}
return (doc: any) => return (doc: any) =>
!ids.map(key => doc._id.includes(key)).reduce((prev, curr) => prev || curr) !ids.map(key => doc._id.includes(key)).reduce((prev, curr) => prev || curr)
} }
@ -130,8 +138,7 @@ export async function exportApp(appId: string, config?: ExportOpts) {
// enforce an export of app DB to the tmp path // enforce an export of app DB to the tmp path
const dbPath = join(tmpPath, DB_EXPORT_FILE) const dbPath = join(tmpPath, DB_EXPORT_FILE)
await exportDB(appId, { await exportDB(appId, {
...config, filter: defineFilter(config?.excludeRows, config?.excludeLogs),
filter: defineFilter(config?.excludeRows),
exportPath: dbPath, exportPath: dbPath,
}) })
// if tar requested, return where the tarball is // if tar requested, return where the tarball is
@ -155,6 +162,10 @@ export async function exportApp(appId: string, config?: ExportOpts) {
* @returns {*} a readable stream of the backup which is written in real time * @returns {*} a readable stream of the backup which is written in real time
*/ */
export async function streamExportApp(appId: string, excludeRows: boolean) { export async function streamExportApp(appId: string, excludeRows: boolean) {
const tmpPath = await exportApp(appId, { excludeRows, tar: true }) const tmpPath = await exportApp(appId, {
excludeRows,
excludeLogs: true,
tar: true,
})
return streamFile(tmpPath) return streamFile(tmpPath)
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/shared-core", "name": "@budibase/shared-core",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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.5.6-alpha.35" "@budibase/types": "2.5.6-alpha.41"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^7.6.0", "concurrently": "^7.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/string-templates", "name": "@budibase/string-templates",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/types", "name": "@budibase/types",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"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",

View File

@ -39,6 +39,7 @@ export interface Account extends CreateAccount {
// licensing // licensing
tier: string // deprecated tier: string // deprecated
planType?: PlanType planType?: PlanType
/** @deprecated */
planTier?: number planTier?: number
license?: License license?: License
installId?: string installId?: string
@ -47,6 +48,7 @@ export interface Account extends CreateAccount {
stripeCustomerId?: string stripeCustomerId?: string
licenseKey?: string licenseKey?: string
licenseKeyActivatedAt?: number licenseKeyActivatedAt?: number
licenseRequestedAt?: number
licenseOverrides?: LicenseOverrides licenseOverrides?: LicenseOverrides
quotaUsage?: QuotaUsage quotaUsage?: QuotaUsage
} }

View File

@ -138,7 +138,6 @@ export enum Event {
// LICENSE // LICENSE
LICENSE_PLAN_CHANGED = "license:plan:changed", LICENSE_PLAN_CHANGED = "license:plan:changed",
LICENSE_TIER_CHANGED = "license:tier:changed",
LICENSE_ACTIVATED = "license:activated", LICENSE_ACTIVATED = "license:activated",
LICENSE_PAYMENT_FAILED = "license:payment:failed", LICENSE_PAYMENT_FAILED = "license:payment:failed",
LICENSE_PAYMENT_RECOVERED = "license:payment:recovered", LICENSE_PAYMENT_RECOVERED = "license:payment:recovered",
@ -328,7 +327,6 @@ export const AuditedEventFriendlyName: Record<Event, string | undefined> = {
// LICENSE - NOT AUDITED // LICENSE - NOT AUDITED
[Event.LICENSE_PLAN_CHANGED]: undefined, [Event.LICENSE_PLAN_CHANGED]: undefined,
[Event.LICENSE_TIER_CHANGED]: undefined,
[Event.LICENSE_ACTIVATED]: undefined, [Event.LICENSE_ACTIVATED]: undefined,
[Event.LICENSE_PAYMENT_FAILED]: undefined, [Event.LICENSE_PAYMENT_FAILED]: undefined,
[Event.LICENSE_PAYMENT_RECOVERED]: undefined, [Event.LICENSE_PAYMENT_RECOVERED]: undefined,

View File

@ -1,15 +1,15 @@
import { PlanType } from "../licensing" import { PlanType, PriceDuration } from "../licensing"
export interface LicenseTierChangedEvent {
accountId: string
from: number
to: number
}
export interface LicensePlanChangedEvent { export interface LicensePlanChangedEvent {
accountId: string accountId: string
from: PlanType from: PlanType
to: PlanType to: PlanType
// may not be on historical events
// free plans won't have a duration
duration: PriceDuration | undefined
// may not be on historical events
// free plans won't have a quantity
quantity: number | undefined
} }
export interface LicenseActivatedEvent { export interface LicenseActivatedEvent {

View File

@ -1,7 +1,7 @@
{ {
"name": "@budibase/worker", "name": "@budibase/worker",
"email": "hi@budibase.com", "email": "hi@budibase.com",
"version": "2.5.6-alpha.35", "version": "2.5.6-alpha.41",
"description": "Budibase background service", "description": "Budibase background service",
"main": "src/index.ts", "main": "src/index.ts",
"repository": { "repository": {
@ -37,10 +37,10 @@
"author": "Budibase", "author": "Budibase",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@budibase/backend-core": "2.5.6-alpha.35", "@budibase/backend-core": "2.5.6-alpha.41",
"@budibase/pro": "2.5.6-alpha.35", "@budibase/pro": "2.5.6-alpha.41",
"@budibase/string-templates": "2.5.6-alpha.35", "@budibase/string-templates": "2.5.6-alpha.41",
"@budibase/types": "2.5.6-alpha.35", "@budibase/types": "2.5.6-alpha.41",
"@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",

View File

@ -1486,15 +1486,15 @@
pouchdb-promise "^6.0.4" pouchdb-promise "^6.0.4"
through2 "^2.0.0" through2 "^2.0.0"
"@budibase/pro@2.5.6-alpha.34": "@budibase/pro@2.5.6-alpha.40":
version "2.5.6-alpha.34" version "2.5.6-alpha.40"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.34.tgz#b992dd7830479e1e869c03fedc11b552d0cea2ca" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.6-alpha.40.tgz#96e85d22b61425bfd055377864938245c6ef17ec"
integrity sha512-mK/gVZuR+3USPQidTq+xSm0H5VRX2/DgWNOoDp2b8XzrHeTDPV/Qy7yJd3Cxidemk25+ddwbU/VRrPMa+6PKSw== integrity sha512-hWKPVbGbjWcO3evIViICOL6g4hsv051lwUqCLRdZnSIiKCPlrr5JSsiINFinMHof55rHK5LALbGzJL4Ju82UeQ==
dependencies: dependencies:
"@budibase/backend-core" "2.5.6-alpha.34" "@budibase/backend-core" "2.5.6-alpha.40"
"@budibase/shared-core" "2.4.44-alpha.1" "@budibase/shared-core" "2.4.44-alpha.1"
"@budibase/string-templates" "2.4.44-alpha.1" "@budibase/string-templates" "2.4.44-alpha.1"
"@budibase/types" "2.5.6-alpha.34" "@budibase/types" "2.5.6-alpha.40"
"@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"