Merge remote-tracking branch 'origin/develop' into feature/binding-ux-update

This commit is contained in:
Dean 2022-08-22 23:09:03 +01:00
commit 6eb187f706
22 changed files with 167 additions and 71 deletions

View File

@ -1,4 +1,4 @@
name: Budibase Smoke Test
name: Budibase Nightly Tests
on:
workflow_dispatch:
@ -6,7 +6,7 @@ on:
- cron: "0 5 * * *" # every day at 5AM
jobs:
release:
nightly:
runs-on: ubuntu-latest
steps:
@ -43,6 +43,18 @@ jobs:
name: Test Reports
path: packages/builder/cypress/reports/testReport.html
# TODO: enable once running in QA test env
# - 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 test results HTML
# uses: aws-actions/configure-aws-credentials@v1
# run: aws s3 cp packages/builder/cypress/reports/testReport.html s3://{{ secrets.BUDI_QA_REPORTS_BUCKET_NAME }}/$GITHUB_RUN_ID/index.html
- name: Cypress Discord Notify
run: yarn test:e2e:ci:notify
env:

View File

@ -1,5 +1,5 @@
{
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"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.2.44-alpha.1",
"@budibase/types": "1.2.44-alpha.2",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"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.2.44-alpha.1",
"@budibase/string-templates": "1.2.44-alpha.2",
"@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.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -13,11 +13,11 @@
"cy:setup:ci": "node ./cypress/setup.js",
"cy:open": "cypress open",
"cy:run": "cypress run",
"cy:run:ci": "cypress run --headed --browser chrome --spec cypress/integration/createApp.spec.js",
"cy:run:ci": "cypress run --headed --browser chrome --spec cypress/integration/createApp.spec.js",
"cy:run:ci:record": "xvfb-run cypress run --headed --browser chrome --record",
"cy:test": "start-server-and-test cy:setup http://localhost:4100/builder cy:run",
"cy:ci": "start-server-and-test cy:setup:ci http://localhost:4100/builder cy:run:ci",
"cy:ci:record": "start-server-and-test cy:setup:ci http://localhost:4100/builder cy:run:ci:record && npm run cy:ci:report",
"cy:ci:record": "start-server-and-test cy:setup:ci http://localhost:4100/builder cy:run:ci:record; npm run cy:ci:report",
"cy:ci:report": "mochawesome-merge cypress/reports/*.json > cypress/reports/testReport.json && marge cypress/reports/testReport.json --reportDir cypress/reports --inline",
"cy:ci:notify": "node scripts/cypressResultsWebhook",
"cy:debug": "start-server-and-test cy:setup http://localhost:4100/builder cy:open",
@ -69,10 +69,10 @@
}
},
"dependencies": {
"@budibase/bbui": "1.2.44-alpha.1",
"@budibase/client": "1.2.44-alpha.1",
"@budibase/frontend-core": "1.2.44-alpha.1",
"@budibase/string-templates": "1.2.44-alpha.1",
"@budibase/bbui": "1.2.44-alpha.2",
"@budibase/client": "1.2.44-alpha.2",
"@budibase/frontend-core": "1.2.44-alpha.2",
"@budibase/string-templates": "1.2.44-alpha.2",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -5,7 +5,6 @@ const path = require("path")
const fs = require("fs")
const WEBHOOK_URL = process.env.CYPRESS_WEBHOOK_URL
const OUTCOME = process.env.CYPRESS_OUTCOME
const DASHBOARD_URL = process.env.CYPRESS_DASHBOARD_URL
const GIT_SHA = process.env.GITHUB_SHA
const GITHUB_ACTIONS_RUN_URL = process.env.GITHUB_ACTIONS_RUN_URL
@ -35,6 +34,8 @@ async function discordCypressResultsNotification(report) {
skipped,
} = report.stats
const OUTCOME = failures > 0 ? "failure" : "success"
const options = {
method: "POST",
headers: {
@ -114,7 +115,7 @@ async function discordCypressResultsNotification(report) {
}
const response = await fetch(WEBHOOK_URL, options)
if (response.status >= 400) {
if (response.status >= 201) {
const text = await response.text()
console.error(
`Error sending discord webhook. \nStatus: ${response.status}. \nResponse Body: ${text}. \nRequest Body: ${options.body}`

View File

@ -40,6 +40,7 @@ const INITIAL_FRONTEND_STATE = {
devicePreview: false,
messagePassing: false,
continueIfAction: false,
showNotificationAction: false,
},
errors: [],
hasAppPackage: false,

View File

@ -0,0 +1,61 @@
<script>
import { Select, Label, Checkbox } from "@budibase/bbui"
import { onMount } from "svelte"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
export let parameters
export let bindings = []
const types = [
{
label: "Success",
value: "success",
},
{
label: "Warning",
value: "warning",
},
{
label: "Error",
value: "error",
},
{
label: "Info",
value: "info",
},
]
onMount(() => {
if (!parameters.type) {
parameters.type = "success"
}
if (parameters.autoDismiss == null) {
parameters.autoDismiss = true
}
})
</script>
<div class="root">
<Label>Type</Label>
<Select bind:value={parameters.type} options={types} placeholder={null} />
<Label>Message</Label>
<DrawerBindableInput
{bindings}
value={parameters.message}
on:change={e => (parameters.message = e.detail)}
/>
<Label />
<Checkbox text="Auto dismiss" bind:value={parameters.autoDismiss} />
</div>
<style>
.root {
display: grid;
column-gap: var(--spacing-l);
row-gap: var(--spacing-s);
grid-template-columns: 60px 1fr;
align-items: center;
max-width: 400px;
margin: 0 auto;
}
</style>

View File

@ -15,3 +15,4 @@ export { default as S3Upload } from "./S3Upload.svelte"
export { default as ExportData } from "./ExportData.svelte"
export { default as ContinueIf } from "./ContinueIf.svelte"
export { default as UpdateFieldValue } from "./UpdateFieldValue.svelte"
export { default as ShowNotification } from "./ShowNotification.svelte"

View File

@ -110,6 +110,12 @@
"type": "logic",
"component": "ContinueIf",
"dependsOnFeature": "continueIfAction"
},
{
"name": "Show Notification",
"type": "application",
"component": "ShowNotification",
"dependsOnFeature": "showNotificationAction"
}
]
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View File

@ -8,7 +8,8 @@
"devicePreview": true,
"messagePassing": true,
"rowSelection": true,
"continueIfAction": true
"continueIfAction": true,
"showNotificationAction": true
},
"layout": {
"name": "Layout",

View File

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

View File

@ -62,10 +62,14 @@ const createNotificationStore = () => {
subscribe: store.subscribe,
actions: {
send,
info: msg => send(msg, "info", "Info"),
success: msg => send(msg, "success", "CheckmarkCircle"),
warning: msg => send(msg, "warning", "Alert"),
error: msg => send(msg, "error", "Alert", false),
info: (msg, autoDismiss) =>
send(msg, "info", "Info", autoDismiss ?? true),
success: (msg, autoDismiss) =>
send(msg, "success", "CheckmarkCircle", autoDismiss ?? true),
warning: (msg, autoDismiss) =>
send(msg, "warning", "Alert", autoDismiss ?? true),
error: (msg, autoDismiss) =>
send(msg, "error", "Alert", autoDismiss ?? false),
blockNotifications,
dismiss,
},

View File

@ -300,6 +300,14 @@ const continueIfHandler = action => {
}
}
const showNotificationHandler = action => {
const { message, type, autoDismiss } = action.parameters
if (!message || !type) {
return
}
notificationStore.actions[type]?.(message, autoDismiss)
}
const handlerMap = {
["Save Row"]: saveRowHandler,
["Duplicate Row"]: duplicateRowHandler,
@ -318,6 +326,7 @@ const handlerMap = {
["Upload File to S3"]: s3UploadHandler,
["Export Data"]: exportDataHandler,
["Continue if / Stop if"]: continueIfHandler,
["Show Notification"]: showNotificationHandler,
}
const confirmTextMap = {

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"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.2.44-alpha.1",
"@budibase/client": "1.2.44-alpha.1",
"@budibase/pro": "1.2.44-alpha.1",
"@budibase/string-templates": "1.2.44-alpha.1",
"@budibase/types": "1.2.44-alpha.1",
"@budibase/backend-core": "1.2.44-alpha.2",
"@budibase/client": "1.2.44-alpha.2",
"@budibase/pro": "1.2.44-alpha.2",
"@budibase/string-templates": "1.2.44-alpha.2",
"@budibase/types": "1.2.44-alpha.2",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

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.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.44-alpha.1.tgz#255c8550302ea0d4b10b231519e12021d008ad33"
integrity sha512-9ceN00ioBD5iUc2Wbcs9Pyvh5gaSfkg1v4Qn9QdRwAG36eo3XVK8kiYWF0q0hkzgcTViJw6xq/1jqMa2InKv6g==
"@budibase/backend-core@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.44-alpha.2.tgz#89de0626821308629628d703bc1ee98bc5ae1e8a"
integrity sha512-ZV5ZuuPccPN21Z99XjNvNFVPTRuZC061NOuxAXaX4LIE+o5cwRKStU7mVMVEnj+UPrwAQDYEjON2vTQ5CZd1/w==
dependencies:
"@budibase/types" "1.2.44-alpha.1"
"@budibase/types" "1.2.44-alpha.2"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
@ -1178,13 +1178,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.44-alpha.1.tgz#d9e919b1df96f3d3d5cf37753721d41348279f59"
integrity sha512-KaclS4qv4+hWenvuVwF2HxcPWkrDyR7IVyLKLMVUqCnaMoXMvEOe9KuQ+lXLbsLIBsCsCFkzE/WHsdmoaGqa0g==
"@budibase/pro@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.44-alpha.2.tgz#0f6b3bdd0226f0b077f886ac7cb75cd9207e6909"
integrity sha512-OVNJWFL82z08O3rpE7sTnYa/nrslNMblLgd+M5mo155Q+Lk6tmXFxg49Azoo51AB/S4VLruebt5fVVMGTdQngA==
dependencies:
"@budibase/backend-core" "1.2.44-alpha.1"
"@budibase/types" "1.2.44-alpha.1"
"@budibase/backend-core" "1.2.44-alpha.2"
"@budibase/types" "1.2.44-alpha.2"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1207,10 +1207,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@1.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.44-alpha.1.tgz#6150d4494326438b46dd7354e5dd0fc7fdbfcc49"
integrity sha512-1eLGH5ym4oYbuRZRkD0slNqHlZ1EV0JHLkmoA47i7L/u8E8QRIyDIHyeZKC8ben33oQS4NX3IebD7zZ2JFhgcA==
"@budibase/types@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.44-alpha.2.tgz#9f266436715806bf42a2ab9c21b0af089ce443f3"
integrity sha512-TXZwDsHs6RLA8aIM3MC+MKwpSHZG7hZ9DigKgzpD9UugTPChq+GT+zadKPBe5/bbLuhrhAORqnPea3JLm8P7XQ==
"@bull-board/api@3.7.0":
version "3.7.0"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"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.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"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.2.44-alpha.1",
"version": "1.2.44-alpha.2",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -35,10 +35,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "1.2.44-alpha.1",
"@budibase/pro": "1.2.44-alpha.1",
"@budibase/string-templates": "1.2.44-alpha.1",
"@budibase/types": "1.2.44-alpha.1",
"@budibase/backend-core": "1.2.44-alpha.2",
"@budibase/pro": "1.2.44-alpha.2",
"@budibase/string-templates": "1.2.44-alpha.2",
"@budibase/types": "1.2.44-alpha.2",
"@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.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.44-alpha.1.tgz#255c8550302ea0d4b10b231519e12021d008ad33"
integrity sha512-9ceN00ioBD5iUc2Wbcs9Pyvh5gaSfkg1v4Qn9QdRwAG36eo3XVK8kiYWF0q0hkzgcTViJw6xq/1jqMa2InKv6g==
"@budibase/backend-core@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.44-alpha.2.tgz#89de0626821308629628d703bc1ee98bc5ae1e8a"
integrity sha512-ZV5ZuuPccPN21Z99XjNvNFVPTRuZC061NOuxAXaX4LIE+o5cwRKStU7mVMVEnj+UPrwAQDYEjON2vTQ5CZd1/w==
dependencies:
"@budibase/types" "1.2.44-alpha.1"
"@budibase/types" "1.2.44-alpha.2"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
@ -325,21 +325,21 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@1.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.44-alpha.1.tgz#d9e919b1df96f3d3d5cf37753721d41348279f59"
integrity sha512-KaclS4qv4+hWenvuVwF2HxcPWkrDyR7IVyLKLMVUqCnaMoXMvEOe9KuQ+lXLbsLIBsCsCFkzE/WHsdmoaGqa0g==
"@budibase/pro@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.44-alpha.2.tgz#0f6b3bdd0226f0b077f886ac7cb75cd9207e6909"
integrity sha512-OVNJWFL82z08O3rpE7sTnYa/nrslNMblLgd+M5mo155Q+Lk6tmXFxg49Azoo51AB/S4VLruebt5fVVMGTdQngA==
dependencies:
"@budibase/backend-core" "1.2.44-alpha.1"
"@budibase/types" "1.2.44-alpha.1"
"@budibase/backend-core" "1.2.44-alpha.2"
"@budibase/types" "1.2.44-alpha.2"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@1.2.44-alpha.1":
version "1.2.44-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.44-alpha.1.tgz#6150d4494326438b46dd7354e5dd0fc7fdbfcc49"
integrity sha512-1eLGH5ym4oYbuRZRkD0slNqHlZ1EV0JHLkmoA47i7L/u8E8QRIyDIHyeZKC8ben33oQS4NX3IebD7zZ2JFhgcA==
"@budibase/types@1.2.44-alpha.2":
version "1.2.44-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.44-alpha.2.tgz#9f266436715806bf42a2ab9c21b0af089ce443f3"
integrity sha512-TXZwDsHs6RLA8aIM3MC+MKwpSHZG7hZ9DigKgzpD9UugTPChq+GT+zadKPBe5/bbLuhrhAORqnPea3JLm8P7XQ==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"