merge with master
This commit is contained in:
commit
d0ad7bbb67
|
@ -4,8 +4,6 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
|
||||
BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
CI: true
|
||||
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
REGISTRY_URL: registry.hub.docker.com
|
||||
|
@ -17,6 +15,11 @@ jobs:
|
|||
matrix:
|
||||
node-version: [14.x]
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
|
@ -28,8 +31,6 @@ jobs:
|
|||
- name: Setup Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Install Pro
|
||||
run: yarn install:pro $BRANCH $BASE_BRANCH
|
||||
- name: Run Yarn
|
||||
run: yarn
|
||||
- name: Run Yarn Bootstrap
|
||||
|
|
|
@ -3,10 +3,6 @@ name: Budibase Release Selfhost
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -54,9 +50,6 @@ jobs:
|
|||
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
||||
SELFHOST_TAG: latest
|
||||
|
||||
- name: Install Pro
|
||||
run: yarn install:pro $BRANCH $BASE_BRANCH
|
||||
|
||||
- name: Bootstrap and build (CLI)
|
||||
run: |
|
||||
yarn
|
||||
|
|
|
@ -78,6 +78,8 @@ spec:
|
|||
key: objectStoreSecret
|
||||
- name: MINIO_URL
|
||||
value: {{ .Values.services.objectStore.url }}
|
||||
- name: PLUGIN_BUCKET_NAME
|
||||
value: {{ .Values.services.objectStore.pluginBucketName | default "plugins" | quote }}
|
||||
- name: PORT
|
||||
value: {{ .Values.services.apps.port | quote }}
|
||||
{{ if .Values.services.worker.publicApiRateLimitPerSecond }}
|
||||
|
|
|
@ -77,6 +77,8 @@ spec:
|
|||
key: objectStoreSecret
|
||||
- name: MINIO_URL
|
||||
value: {{ .Values.services.objectStore.url }}
|
||||
- name: PLUGIN_BUCKET_NAME
|
||||
value: {{ .Values.services.objectStore.pluginBucketName | default "plugins" | quote }}
|
||||
- name: PORT
|
||||
value: {{ .Values.services.worker.port | quote }}
|
||||
- name: MULTI_TENANCY
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
@ -15,4 +15,4 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"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.4.8-alpha.13",
|
||||
"@budibase/types": "^1.4.17",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-sdk": "2.1030.0",
|
||||
|
@ -82,4 +82,4 @@
|
|||
"typescript": "4.7.3"
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -226,6 +226,10 @@ export const getAppId = () => {
|
|||
}
|
||||
}
|
||||
|
||||
export const isTenancyEnabled = () => {
|
||||
return env.MULTI_TENANCY
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the app database based on whatever the request
|
||||
* contained, dev or prod.
|
||||
|
|
|
@ -16,6 +16,15 @@ if (!LOADED && isDev() && !isTest()) {
|
|||
LOADED = true
|
||||
}
|
||||
|
||||
const DefaultBucketName = {
|
||||
BACKUPS: "backups",
|
||||
APPS: "prod-budi-app-assets",
|
||||
TEMPLATES: "templates",
|
||||
GLOBAL: "global",
|
||||
CLOUD: "prod-budi-tenant-uploads",
|
||||
PLUGINS: "plugins",
|
||||
}
|
||||
|
||||
const env = {
|
||||
isTest,
|
||||
isDev,
|
||||
|
@ -45,13 +54,17 @@ const env = {
|
|||
POSTHOG_TOKEN: process.env.POSTHOG_TOKEN,
|
||||
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
|
||||
TENANT_FEATURE_FLAGS: process.env.TENANT_FEATURE_FLAGS,
|
||||
BACKUPS_BUCKET_NAME: process.env.BACKUPS_BUCKET_NAME || "backups",
|
||||
APPS_BUCKET_NAME: process.env.APPS_BUCKET_NAME || "prod-budi-app-assets",
|
||||
TEMPLATES_BUCKET_NAME: process.env.TEMPLATES_BUCKET_NAME || "templates",
|
||||
GLOBAL_BUCKET_NAME: process.env.GLOBAL_BUCKET_NAME || "global",
|
||||
BACKUPS_BUCKET_NAME:
|
||||
process.env.BACKUPS_BUCKET_NAME || DefaultBucketName.BACKUPS,
|
||||
APPS_BUCKET_NAME: process.env.APPS_BUCKET_NAME || DefaultBucketName.APPS,
|
||||
TEMPLATES_BUCKET_NAME:
|
||||
process.env.TEMPLATES_BUCKET_NAME || DefaultBucketName.TEMPLATES,
|
||||
GLOBAL_BUCKET_NAME:
|
||||
process.env.GLOBAL_BUCKET_NAME || DefaultBucketName.GLOBAL,
|
||||
GLOBAL_CLOUD_BUCKET_NAME:
|
||||
process.env.GLOBAL_CLOUD_BUCKET_NAME || "prod-budi-tenant-uploads",
|
||||
PLUGIN_BUCKET_NAME: process.env.PLUGIN_BUCKET_NAME || "plugins",
|
||||
process.env.GLOBAL_CLOUD_BUCKET_NAME || DefaultBucketName.CLOUD,
|
||||
PLUGIN_BUCKET_NAME:
|
||||
process.env.PLUGIN_BUCKET_NAME || DefaultBucketName.PLUGINS,
|
||||
USE_COUCH: process.env.USE_COUCH || true,
|
||||
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
||||
DEFAULT_LICENSE: process.env.DEFAULT_LICENSE,
|
||||
|
|
|
@ -33,4 +33,8 @@ export const DEFINITIONS: MigrationDefinition[] = [
|
|||
type: MigrationType.GLOBAL,
|
||||
name: MigrationName.GLOBAL_INFO_SYNC_USERS,
|
||||
},
|
||||
{
|
||||
type: MigrationType.GLOBAL,
|
||||
name: MigrationName.PLUGIN_COUNT,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -2,6 +2,11 @@ const { join } = require("path")
|
|||
const { tmpdir } = require("os")
|
||||
const env = require("../environment")
|
||||
|
||||
/****************************************************
|
||||
* NOTE: When adding a new bucket - name *
|
||||
* sure that S3 usages (like budibase-infra) *
|
||||
* have been updated to have a unique bucket name. *
|
||||
****************************************************/
|
||||
exports.ObjectStoreBuckets = {
|
||||
BACKUPS: env.BACKUPS_BUCKET_NAME,
|
||||
APPS: env.APPS_BUCKET_NAME,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"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.4.8-alpha.13",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@spectrum-css/actionbutton": "^1.0.1",
|
||||
"@spectrum-css/actiongroup": "^1.0.1",
|
||||
"@spectrum-css/avatar": "^3.0.2",
|
||||
|
@ -86,4 +86,4 @@
|
|||
"svelte-portal": "^1.0.0"
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -65,6 +65,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
$: showDropzone =
|
||||
(!maximum || (maximum && value?.length < maximum)) && !disabled
|
||||
|
||||
async function processFileList(fileList) {
|
||||
if (
|
||||
handleFileTooLarge &&
|
||||
|
@ -211,7 +214,7 @@
|
|||
{/each}
|
||||
{/if}
|
||||
{/if}
|
||||
{#if !maximum || (maximum && value?.length < maximum)}
|
||||
{#if showDropzone}
|
||||
<div
|
||||
class="spectrum-Dropzone"
|
||||
class:is-invalid={!!error}
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
target="_blank"
|
||||
download={attachment.name}
|
||||
href={attachment.url}
|
||||
on:click={e => {
|
||||
e.stopPropagation()
|
||||
}}
|
||||
>
|
||||
<div class="center" title={attachment.name}>
|
||||
<img src={attachment.url} alt={attachment.extension} />
|
||||
|
@ -32,6 +35,9 @@
|
|||
target="_blank"
|
||||
download={attachment.name}
|
||||
href={attachment.url}
|
||||
on:click={e => {
|
||||
e.stopPropagation()
|
||||
}}
|
||||
>
|
||||
{attachment.extension}
|
||||
</Link>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -71,10 +71,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "1.4.8-alpha.13",
|
||||
"@budibase/client": "1.4.8-alpha.13",
|
||||
"@budibase/frontend-core": "1.4.8-alpha.13",
|
||||
"@budibase/string-templates": "1.4.8-alpha.13",
|
||||
"@budibase/bbui": "^1.4.17",
|
||||
"@budibase/client": "^1.4.17",
|
||||
"@budibase/frontend-core": "^1.4.17",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
@ -123,4 +123,4 @@
|
|||
"vite": "^3.0.8"
|
||||
},
|
||||
"gitHead": "115189f72a850bfb52b65ec61d932531bf327072"
|
||||
}
|
||||
}
|
|
@ -113,8 +113,9 @@
|
|||
|
||||
// Extract all outputs from all previous steps as available bindins
|
||||
let bindings = []
|
||||
let loopBlockCount = 0
|
||||
for (let idx = 0; idx < blockIdx; idx++) {
|
||||
let wasLoopBlock = allSteps[idx]?.stepId === ActionStepID.LOOP
|
||||
let wasLoopBlock = allSteps[idx - 1]?.stepId === ActionStepID.LOOP
|
||||
let isLoopBlock =
|
||||
allSteps[idx]?.stepId === ActionStepID.LOOP &&
|
||||
allSteps.find(x => x.blockToLoop === block.id)
|
||||
|
@ -122,7 +123,8 @@
|
|||
// If the previous block was a loop block, decerement the index so the following
|
||||
// steps are in the correct order
|
||||
if (wasLoopBlock) {
|
||||
blockIdx--
|
||||
loopBlockCount++
|
||||
continue
|
||||
}
|
||||
|
||||
let schema = allSteps[idx]?.schema?.outputs?.properties ?? {}
|
||||
|
@ -143,8 +145,8 @@
|
|||
let runtimeName = isLoopBlock
|
||||
? `loop.${name}`
|
||||
: block.name.startsWith("JS")
|
||||
? `steps[${idx}].${name}`
|
||||
: `steps.${idx}.${name}`
|
||||
? `steps[${idx - loopBlockCount}].${name}`
|
||||
: `steps.${idx - loopBlockCount}.${name}`
|
||||
const runtime = idx === 0 ? `trigger.${name}` : runtimeName
|
||||
return {
|
||||
label: runtime,
|
||||
|
@ -155,7 +157,7 @@
|
|||
? "Trigger outputs"
|
||||
: isLoopBlock
|
||||
? "Loop Outputs"
|
||||
: `Step ${idx} outputs`,
|
||||
: `Step ${idx - loopBlockCount} outputs`,
|
||||
path: runtime,
|
||||
}
|
||||
})
|
||||
|
@ -229,6 +231,7 @@
|
|||
{bindings}
|
||||
{schemaFields}
|
||||
panel={AutomationBindingPanel}
|
||||
fillWidth
|
||||
/>
|
||||
</Drawer>
|
||||
{:else if value.customType === "password"}
|
||||
|
|
|
@ -90,6 +90,16 @@
|
|||
if (inSchema(toTable, toRelate.name, originalToName)) {
|
||||
errObj.toCol = colError
|
||||
}
|
||||
|
||||
let fromType, toType
|
||||
if (fromPrimary && fromRelate.fieldName) {
|
||||
fromType = fromTable?.schema[fromPrimary]?.type
|
||||
toType = toTable?.schema[fromRelate.fieldName]?.type
|
||||
}
|
||||
if (fromType && toType && fromType !== toType) {
|
||||
errObj.foreign =
|
||||
"Column type of the foreign key must match the primary key"
|
||||
}
|
||||
errors = errObj
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
return
|
||||
}
|
||||
hoverTarget = {
|
||||
title: binding.display.name || binding.fieldSchema.name,
|
||||
title: binding.display?.name || binding.fieldSchema.name,
|
||||
description: binding.description,
|
||||
}
|
||||
popover.show()
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
{
|
||||
readableBinding: "Value",
|
||||
runtimeBinding: "[value]",
|
||||
category: `Column: ${column.name}`,
|
||||
icon: "TableColumnMerge",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
export let panel = ClientBindingPanel
|
||||
export let allowBindings = true
|
||||
export let allOr = false
|
||||
export let fillWidth = false
|
||||
|
||||
$: dispatch("change", filters)
|
||||
$: enrichedSchemaFields = getFields(schemaFields || [])
|
||||
|
@ -177,6 +178,7 @@
|
|||
{panel}
|
||||
{bindings}
|
||||
on:change={event => (filter.value = event.detail)}
|
||||
{fillWidth}
|
||||
/>
|
||||
{:else if ["string", "longform", "number", "formula"].includes(filter.type)}
|
||||
<Input disabled={filter.noValue} bind:value={filter.value} />
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</script>
|
||||
|
||||
<div class="title" data-cy={`${app.devId}`}>
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<div class="app-icon" style="color: {app.icon?.color || ''}">
|
||||
<Icon size="XL" name={app.icon?.name || "Apps"} />
|
||||
</div>
|
||||
|
@ -61,6 +61,11 @@
|
|||
</div>
|
||||
|
||||
<style>
|
||||
div.title,
|
||||
div.title > div {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
}
|
||||
.app-row-actions {
|
||||
grid-gap: var(--spacing-s);
|
||||
display: flex;
|
||||
|
|
|
@ -477,9 +477,10 @@
|
|||
.appTable :global(> div) {
|
||||
border-bottom: var(--border-light);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.appTable {
|
||||
grid-template-columns: 1fr auto;
|
||||
grid-template-columns: 1fr auto !important;
|
||||
}
|
||||
}
|
||||
.empty-wrapper {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
@ -26,9 +26,9 @@
|
|||
"outputPath": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "1.4.8-alpha.13",
|
||||
"@budibase/string-templates": "1.4.8-alpha.13",
|
||||
"@budibase/types": "1.4.8-alpha.13",
|
||||
"@budibase/backend-core": "^1.4.17",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@budibase/types": "^1.4.17",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
@ -52,4 +52,4 @@
|
|||
"eslint": "^7.20.0",
|
||||
"renamer": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"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.4.8-alpha.13",
|
||||
"@budibase/frontend-core": "1.4.8-alpha.13",
|
||||
"@budibase/string-templates": "1.4.8-alpha.13",
|
||||
"@budibase/bbui": "^1.4.17",
|
||||
"@budibase/frontend-core": "^1.4.17",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
@ -59,4 +59,4 @@
|
|||
"rollup-plugin-visualizer": "^5.5.4"
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
import { builderStore } from "./stores/index.js"
|
||||
import { builderStore, environmentStore } from "./stores/index.js"
|
||||
import { get } from "svelte/store"
|
||||
import { io } from "socket.io-client"
|
||||
|
||||
export const initWebsocket = () => {
|
||||
const { inBuilder, location } = get(builderStore)
|
||||
const { cloud } = get(environmentStore)
|
||||
|
||||
// Only connect when we're inside the builder preview, for now
|
||||
if (!inBuilder || !location) {
|
||||
if (!inBuilder || !location || cloud) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -17,6 +18,14 @@ export const initWebsocket = () => {
|
|||
const port = location.port || (tls ? 443 : 80)
|
||||
const socket = io(`${proto}//${host}:${port}`, {
|
||||
path: "/socket/client",
|
||||
// Cap reconnection attempts to 10 (total of 95 seconds before giving up)
|
||||
reconnectionAttempts: 10,
|
||||
// Delay initial reconnection attempt by 5 seconds
|
||||
reconnectionDelay: 5000,
|
||||
// Then decrease to 10 second intervals
|
||||
reconnectionDelayMax: 10000,
|
||||
// Timeout after 5 seconds so we never stack requests
|
||||
timeout: 5000,
|
||||
})
|
||||
|
||||
// Event handlers
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "1.4.8-alpha.13",
|
||||
"@budibase/bbui": "^1.4.17",
|
||||
"lodash": "^4.17.21",
|
||||
"svelte": "^3.46.2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -136,14 +136,12 @@ export default class DataFetch {
|
|||
}
|
||||
|
||||
// Determine what sort type to use
|
||||
if (!this.options.sortType) {
|
||||
let sortType = "string"
|
||||
if (sortColumn) {
|
||||
const type = schema?.[sortColumn]?.type
|
||||
sortType = type === "number" ? "number" : "string"
|
||||
}
|
||||
this.options.sortType = sortType
|
||||
let sortType = "string"
|
||||
if (sortColumn) {
|
||||
const type = schema?.[sortColumn]?.type
|
||||
sortType = type === "number" ? "number" : "string"
|
||||
}
|
||||
this.options.sortType = sortType
|
||||
|
||||
// Build the lucene query
|
||||
let query = this.options.query
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"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.4.8-alpha.13",
|
||||
"@budibase/client": "1.4.8-alpha.13",
|
||||
"@budibase/pro": "1.4.8-alpha.13",
|
||||
"@budibase/string-templates": "1.4.8-alpha.13",
|
||||
"@budibase/types": "1.4.8-alpha.13",
|
||||
"@budibase/backend-core": "^1.4.17",
|
||||
"@budibase/client": "^1.4.17",
|
||||
"@budibase/pro": "1.4.17",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@budibase/types": "^1.4.17",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
@ -200,4 +200,4 @@
|
|||
"oracledb": "5.3.0"
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -299,7 +299,7 @@ const performAppCreate = async (ctx: any) => {
|
|||
})
|
||||
|
||||
// Migrate navigation settings and screens if required
|
||||
if (existing && !existing.navigation) {
|
||||
if (existing) {
|
||||
const navigation = await migrateAppNavigation()
|
||||
if (navigation) {
|
||||
newApplication.navigation = navigation
|
||||
|
@ -597,7 +597,7 @@ const migrateAppNavigation = async () => {
|
|||
// Migrate all screens, removing custom layouts
|
||||
for (let screen of screens) {
|
||||
if (!screen.layoutId) {
|
||||
return
|
||||
continue
|
||||
}
|
||||
const layout = layouts.find(layout => layout._id === screen.layoutId)
|
||||
screen.layoutId = undefined
|
||||
|
@ -611,7 +611,7 @@ const migrateAppNavigation = async () => {
|
|||
const layout = layouts?.find(
|
||||
(layout: Layout) => layout._id === BASE_LAYOUT_PROP_IDS.PRIVATE
|
||||
)
|
||||
if (layout) {
|
||||
if (layout && !existing.navigation) {
|
||||
let navigationSettings: any = {
|
||||
navigation: "Top",
|
||||
title: name,
|
||||
|
|
|
@ -80,7 +80,7 @@ exports.definition = {
|
|||
},
|
||||
success: {
|
||||
type: "boolean",
|
||||
description: "Whether the deletion was successful",
|
||||
description: "Whether the query was successful",
|
||||
},
|
||||
},
|
||||
required: ["rows", "success"],
|
||||
|
|
|
@ -30,6 +30,7 @@ interface MySQLConfig {
|
|||
ssl?: { [key: string]: any }
|
||||
rejectUnauthorized: boolean
|
||||
typeCast: Function
|
||||
multipleStatements: boolean
|
||||
}
|
||||
|
||||
const SCHEMA: Integration = {
|
||||
|
@ -136,6 +137,7 @@ class MySQLIntegration extends Sql implements DatasourcePlus {
|
|||
delete config.rejectUnauthorized
|
||||
this.config = {
|
||||
...config,
|
||||
multipleStatements: true,
|
||||
typeCast: function (field: any, next: any) {
|
||||
if (
|
||||
field.type == "DATETIME" ||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { tenancy, logging } from "@budibase/backend-core"
|
||||
import { plugins } from "@budibase/pro"
|
||||
|
||||
export const run = async () => {
|
||||
try {
|
||||
await tenancy.doInTenant(tenancy.DEFAULT_TENANT_ID, async () => {
|
||||
await plugins.checkPluginQuotas()
|
||||
})
|
||||
} catch (err) {
|
||||
logging.logAlert("Failed to update plugin quotas", err)
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ import * as userEmailViewCasing from "./functions/userEmailViewCasing"
|
|||
import * as quota1 from "./functions/quotas1"
|
||||
import * as appUrls from "./functions/appUrls"
|
||||
import * as backfill from "./functions/backfill"
|
||||
import * as pluginCount from "./functions/pluginCount"
|
||||
|
||||
/**
|
||||
* Populate the migration function and additional configuration from
|
||||
|
@ -68,6 +69,16 @@ export const buildMigrations = () => {
|
|||
})
|
||||
break
|
||||
}
|
||||
case MigrationName.PLUGIN_COUNT: {
|
||||
if (env.SELF_HOSTED) {
|
||||
serverMigrations.push({
|
||||
...definition,
|
||||
fn: pluginCount.run,
|
||||
silent: !!env.SELF_HOSTED,
|
||||
preventRetry: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,12 +1094,21 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
<<<<<<< HEAD
|
||||
"@budibase/backend-core@1.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.8-alpha.13.tgz#961c177f3e9a9cdc035916cfceffebcfb4070126"
|
||||
integrity sha512-zsRcCkiuDFw+uON5jKFxD/S0ecF2hX1zmPFeOa2Jq77QaIT8dkRxlye1jT4fjacRQ9iIf6tYoUUOYFTVFWP8Rw==
|
||||
dependencies:
|
||||
"@budibase/types" "1.4.8-alpha.13"
|
||||
=======
|
||||
"@budibase/backend-core@1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.17.tgz#680e2de7cc4cb598c29438cc00207cb0f8750555"
|
||||
integrity sha512-e4ahZnPnRXTFohD17pkDO1uxP44elbH2RFpvHodQ+jzOQPwi3NWAKi7+3BbagRzoLv7Q9Mq8IhIBZrYLntKS6g==
|
||||
dependencies:
|
||||
"@budibase/types" "^1.4.17"
|
||||
>>>>>>> 3689ab331c6a401647111b0d1d6f9c0f2bb9fa3b
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -1180,6 +1189,7 @@
|
|||
svelte-flatpickr "^3.2.3"
|
||||
svelte-portal "^1.0.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"@budibase/pro@1.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.8-alpha.13.tgz#09162f9afe7d517765933f8b340b51955ccbd7e9"
|
||||
|
@ -1187,6 +1197,15 @@
|
|||
dependencies:
|
||||
"@budibase/backend-core" "1.4.8-alpha.13"
|
||||
"@budibase/types" "1.4.8-alpha.13"
|
||||
=======
|
||||
"@budibase/pro@1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.17.tgz#0648965741e77597a216806aa7e1b71212c87cc1"
|
||||
integrity sha512-2ug6e8dKntOW9Fmxnr++76eV/n7CXlEfUnbVyQM8vixofCPTFBQ1mL6nAg1Cc4dx6x8grhb2o5OIydhgv0bVSQ==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "1.4.17"
|
||||
"@budibase/types" "1.4.17"
|
||||
>>>>>>> 3689ab331c6a401647111b0d1d6f9c0f2bb9fa3b
|
||||
"@koa/router" "8.0.8"
|
||||
joi "17.6.0"
|
||||
node-fetch "^2.6.1"
|
||||
|
@ -1209,10 +1228,17 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
<<<<<<< HEAD
|
||||
"@budibase/types@1.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.8-alpha.13.tgz#471c8c2a438bf05552b54bd1fd9c4254c0a41f08"
|
||||
integrity sha512-YGPxfCc8h3JZY1/OgXZgn7h2r3IM0OJtruwslzdSseLwxtpQm8f1pYFP5IADQygg3mbXa7ZHsOE8Fcx64lOtJw==
|
||||
=======
|
||||
"@budibase/types@1.4.17", "@budibase/types@^1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.17.tgz#ca71fcfe202856d15fe25110edf76d81978a7dd1"
|
||||
integrity sha512-JDJVx/OkvfZmH2z4rqc7qx/XyDiL/DfgGS5U+pHqQXdxO+OapfoT/Lj/X3afnvlzN/lg2h8IERLU2Ns81D2DIw==
|
||||
>>>>>>> 3689ab331c6a401647111b0d1d6f9c0f2bb9fa3b
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
@ -47,4 +47,4 @@
|
|||
"typescript": "^4.5.5"
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -18,4 +18,4 @@
|
|||
"rimraf": "3.0.2",
|
||||
"typescript": "4.7.3"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -46,6 +46,7 @@ export enum MigrationName {
|
|||
EVENT_INSTALLATION_BACKFILL = "event_installation_backfill",
|
||||
GLOBAL_INFO_SYNC_USERS = "global_info_sync_users",
|
||||
PLATFORM_USERS_EMAIL_CASING = "platform_users_email_casing",
|
||||
PLUGIN_COUNT = "plugin_count",
|
||||
}
|
||||
|
||||
export interface MigrationDefinition {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "1.4.8-alpha.13",
|
||||
"version": "1.4.17",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -36,10 +36,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "1.4.8-alpha.13",
|
||||
"@budibase/pro": "1.4.8-alpha.13",
|
||||
"@budibase/string-templates": "1.4.8-alpha.13",
|
||||
"@budibase/types": "1.4.8-alpha.13",
|
||||
"@budibase/backend-core": "^1.4.17",
|
||||
"@budibase/pro": "1.4.17",
|
||||
"@budibase/string-templates": "^1.4.17",
|
||||
"@budibase/types": "^1.4.17",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
@ -105,4 +105,4 @@
|
|||
]
|
||||
},
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc"
|
||||
}
|
||||
}
|
|
@ -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.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.8-alpha.13.tgz#961c177f3e9a9cdc035916cfceffebcfb4070126"
|
||||
integrity sha512-zsRcCkiuDFw+uON5jKFxD/S0ecF2hX1zmPFeOa2Jq77QaIT8dkRxlye1jT4fjacRQ9iIf6tYoUUOYFTVFWP8Rw==
|
||||
"@budibase/backend-core@1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.4.17.tgz#680e2de7cc4cb598c29438cc00207cb0f8750555"
|
||||
integrity sha512-e4ahZnPnRXTFohD17pkDO1uxP44elbH2RFpvHodQ+jzOQPwi3NWAKi7+3BbagRzoLv7Q9Mq8IhIBZrYLntKS6g==
|
||||
dependencies:
|
||||
"@budibase/types" "1.4.8-alpha.13"
|
||||
"@budibase/types" "^1.4.17"
|
||||
"@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.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.8-alpha.13.tgz#09162f9afe7d517765933f8b340b51955ccbd7e9"
|
||||
integrity sha512-l4mDyTTYSP8FapBuT5YPPiDZ1IX6d11Ra+joRWkKcrtPLIsXnigyNEf+ZCtb5CNL+zrOdnNyWmXQZvAvg3DJxg==
|
||||
"@budibase/pro@1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.4.17.tgz#0648965741e77597a216806aa7e1b71212c87cc1"
|
||||
integrity sha512-2ug6e8dKntOW9Fmxnr++76eV/n7CXlEfUnbVyQM8vixofCPTFBQ1mL6nAg1Cc4dx6x8grhb2o5OIydhgv0bVSQ==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "1.4.8-alpha.13"
|
||||
"@budibase/types" "1.4.8-alpha.13"
|
||||
"@budibase/backend-core" "1.4.17"
|
||||
"@budibase/types" "1.4.17"
|
||||
"@koa/router" "8.0.8"
|
||||
joi "17.6.0"
|
||||
node-fetch "^2.6.1"
|
||||
|
||||
"@budibase/types@1.4.8-alpha.13":
|
||||
version "1.4.8-alpha.13"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.8-alpha.13.tgz#471c8c2a438bf05552b54bd1fd9c4254c0a41f08"
|
||||
integrity sha512-YGPxfCc8h3JZY1/OgXZgn7h2r3IM0OJtruwslzdSseLwxtpQm8f1pYFP5IADQygg3mbXa7ZHsOE8Fcx64lOtJw==
|
||||
"@budibase/types@1.4.17", "@budibase/types@^1.4.17":
|
||||
version "1.4.17"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.4.17.tgz#ca71fcfe202856d15fe25110edf76d81978a7dd1"
|
||||
integrity sha512-JDJVx/OkvfZmH2z4rqc7qx/XyDiL/DfgGS5U+pHqQXdxO+OapfoT/Lj/X3afnvlzN/lg2h8IERLU2Ns81D2DIw==
|
||||
|
||||
"@cspotcode/source-map-consumer@0.8.0":
|
||||
version "0.8.0"
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
import TestConfiguration from "../../../config/internal-api/TestConfiguration"
|
||||
import { Application } from "@budibase/server/api/controllers/public/mapping/types"
|
||||
import InternalAPIClient from "../../../config/internal-api/TestConfiguration/InternalAPIClient"
|
||||
|
||||
describe("Internal API - /applications endpoints", () => {
|
||||
const api = new InternalAPIClient()
|
||||
const config = new TestConfiguration<Application>(api)
|
||||
|
||||
beforeAll(async () => {
|
||||
await config.beforeAll()
|
||||
await config.auth.login()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await config.afterAll()
|
||||
})
|
||||
|
||||
// it("POST - Can login", async () => {
|
||||
// // const [response] = await config.auth.login()
|
||||
// expect(response).toHaveStatusCode(200)
|
||||
// })
|
||||
|
||||
it("POST - Create an application", async () => {
|
||||
const [response, app] = await config.applications.create({
|
||||
name: "abc123",
|
||||
url: "/foo",
|
||||
useTemplate: false
|
||||
})
|
||||
expect(response).toHaveStatusCode(200)
|
||||
expect(app._id).toBeDefined()
|
||||
})
|
||||
|
||||
it("POST - Create an application with template", async () => {
|
||||
const [response, app] = await config.applications.create({
|
||||
name: "abc123",
|
||||
url: "/foo",
|
||||
useTemplate: true,
|
||||
templateName: "Car Rental Admin Panel",
|
||||
templateKey: "app/car-rental-admin-panel",
|
||||
templateFile: undefined
|
||||
})
|
||||
const canRender = await config.applications.canRender(app._id)
|
||||
|
||||
expect(canRender).toBe(true)
|
||||
expect(response).toHaveStatusCode(200)
|
||||
expect(app._id).toBeDefined()
|
||||
})
|
||||
})
|
|
@ -32,7 +32,7 @@ describe("Public API - /rows endpoints", () => {
|
|||
expect(row._id).toBeDefined()
|
||||
})
|
||||
|
||||
/*it("POST - Search rows", async () => {
|
||||
it("POST - Search rows", async () => {
|
||||
const [response, rows] = await config.rows.search({
|
||||
query: {
|
||||
string: {
|
||||
|
@ -45,7 +45,7 @@ describe("Public API - /rows endpoints", () => {
|
|||
expect(rows[0]._id).toEqual(config.context._id)
|
||||
expect(rows[0].tableId).toEqual(config.context.tableId)
|
||||
expect(rows[0].testColumn).toEqual(config.context.testColumn)
|
||||
})*/
|
||||
})
|
||||
|
||||
it("GET - Retrieve a row", async () => {
|
||||
const [response, row] = await config.rows.read(config.context._id)
|
||||
|
|
Loading…
Reference in New Issue