Merge branch 'develop' of github.com:Budibase/budibase into new-design-ui
This commit is contained in:
commit
bb866f7cc0
|
@ -7,7 +7,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- new-design-ui
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
@ -60,19 +59,3 @@ jobs:
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
command: yarn test:e2e:ci
|
command: yarn test:e2e:ci
|
||||||
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: eu-west-1
|
|
||||||
|
|
||||||
- name: Upload to S3
|
|
||||||
if: github.ref == 'refs/heads/new-design-ui'
|
|
||||||
run: |
|
|
||||||
tar -czvf new_ui.tar.gz packages/server/builder/assets packages/server/builder/index.html
|
|
||||||
aws s3 cp new_ui.tar.gz s3://prod-budi-app-assets/beta:design_ui/
|
|
||||||
aws s3 cp packages/client/dist/budibase-client.js s3://prod-budi-app-assets/beta:design_ui/budibase-client.js
|
|
||||||
aws cloudfront create-invalidation --distribution-id E3ELKP4RCEHVLW --paths "/beta:design_ui/*"
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
name: Deploy Budibase Single Container Image to DockerHub
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "omnibus-action"
|
||||||
|
- "develop"
|
||||||
|
- "master"
|
||||||
|
- "main"
|
||||||
|
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
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "build"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [14.x]
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: Setup QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- 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
|
||||||
|
run: yarn bootstrap
|
||||||
|
- name: Runt Yarn Lint
|
||||||
|
run: yarn lint
|
||||||
|
- name: Run Yarn Build
|
||||||
|
run: yarn build
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_API_KEY }}
|
||||||
|
- name: Get the latest release version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
release_version=$(cat lerna.json | jq -r '.version')
|
||||||
|
echo $release_version
|
||||||
|
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
|
||||||
|
- name: Tag and release Budibase service docker image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }}
|
||||||
|
file: ./hosting/single/Dockerfile
|
|
@ -122,10 +122,14 @@ spec:
|
||||||
value: {{ .Values.globals.automationMaxIterations | quote }}
|
value: {{ .Values.globals.automationMaxIterations | quote }}
|
||||||
- name: TENANT_FEATURE_FLAGS
|
- name: TENANT_FEATURE_FLAGS
|
||||||
value: {{ .Values.globals.tenantFeatureFlags | quote }}
|
value: {{ .Values.globals.tenantFeatureFlags | quote }}
|
||||||
|
{{ if .Values.globals.bbAdminUserEmail }}
|
||||||
- name: BB_ADMIN_USER_EMAIL
|
- name: BB_ADMIN_USER_EMAIL
|
||||||
value: { { .Values.globals.bbAdminUserEmail | quote } }
|
value: { { .Values.globals.bbAdminUserEmail | quote } }
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Values.globals.bbAdminUserPassword }}
|
||||||
- name: BB_ADMIN_USER_PASSWORD
|
- name: BB_ADMIN_USER_PASSWORD
|
||||||
value: { { .Values.globals.bbAdminUserPassword | quote } }
|
value: { { .Values.globals.bbAdminUserPassword | quote } }
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
image: budibase/apps:{{ .Values.globals.appVersion }}
|
image: budibase/apps:{{ .Values.globals.appVersion }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
@ -34,27 +34,32 @@ ENV \
|
||||||
ARCHITECTURE=amd \
|
ARCHITECTURE=amd \
|
||||||
BUDIBASE_ENVIRONMENT=PRODUCTION \
|
BUDIBASE_ENVIRONMENT=PRODUCTION \
|
||||||
CLUSTER_PORT=80 \
|
CLUSTER_PORT=80 \
|
||||||
COUCHDB_PASSWORD=budibase \
|
|
||||||
COUCHDB_USER=budibase \
|
|
||||||
COUCH_DB_URL=http://budibase:budibase@localhost:5984 \
|
|
||||||
# CUSTOM_DOMAIN=budi001.custom.com \
|
# CUSTOM_DOMAIN=budi001.custom.com \
|
||||||
DEPLOYMENT_ENVIRONMENT=docker \
|
DEPLOYMENT_ENVIRONMENT=docker \
|
||||||
INTERNAL_API_KEY=budibase \
|
|
||||||
JWT_SECRET=testsecret \
|
|
||||||
MINIO_ACCESS_KEY=budibase \
|
|
||||||
MINIO_SECRET_KEY=budibase \
|
|
||||||
MINIO_URL=http://localhost:9000 \
|
MINIO_URL=http://localhost:9000 \
|
||||||
POSTHOG_TOKEN=phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS \
|
POSTHOG_TOKEN=phc_fg5I3nDOf6oJVMHSaycEhpPdlgS8rzXG2r6F2IpxCHS \
|
||||||
REDIS_PASSWORD=budibase \
|
|
||||||
REDIS_URL=localhost:6379 \
|
REDIS_URL=localhost:6379 \
|
||||||
SELF_HOSTED=1 \
|
SELF_HOSTED=1 \
|
||||||
TARGETBUILD=$TARGETBUILD \
|
TARGETBUILD=$TARGETBUILD \
|
||||||
WORKER_PORT=4002 \
|
WORKER_PORT=4002 \
|
||||||
WORKER_URL=http://localhost:4002
|
WORKER_URL=http://localhost:4002 \
|
||||||
|
APPS_URL=http://localhost:4001
|
||||||
|
|
||||||
|
# These secret env variables are generated by the runner at startup
|
||||||
|
# their values can be overriden by the user, they will be written
|
||||||
|
# to the .env file in the /data directory for use later on
|
||||||
|
# REDIS_PASSWORD=budibase \
|
||||||
|
# COUCHDB_PASSWORD=budibase \
|
||||||
|
# COUCHDB_USER=budibase \
|
||||||
|
# COUCH_DB_URL=http://budibase:budibase@localhost:5984 \
|
||||||
|
# INTERNAL_API_KEY=budibase \
|
||||||
|
# JWT_SECRET=testsecret \
|
||||||
|
# MINIO_ACCESS_KEY=budibase \
|
||||||
|
# MINIO_SECRET_KEY=budibase \
|
||||||
|
|
||||||
# install base dependencies
|
# install base dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y software-properties-common wget nginx && \
|
apt-get install -y software-properties-common wget nginx uuid-runtime && \
|
||||||
apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' && \
|
apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main' && \
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
|
@ -66,8 +71,8 @@ RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh &
|
||||||
npm install --global yarn pm2
|
npm install --global yarn pm2
|
||||||
|
|
||||||
# setup nginx
|
# setup nginx
|
||||||
ADD hosting/single/nginx.conf /etc/nginx
|
ADD hosting/single/nginx/nginx.conf /etc/nginx
|
||||||
ADD hosting/single/nginx-default-site.conf /etc/nginx/sites-enabled/default
|
ADD hosting/single/nginx/nginx-default-site.conf /etc/nginx/sites-enabled/default
|
||||||
RUN mkdir -p /var/log/nginx && \
|
RUN mkdir -p /var/log/nginx && \
|
||||||
touch /var/log/nginx/error.log && \
|
touch /var/log/nginx/error.log && \
|
||||||
touch /var/run/nginx.pid
|
touch /var/run/nginx.pid
|
||||||
|
@ -86,13 +91,13 @@ RUN wget https://github.com/cloudant-labs/clouseau/releases/download/2.21.0/clou
|
||||||
|
|
||||||
WORKDIR /opt/clouseau
|
WORKDIR /opt/clouseau
|
||||||
RUN mkdir ./bin
|
RUN mkdir ./bin
|
||||||
ADD hosting/single/clouseau ./bin/
|
ADD hosting/single/clouseau/clouseau ./bin/
|
||||||
ADD hosting/single/log4j.properties hosting/single/clouseau.ini ./
|
ADD hosting/single/clouseau/log4j.properties hosting/single/clouseau/clouseau.ini ./
|
||||||
RUN chmod +x ./bin/clouseau
|
RUN chmod +x ./bin/clouseau
|
||||||
|
|
||||||
# setup CouchDB
|
# setup CouchDB
|
||||||
WORKDIR /opt/couchdb
|
WORKDIR /opt/couchdb
|
||||||
ADD hosting/single/vm.args ./etc/
|
ADD hosting/single/couch/vm.args hosting/single/couch/local.ini ./etc/
|
||||||
|
|
||||||
# setup minio
|
# setup minio
|
||||||
WORKDIR /minio
|
WORKDIR /minio
|
||||||
|
|
|
@ -7,7 +7,7 @@ name=clouseau@127.0.0.1
|
||||||
cookie=monster
|
cookie=monster
|
||||||
|
|
||||||
; the path where you would like to store the search index files
|
; the path where you would like to store the search index files
|
||||||
dir=/opt/couchdb/data/search
|
dir=/data/search
|
||||||
|
|
||||||
; the number of search indexes that can be open simultaneously
|
; the number of search indexes that can be open simultaneously
|
||||||
max_indexes_open=500
|
max_indexes_open=500
|
|
@ -0,0 +1,5 @@
|
||||||
|
; CouchDB Configuration Settings
|
||||||
|
|
||||||
|
[couchdb]
|
||||||
|
database_dir = /data/couch/dbs
|
||||||
|
view_index_dir = /data/couch/views
|
|
@ -88,7 +88,4 @@ server {
|
||||||
gzip_proxied any;
|
gzip_proxied any;
|
||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
declare -a ENV_VARS=("COUCHDB_USER" "COUCHDB_PASSWORD" "MINIO_ACCESS_KEY" "MINIO_SECRET_KEY" "INTERNAL_API_KEY" "JWT_SECRET" "REDIS_PASSWORD")
|
||||||
|
if [ -f "/data/.env" ]; then
|
||||||
|
export $(cat /data/.env | xargs)
|
||||||
|
fi
|
||||||
|
# first randomise any unset environment variables
|
||||||
|
for ENV_VAR in "${ENV_VARS[@]}"
|
||||||
|
do
|
||||||
|
temp=$(eval "echo \$$ENV_VAR")
|
||||||
|
if [[ -z "${temp}" ]]; then
|
||||||
|
eval "export $ENV_VAR=$(uuidgen | sed -e 's/-//g')"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -z "${COUCH_DB_URL}" ]]; then
|
||||||
|
export COUCH_DB_URL=http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984
|
||||||
|
fi
|
||||||
|
if [ ! -f "/data/.env" ]; then
|
||||||
|
touch /data/.env
|
||||||
|
for ENV_VAR in "${ENV_VARS[@]}"
|
||||||
|
do
|
||||||
|
temp=$(eval "echo \$$ENV_VAR")
|
||||||
|
echo "$ENV_VAR=$temp" >> /data/.env
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# make these directories in runner, incase of mount
|
||||||
|
mkdir -p /data/couch/dbs /data/couch/views
|
||||||
|
chown couchdb:couchdb /data/couch /data/couch/dbs /data/couch/views
|
||||||
redis-server --requirepass $REDIS_PASSWORD &
|
redis-server --requirepass $REDIS_PASSWORD &
|
||||||
/opt/clouseau/bin/clouseau &
|
/opt/clouseau/bin/clouseau &
|
||||||
/minio/minio server /minio &
|
/minio/minio server /data/minio &
|
||||||
/docker-entrypoint.sh /opt/couchdb/bin/couchdb &
|
/docker-entrypoint.sh /opt/couchdb/bin/couchdb &
|
||||||
/etc/init.d/nginx restart
|
/etc/init.d/nginx restart
|
||||||
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
|
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
id=$(docker run -t -d -p 80:80 budibase:latest)
|
id=$(docker run -t -d -p 8080:80 budibase:latest)
|
||||||
docker exec -it $id bash
|
docker exec -it $id bash
|
||||||
docker kill $id
|
docker kill $id
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"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",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/types": "^1.0.220-alpha.0",
|
"@budibase/types": "^1.0.220-alpha.2",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-sdk": "2.1030.0",
|
"aws-sdk": "2.1030.0",
|
||||||
"bcrypt": "5.0.1",
|
"bcrypt": "5.0.1",
|
||||||
|
|
|
@ -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": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"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,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "^1.0.220-alpha.0",
|
"@budibase/string-templates": "^1.0.220-alpha.2",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -69,10 +69,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.220-alpha.0",
|
"@budibase/bbui": "^1.0.220-alpha.2",
|
||||||
"@budibase/client": "^1.0.220-alpha.0",
|
"@budibase/client": "^1.0.220-alpha.2",
|
||||||
"@budibase/frontend-core": "^1.0.220-alpha.0",
|
"@budibase/frontend-core": "^1.0.220-alpha.2",
|
||||||
"@budibase/string-templates": "^1.0.220-alpha.0",
|
"@budibase/string-templates": "^1.0.220-alpha.2",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<script>
|
|
||||||
import { Modal, ModalContent, Button } from "@budibase/bbui"
|
|
||||||
import { admin } from "stores/portal"
|
|
||||||
|
|
||||||
let upgradeModal
|
|
||||||
|
|
||||||
const onConfirm = () => {
|
|
||||||
window.open(`${$admin.accountPortalUrl}/portal/install`, "_blank")
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Button
|
|
||||||
on:click={upgradeModal.show}
|
|
||||||
quiet
|
|
||||||
primary
|
|
||||||
size="M"
|
|
||||||
icon="DownloadFromCloud">Self-host Budibase</Button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<Modal bind:this={upgradeModal}>
|
|
||||||
<ModalContent
|
|
||||||
size="M"
|
|
||||||
{onConfirm}
|
|
||||||
title="Self-host Budibase"
|
|
||||||
confirmText="Self-host Budibase"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
Self-host budibase for free to get unlimited apps and more - and it only
|
|
||||||
takes a few minutes!
|
|
||||||
</span>
|
|
||||||
</ModalContent>
|
|
||||||
</Modal>
|
|
|
@ -1,14 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { store, automationStore } from "builderStore"
|
import { store, automationStore } from "builderStore"
|
||||||
import { roles, flags } from "stores/backend"
|
import { roles, flags } from "stores/backend"
|
||||||
import {
|
import { Icon, Tabs, Tab, Heading, notifications } from "@budibase/bbui"
|
||||||
Icon,
|
|
||||||
Tabs,
|
|
||||||
Tab,
|
|
||||||
Heading,
|
|
||||||
notifications,
|
|
||||||
// Banner,
|
|
||||||
} from "@budibase/bbui"
|
|
||||||
import RevertModal from "components/deploy/RevertModal.svelte"
|
import RevertModal from "components/deploy/RevertModal.svelte"
|
||||||
import DeployNavigation from "components/deploy/DeployNavigation.svelte"
|
import DeployNavigation from "components/deploy/DeployNavigation.svelte"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
@ -91,15 +84,6 @@
|
||||||
<div class="loading" />
|
<div class="loading" />
|
||||||
{:then _}
|
{:then _}
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<!-- {#if betaAccess}
|
|
||||||
<Banner
|
|
||||||
extraButtonText="Try New UI (Beta)"
|
|
||||||
extraButtonAction={newDesignUi}
|
|
||||||
>
|
|
||||||
Try the <b>all new</b> budibase design interface. (Not recommended for existing
|
|
||||||
budibase apps)
|
|
||||||
</Banner>
|
|
||||||
{/if} -->
|
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
<div class="topleftnav">
|
<div class="topleftnav">
|
||||||
<Icon
|
<Icon
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
let versionModal
|
let versionModal
|
||||||
let updatingModal
|
let updatingModal
|
||||||
let selfHostPath =
|
|
||||||
"https://docs.budibase.com/docs/hosting-methods#self-host-budibase"
|
|
||||||
|
|
||||||
$: updateAvailable = clientPackage.version !== $store.version
|
$: updateAvailable = clientPackage.version !== $store.version
|
||||||
$: appUrl = `${window.origin}/app${app?.url}`
|
$: appUrl = `${window.origin}/app${app?.url}`
|
||||||
|
@ -86,24 +84,6 @@
|
||||||
</Body>
|
</Body>
|
||||||
</Layout>
|
</Layout>
|
||||||
</span>
|
</span>
|
||||||
<span class="selfhost-section">
|
|
||||||
<Layout gap="XS" paddingY="XXL" paddingX="">
|
|
||||||
<Heading size="S">Self-host Budibase</Heading>
|
|
||||||
<Divider />
|
|
||||||
<Body>
|
|
||||||
Self-host Budibase for free to get unlimited apps and more - and it
|
|
||||||
only takes a few minutes!
|
|
||||||
<div class="page-action">
|
|
||||||
<Button
|
|
||||||
secondary
|
|
||||||
on:click={() => {
|
|
||||||
window.open(selfHostPath, "_blank")
|
|
||||||
}}>Self-host Budibase</Button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</Body>
|
|
||||||
</Layout>
|
|
||||||
</span>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
<VersionModal bind:this={versionModal} hideIcon={true} />
|
<VersionModal bind:this={versionModal} hideIcon={true} />
|
||||||
<Modal bind:this={updatingModal} padding={false} width="600px">
|
<Modal bind:this={updatingModal} padding={false} width="600px">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"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,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.220-alpha.0",
|
"@budibase/bbui": "^1.0.220-alpha.2",
|
||||||
"@budibase/frontend-core": "^1.0.220-alpha.0",
|
"@budibase/frontend-core": "^1.0.220-alpha.2",
|
||||||
"@budibase/string-templates": "^1.0.220-alpha.0",
|
"@budibase/string-templates": "^1.0.220-alpha.2",
|
||||||
"@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,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"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": "^1.0.220-alpha.0",
|
"@budibase/bbui": "^1.0.220-alpha.2",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
network-timeout 100000
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -77,10 +77,10 @@
|
||||||
"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": "^1.0.220-alpha.0",
|
"@budibase/backend-core": "^1.0.220-alpha.2",
|
||||||
"@budibase/client": "^1.0.220-alpha.0",
|
"@budibase/client": "^1.0.220-alpha.2",
|
||||||
"@budibase/pro": "1.0.220-alpha.0",
|
"@budibase/pro": "1.0.220-alpha.2",
|
||||||
"@budibase/string-templates": "^1.0.220-alpha.0",
|
"@budibase/string-templates": "^1.0.220-alpha.2",
|
||||||
"@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",
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
"@babel/core": "7.17.4",
|
"@babel/core": "7.17.4",
|
||||||
"@babel/preset-env": "7.16.11",
|
"@babel/preset-env": "7.16.11",
|
||||||
"@budibase/standard-components": "^0.9.139",
|
"@budibase/standard-components": "^0.9.139",
|
||||||
"@budibase/types": "^1.0.220-alpha.0",
|
"@budibase/types": "^1.0.220-alpha.2",
|
||||||
"@jest/test-sequencer": "24.9.0",
|
"@jest/test-sequencer": "24.9.0",
|
||||||
"@types/apidoc": "0.50.0",
|
"@types/apidoc": "0.50.0",
|
||||||
"@types/bson": "4.2.0",
|
"@types/bson": "4.2.0",
|
||||||
|
|
|
@ -229,11 +229,7 @@ export const fetchAppPackage = async (ctx: any) => {
|
||||||
application,
|
application,
|
||||||
screens,
|
screens,
|
||||||
layouts,
|
layouts,
|
||||||
clientLibPath: clientLibraryPath(
|
clientLibPath: clientLibraryPath(ctx.params.appId, application.version),
|
||||||
ctx.params.appId,
|
|
||||||
application.version,
|
|
||||||
ctx
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,8 @@ const env = require("../../environment")
|
||||||
const { checkSlashesInUrl } = require("../../utilities")
|
const { checkSlashesInUrl } = require("../../utilities")
|
||||||
const { request } = require("../../utilities/workerRequests")
|
const { request } = require("../../utilities/workerRequests")
|
||||||
const { clearLock } = require("../../utilities/redis")
|
const { clearLock } = require("../../utilities/redis")
|
||||||
const {
|
const { Replication, getProdAppID } = require("@budibase/backend-core/db")
|
||||||
Replication,
|
const { DocumentTypes } = require("../../db/utils")
|
||||||
getProdAppID,
|
|
||||||
dangerousGetDB,
|
|
||||||
} = require("@budibase/backend-core/db")
|
|
||||||
const { DocumentTypes, getRowParams } = require("../../db/utils")
|
|
||||||
const { app: appCache } = require("@budibase/backend-core/cache")
|
const { app: appCache } = require("@budibase/backend-core/cache")
|
||||||
const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context")
|
const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context")
|
||||||
const { events } = require("@budibase/backend-core")
|
const { events } = require("@budibase/backend-core")
|
||||||
|
@ -137,50 +133,3 @@ exports.getBudibaseVersion = async ctx => {
|
||||||
}
|
}
|
||||||
await events.installation.versionChecked(version)
|
await events.installation.versionChecked(version)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove as part of beta program
|
|
||||||
exports.checkBetaAccess = async ctx => {
|
|
||||||
// go to the cloud platform if running self hosted
|
|
||||||
if (env.SELF_HOSTED || !env.MULTI_TENANCY) {
|
|
||||||
let baseUrl = ""
|
|
||||||
if (env.ACCOUNT_PORTAL_URL) {
|
|
||||||
baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "")
|
|
||||||
} else {
|
|
||||||
baseUrl = "https://budibase.app"
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await fetch(
|
|
||||||
`${baseUrl}/api/beta/access?email=${ctx.query.email}`
|
|
||||||
)
|
|
||||||
const json = await response.json()
|
|
||||||
ctx.body = json
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const userToCheck = ctx.query.email
|
|
||||||
const BETA_USERS_DB = "app_bb_f9b77d06b9db4e3ca185476ab87a2364"
|
|
||||||
const BETA_USERS_TABLE = "ta_8c2c6df1c03f49cfb6340e85e066dd15"
|
|
||||||
|
|
||||||
try {
|
|
||||||
const db = dangerousGetDB(BETA_USERS_DB)
|
|
||||||
const betaUsers = (
|
|
||||||
await db.allDocs(
|
|
||||||
getRowParams(BETA_USERS_TABLE, null, {
|
|
||||||
include_docs: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
).rows.map(row => row.doc)
|
|
||||||
|
|
||||||
let access = false
|
|
||||||
for (let betaUser of betaUsers) {
|
|
||||||
if (betaUser["Email address"].trim() === userToCheck) {
|
|
||||||
access = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ctx.body = { access }
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err)
|
|
||||||
ctx.body = { access: false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -73,12 +73,7 @@ exports.toggleBetaUiFeature = async function (ctx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.serveBuilder = async function (ctx) {
|
exports.serveBuilder = async function (ctx) {
|
||||||
// Temporary: New Design UI
|
const builderPath = resolve(TOP_LEVEL_PATH, "builder")
|
||||||
const designUiCookie = ctx.cookies.get("beta:design_ui")
|
|
||||||
// TODO: get this from the tmp Dir that we downloaded from MinIO
|
|
||||||
const uiPath = designUiCookie ? "new_design_ui" : "builder"
|
|
||||||
|
|
||||||
let builderPath = resolve(TOP_LEVEL_PATH, uiPath)
|
|
||||||
await send(ctx, ctx.file, { root: builderPath })
|
await send(ctx, ctx.file, { root: builderPath })
|
||||||
if (!ctx.file.includes("assets/")) {
|
if (!ctx.file.includes("assets/")) {
|
||||||
await events.serve.servedBuilder()
|
await events.serve.servedBuilder()
|
||||||
|
|
|
@ -22,6 +22,5 @@ router
|
||||||
.get("/api/dev/version", authorized(BUILDER), controller.getBudibaseVersion)
|
.get("/api/dev/version", authorized(BUILDER), controller.getBudibaseVersion)
|
||||||
.delete("/api/dev/:appId/lock", authorized(BUILDER), controller.clearLock)
|
.delete("/api/dev/:appId/lock", authorized(BUILDER), controller.clearLock)
|
||||||
.post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert)
|
.post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert)
|
||||||
.get("/api/beta/access", controller.checkBetaAccess)
|
|
||||||
|
|
||||||
module.exports = router
|
module.exports = router
|
||||||
|
|
|
@ -54,13 +54,8 @@ exports.objectStoreUrl = () => {
|
||||||
* @return {string} The URL to be inserted into appPackage response or server rendered
|
* @return {string} The URL to be inserted into appPackage response or server rendered
|
||||||
* app index file.
|
* app index file.
|
||||||
*/
|
*/
|
||||||
exports.clientLibraryPath = (appId, version, ctx) => {
|
exports.clientLibraryPath = (appId, version) => {
|
||||||
if (env.isProd()) {
|
if (env.isProd()) {
|
||||||
// TODO: remove - for beta testing UI
|
|
||||||
if (ctx && ctx.cookies.get("beta:design_ui")) {
|
|
||||||
return "https://cdn.budi.live/beta:design_ui/budibase-client.js"
|
|
||||||
}
|
|
||||||
|
|
||||||
let url = `${exports.objectStoreUrl()}/${sanitizeKey(
|
let url = `${exports.objectStoreUrl()}/${sanitizeKey(
|
||||||
appId
|
appId
|
||||||
)}/budibase-client.js`
|
)}/budibase-client.js`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"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": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"description": "Budibase types",
|
"description": "Budibase types",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
network-timeout 100000
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.220-alpha.0",
|
"version": "1.0.220-alpha.2",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -34,9 +34,9 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.0.220-alpha.0",
|
"@budibase/backend-core": "^1.0.220-alpha.2",
|
||||||
"@budibase/pro": "1.0.220-alpha.0",
|
"@budibase/pro": "1.0.220-alpha.2",
|
||||||
"@budibase/string-templates": "^1.0.220-alpha.0",
|
"@budibase/string-templates": "^1.0.220-alpha.2",
|
||||||
"@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",
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
"server-destroy": "1.0.1"
|
"server-destroy": "1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@budibase/types": "^1.0.220-alpha.0",
|
"@budibase/types": "^1.0.220-alpha.2",
|
||||||
"@types/jest": "26.0.23",
|
"@types/jest": "26.0.23",
|
||||||
"@types/koa": "2.13.4",
|
"@types/koa": "2.13.4",
|
||||||
"@types/koa-router": "7.4.4",
|
"@types/koa-router": "7.4.4",
|
||||||
|
|
|
@ -60,11 +60,13 @@ export const adminUser = async (ctx: any) => {
|
||||||
tenantId,
|
tenantId,
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
// always bust checklist beforehand, if an error occurs but can proceed, don't get
|
||||||
|
// stuck in a cycle
|
||||||
|
await cache.bustCache(cache.CacheKeys.CHECKLIST)
|
||||||
const finalUser = await users.save(user, {
|
const finalUser = await users.save(user, {
|
||||||
hashPassword,
|
hashPassword,
|
||||||
requirePassword,
|
requirePassword,
|
||||||
})
|
})
|
||||||
await cache.bustCache(cache.CacheKeys.CHECKLIST)
|
|
||||||
|
|
||||||
// events
|
// events
|
||||||
let account: CloudAccount | undefined
|
let account: CloudAccount | undefined
|
||||||
|
|
Loading…
Reference in New Issue