Merge branch 'develop' of github.com:Budibase/budibase into labday/transpiler

This commit is contained in:
mike12345567 2022-07-29 16:29:05 +01:00
commit 860b24649a
63 changed files with 1032 additions and 576 deletions

View File

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

View File

@ -26,7 +26,7 @@
"build": "lerna run build",
"build:dev": "lerna run prebuild && tsc --build --watch --preserveWatchOutput",
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish && yarn release:pro",
"release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop && yarn release:pro:develop",
"release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop --exact && yarn release:pro:develop",
"release:pro": "bash scripts/pro/release.sh",
"release:pro:develop": "bash scripts/pro/release.sh develop",
"restore": "yarn run clean && yarn run bootstrap && yarn run build",

View File

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

View File

@ -15,11 +15,22 @@ export function logAlert(message: string, e?: any) {
console.error(`bb-alert: ${message} ${errorJson}`)
}
export function logAlertWithInfo(
message: string,
db: string,
id: string,
error: any
) {
message = `${message} - db: ${db} - doc: ${id} - error: `
logAlert(message, error)
}
export function logWarn(message: string) {
console.warn(`bb-warn: ${message}`)
}
export default {
logAlert,
logAlertWithInfo,
logWarn,
}

View File

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

View File

@ -84,6 +84,7 @@
}
:global([dir="ltr"] .spectrum-ActionButton .spectrum-Icon) {
margin-left: 0;
transition: color ease-out 130ms;
}
.is-selected:not(.spectrum-ActionButton--emphasized) {
background: var(--spectrum-global-color-gray-300);
@ -92,4 +93,10 @@
padding: 0;
min-width: 0;
}
.spectrum-ActionButton--quiet {
padding: 0 8px;
}
.is-selected:not(.emphasized) .spectrum-Icon {
color: var(--spectrum-global-color-gray-900);
}
</style>

View File

@ -87,10 +87,15 @@
on:mousedown={onClick}
>
{#if fieldIcon}
<span class="option-icon">
<span class="option-extra">
<Icon name={fieldIcon} />
</span>
{/if}
{#if fieldColour}
<span class="option-extra">
<StatusLight square color={fieldColour} />
</span>
{/if}
<span
class="spectrum-Picker-label"
class:is-placeholder={isPlaceholder}
@ -108,11 +113,6 @@
<use xlink:href="#spectrum-icon-18-Alert" />
</svg>
{/if}
{#if fieldColour}
<span class="option-colour">
<StatusLight size="L" color={fieldColour} />
</span>
{/if}
<svg
class="spectrum-Icon spectrum-UIIcon-ChevronDown100 spectrum-Picker-menuIcon"
focusable="false"
@ -166,10 +166,15 @@
on:click={() => onSelectOption(getOptionValue(option, idx))}
>
{#if getOptionIcon(option, idx)}
<span class="option-icon">
<span class="option-extra">
<Icon name={getOptionIcon(option, idx)} />
</span>
{/if}
{#if getOptionColour(option, idx)}
<span class="option-extra">
<StatusLight square color={getOptionColour(option, idx)} />
</span>
{/if}
<span class="spectrum-Menu-itemLabel">
{getOptionLabel(option, idx)}
</span>
@ -180,11 +185,6 @@
>
<use xlink:href="#spectrum-css-icon-Checkmark100" />
</svg>
{#if getOptionColour(option, idx)}
<span class="option-colour">
<StatusLight size="L" color={getOptionColour(option, idx)} />
</span>
{/if}
</li>
{/each}
{/if}
@ -209,6 +209,9 @@
width: 100%;
box-shadow: none;
}
.spectrum-Picker-label.auto-width {
margin-right: var(--spacing-xs);
}
.spectrum-Picker-label:not(.auto-width) {
overflow: hidden;
text-overflow: ellipsis;
@ -221,16 +224,16 @@
.spectrum-Picker-label.auto-width.is-placeholder {
padding-right: 2px;
}
.auto-width .spectrum-Menu-item {
padding-right: var(--spacing-xl);
}
/* Icon and colour alignment */
.spectrum-Menu-checkmark {
align-self: center;
margin-top: 0;
}
.option-colour {
padding-left: 8px;
}
.option-icon {
.option-extra {
padding-right: 8px;
}

View File

@ -18,11 +18,16 @@
export let disabled = false
export let active = false
export let color = null
export let square = false
export let hoverable = false
</script>
<div
on:click
class="spectrum-StatusLight spectrum-StatusLight--size{size}"
class:custom={!!color}
class:square
class:hoverable
style={`--color: ${color};`}
class:spectrum-StatusLight--celery={celery}
class:spectrum-StatusLight--yellow={yellow}
@ -54,6 +59,7 @@
min-height: 0;
padding-top: 0;
padding-bottom: 0;
transition: color ease-out 130ms;
}
.spectrum-StatusLight.withText::before {
margin-right: 10px;
@ -61,4 +67,14 @@
.custom::before {
background: var(--color) !important;
}
.square::before {
width: 14px;
height: 14px;
border-radius: 4px;
margin: 0;
}
.hoverable:hover {
cursor: pointer;
color: var(--spectrum-global-color-gray-900);
}
</style>

View File

@ -1,5 +1,4 @@
<script>
import Tooltip from "../Tooltip/Tooltip.svelte"
import Link from "../Link/Link.svelte"
export let value
@ -17,18 +16,16 @@
{#each attachments as attachment}
{#if isImage(attachment.extension)}
<Link quiet target="_blank" href={attachment.url}>
<div class="center">
<div class="center" title={attachment.name}>
<img src={attachment.url} alt={attachment.extension} />
</div>
</Link>
{:else}
<Tooltip text={attachment.name} direction="right">
<div class="file">
<div class="file" title={attachment.name}>
<Link quiet target="_blank" href={attachment.url}>
{attachment.extension}
</Link>
</div>
</Tooltip>
{/if}
{/each}
{#if leftover}
@ -52,7 +49,7 @@
padding: 0 8px;
color: var(--spectrum-global-color-gray-800);
border: 1px solid var(--spectrum-global-color-gray-300);
border-radius: 2px;
border-radius: 4px;
text-transform: uppercase;
font-weight: 600;
font-size: 11px;

View File

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

View File

@ -16,16 +16,19 @@ export const getThemeStore = () => {
return
}
Constants.ThemeOptions.forEach(option => {
// Update global class names to use the new theme and remove others
Constants.Themes.forEach(option => {
themeElement.classList.toggle(
`spectrum--${option}`,
option === state.theme
`spectrum--${option.class}`,
option.class === state.theme
)
// Ensure darkest is always added as this is the base class for custom
// themes
themeElement.classList.add("spectrum--darkest")
})
// Add base theme if required
const selectedTheme = Constants.Themes.find(x => x.class === state.theme)
if (selectedTheme?.base) {
themeElement.classList.add(`spectrum--${selectedTheme.base}`)
}
})
return store

View File

@ -32,7 +32,8 @@
if (!results) {
return {}
}
if (results.outputs?.status?.toLowerCase() === "stopped") {
const lcStatus = results.outputs?.status?.toLowerCase()
if (lcStatus === "stopped" || lcStatus === "stopped_error") {
return { yellow: true, message: "Stopped" }
} else if (results.outputs?.success || isTrigger) {
return { positive: true, message: "Success" }

View File

@ -1,5 +1,5 @@
<script>
import { Icon, StatusLight } from "@budibase/bbui"
import { Icon } from "@budibase/bbui"
import { createEventDispatcher, getContext } from "svelte"
export let icon
@ -14,8 +14,8 @@
export let iconText
export let iconColor
export let scrollable = false
export let color
export let highlighted = false
export let rightAlignIcon = false
const scrollApi = getContext("scroll")
const dispatch = createEventDispatcher()
@ -78,7 +78,7 @@
{iconText}
</div>
{:else if icon}
<div class="icon">
<div class="icon" class:right={rightAlignIcon}>
<Icon color={iconColor} size="S" name={icon} />
</div>
{/if}
@ -88,9 +88,9 @@
<slot />
</div>
{/if}
{#if color}
<div class="light">
<StatusLight size="L" {color} />
{#if $$slots.right}
<div class="right">
<slot name="right" />
</div>
{/if}
</div>
@ -107,7 +107,7 @@
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
align-items: stretch;
}
.nav-item.scrollable {
flex-direction: column;
@ -135,10 +135,8 @@
align-items: center;
gap: var(--spacing-xs);
width: max-content;
overflow: hidden;
position: relative;
padding-left: var(--spacing-l);
pointer-events: none;
}
/* Needed to fully display the actions icon */
@ -153,10 +151,15 @@
justify-content: center;
align-items: center;
color: var(--spectrum-global-color-gray-600);
order: 1;
}
.icon.right {
order: 4;
}
.icon.arrow {
flex: 0 0 20px;
pointer-events: all;
order: 0;
}
.icon.arrow.absolute {
position: absolute;
@ -188,11 +191,14 @@
overflow: hidden;
text-overflow: ellipsis;
flex: 1 1 auto;
color: var(--spectrum-global-color-gray-800);
color: var(--spectrum-global-color-gray-900);
order: 2;
width: 0;
}
.scrollable .text {
flex: 0 0 auto;
max-width: 160px;
width: auto;
}
.actions {
@ -201,18 +207,17 @@
display: grid;
place-items: center;
visibility: hidden;
}
.actions,
.light :global(.spectrum-StatusLight) {
order: 3;
opacity: 0;
width: 20px;
height: 20px;
margin-left: var(--spacing-s);
margin-left: var(--spacing-xs);
}
.light {
position: absolute;
right: 0;
.nav-item.withActions:hover .actions {
opacity: 1;
}
.nav-item.withActions:hover .light {
display: none;
.right {
order: 10;
}
</style>

View File

@ -56,6 +56,10 @@
}
}
const previewApp = () => {
window.open(`/${application}`)
}
const viewApp = () => {
analytics.captureEvent(Events.APP_VIEW_PUBLISHED, {
appId: selectedApp.appId,
@ -174,7 +178,10 @@
Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>?
</ConfirmDialog>
<DeployModal onOk={completePublish} />
<div class="buttons">
<Button on:click={previewApp} newStyles secondary>Preview</Button>
<DeployModal onOk={completePublish} />
</div>
<style>
.publish-popover-actions :global([data-cy="publish-popover-action"]) {
@ -183,4 +190,11 @@
:global([data-cy="publish-popover-menu"]) {
padding: 10px;
}
.buttons {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: var(--spacing-m);
}
</style>

View File

@ -1,11 +1,11 @@
<script>
import {
Icon,
Modal,
notifications,
ModalContent,
Body,
Button,
StatusLight,
} from "@budibase/bbui"
import { store } from "builderStore"
import { API } from "api"
@ -67,17 +67,10 @@
}
</script>
{#if !hideIcon}
<div class="icon-wrapper" class:highlight={updateAvailable}>
<Icon
name="Refresh"
hoverable
on:click={updateModal.show}
tooltip={updateAvailable
? "An update is available"
: "No updates are available"}
/>
</div>
{#if !hideIcon && updateAvailable}
<StatusLight hoverable on:click={updateModal.show} notice>
Update available
</StatusLight>
{/if}
<Modal bind:this={updateModal}>
<ModalContent

View File

@ -3,11 +3,13 @@
export let title
export let icon
export let expandable = false
export let showAddButton = false
export let showBackButton = false
export let showExpandIcon = false
export let showCloseButton = false
export let onClickAddButton
export let onClickBackButton
export let onClickCloseButton
export let borderLeft = false
export let borderRight = false
@ -25,7 +27,7 @@
<div class="title">
<Heading size="XXS">{title || ""}</Heading>
</div>
{#if showExpandIcon}
{#if expandable}
<Icon
name={wide ? "Minimize" : "Maximize"}
hoverable
@ -37,6 +39,9 @@
<Icon name="Add" />
</div>
{/if}
{#if showCloseButton}
<Icon name="Close" hoverable on:click={onClickCloseButton} />
{/if}
</div>
<div class="body">
<slot />

View File

@ -1,5 +1,5 @@
<script>
import { Layout, Icon, ActionButton } from "@budibase/bbui"
import { Layout, Icon, ActionButton, InlineAlert } from "@budibase/bbui"
import StatusRenderer from "./StatusRenderer.svelte"
import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte"
import TestDisplay from "components/automation/AutomationBuilder/TestDisplay.svelte"
@ -9,6 +9,7 @@
export let history
export let appId
export let close
const STOPPED_ERROR = "stopped_error"
$: exists = $automationStore.automations?.find(
auto => auto._id === history?.automationId
@ -32,6 +33,15 @@
<Icon name="JourneyVoyager" />
<div>{history.automationName}</div>
</div>
{#if history.status === STOPPED_ERROR}
<div class="cron-error">
<InlineAlert
type="error"
header="CRON automation disabled"
message="Fix the error and re-publish your app to re-activate."
/>
</div>
{/if}
<div>
{#if exists}
<ActionButton
@ -87,4 +97,10 @@
grid-template-columns: 1fr auto;
gap: var(--spacing-s);
}
.cron-error {
display: flex;
width: 100%;
justify-content: center;
}
</style>

View File

@ -3,7 +3,8 @@
export let value
$: isError = !value || value.toLowerCase() === "error"
$: isStopped = value?.toLowerCase() === "stopped"
$: isStoppedError = value?.toLowerCase() === "stopped_error"
$: isStopped = value?.toLowerCase() === "stopped" || isStoppedError
$: status = getStatus(isError, isStopped)
function getStatus(error, stopped) {

View File

@ -23,10 +23,6 @@
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
)
const previewApp = () => {
window.open(`/${application}`)
}
async function getPackage() {
try {
store.actions.reset()
@ -108,14 +104,10 @@
</Tabs>
</div>
<div class="toprightnav">
<div class="version">
<VersionModal />
</div>
<RevertModal />
<Icon
name="Visibility"
tooltip="Open app preview"
hoverable
on:click={previewApp}
/>
<DeployNavigation {application} />
</div>
</div>
@ -183,4 +175,8 @@
align-items: center;
gap: var(--spacing-xl);
}
.version {
margin-right: var(--spacing-s);
}
</style>

View File

@ -1,10 +1,9 @@
<script>
import DevicePreviewSelect from "./DevicePreviewSelect.svelte"
import AppPreview from "./AppPreview.svelte"
import { store, selectedScreen, sortedScreens } from "builderStore"
import { Button, Select } from "@budibase/bbui"
import { store, sortedScreens } from "builderStore"
import { Select } from "@budibase/bbui"
import { RoleUtils } from "@budibase/frontend-core"
import { goto } from "@roxi/routify"
</script>
<div class="app-panel">
@ -15,24 +14,17 @@
options={$sortedScreens}
getOptionLabel={x => x.routing.route}
getOptionValue={x => x._id}
getOptionIcon={x => (x.routing.homeScreen ? "Home" : "WebPage")}
getOptionColour={x => RoleUtils.getRoleColour(x.routing.roleId)}
value={$store.selectedScreenId}
on:change={e => store.actions.screens.select(e.detail)}
quiet
autoWidth
/>
</div>
<div class="header-right">
{#if $store.clientFeatures.devicePreview}
<DevicePreviewSelect />
{/if}
<Button
newStyles
secondary
icon="Add"
on:click={() => $goto(`../${$selectedScreen._id}/components/new`)}
>
Component
</Button>
</div>
</div>
<div class="content">
@ -59,6 +51,7 @@
justify-content: space-between;
align-items: flex-start;
gap: var(--spacing-l);
margin: 0 2px;
}
.header-left,
.header-right {
@ -69,7 +62,8 @@
gap: var(--spacing-l);
}
.header-left :global(.spectrum-Picker) {
width: 250px;
font-weight: 600;
color: var(--spectrum-global-color-gray-900);
}
.content {
flex: 1 1 auto;

View File

@ -3,6 +3,7 @@
import { onMount, onDestroy } from "svelte"
import {
store,
selectedComponent,
selectedScreen,
selectedLayout,
currentAsset,
@ -14,6 +15,7 @@
Layout,
Heading,
Body,
Icon,
notifications,
} from "@budibase/bbui"
import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw"
@ -96,6 +98,11 @@
$: json = JSON.stringify(previewData)
$: refreshContent(json)
// Determine if the add component menu is active
$: isAddingComponent = $isActive(
`./components/${$selectedComponent?._id}/new`
)
// Update the iframe with the builder info to render the correct preview
const refreshContent = message => {
if (iframe) {
@ -219,6 +226,16 @@
idToDelete = null
}
const toggleAddComponent = () => {
if (isAddingComponent) {
$goto(`../${$selectedScreen._id}/components/${$selectedComponent?._id}`)
} else {
$goto(
`../${$selectedScreen._id}/components/${$selectedComponent?._id}/new`
)
}
}
onMount(() => {
window.addEventListener("message", receiveMessage)
if (!$store.clientFeatures.messagePassing) {
@ -282,6 +299,13 @@
class:tablet={$store.previewDevice === "tablet"}
class:mobile={$store.previewDevice === "mobile"}
/>
<div
class="add-component"
class:active={isAddingComponent}
on:click={toggleAddComponent}
>
<Icon size="XL" name="Add">Component</Icon>
</div>
</div>
<ConfirmDialog
bind:this={confirmDeleteDialog}
@ -343,4 +367,26 @@
width: 100%;
height: 100%;
}
.add-component {
position: absolute;
bottom: 20px;
right: 20px;
width: 60px;
height: 60px;
border-radius: 50%;
background: var(--spectrum-global-color-blue-500);
display: grid;
place-items: center;
color: white;
box-shadow: 1px 3px 8px 0 rgba(0, 0, 0, 0.3);
cursor: pointer;
transition: transform ease-out 300ms, background ease-out 130ms;
}
.add-component:hover {
background: var(--spectrum-global-color-blue-600);
}
.add-component.active {
transform: rotate(-45deg);
}
</style>

View File

@ -3,18 +3,21 @@
import { store } from "builderStore"
</script>
<ActionGroup compact>
<ActionGroup compact quiet>
<ActionButton
quiet
icon="DeviceDesktop"
selected={$store.previewDevice === "desktop"}
on:click={() => store.actions.preview.setDevice("desktop")}
/>
<ActionButton
quiet
icon="DeviceTablet"
selected={$store.previewDevice === "tablet"}
on:click={() => store.actions.preview.setDevice("tablet")}
/>
<ActionButton
quiet
icon="DevicePhone"
selected={$store.previewDevice === "mobile"}
on:click={() => store.actions.preview.setDevice("mobile")}

View File

@ -9,7 +9,7 @@
import { setContext } from "svelte"
import DNDPositionIndicator from "./DNDPositionIndicator.svelte"
import { DropPosition } from "./dndStore"
import { notifications } from "@budibase/bbui"
import { notifications, Button } from "@budibase/bbui"
let scrollRef
@ -24,7 +24,7 @@
let newOffsets = {}
// Calculate left offset
const offsetX = bounds.left + bounds.width + scrollLeft - 58
const offsetX = bounds.left + bounds.width + scrollLeft - 36
if (offsetX > sidebarWidth) {
newOffsets.left = offsetX - sidebarWidth
} else {
@ -71,13 +71,10 @@
})
</script>
<Panel
title="Components"
showAddButton
onClickAddButton={() => $goto("../new")}
showExpandIcon
borderRight
>
<Panel title="Components" showExpandIcon borderRight>
<div class="add-component">
<Button on:click={() => $goto("./new")} cta>Add component</Button>
</div>
<div class="nav-items-container" bind:this={scrollRef}>
<ul>
<li
@ -121,6 +118,13 @@
</Panel>
<style>
.add-component {
padding: var(--spacing-xl) var(--spacing-l);
padding-bottom: 0;
display: flex;
flex-direction: column;
align-items: stretch;
}
.nav-items-container {
padding: var(--spacing-xl) 0;
flex: 1 1 auto;

View File

@ -4,6 +4,8 @@
import * as routify from "@roxi/routify"
import { onDestroy } from "svelte"
import { findComponent } from "builderStore/componentUtils"
import ComponentListPanel from "./_components/navigation/ComponentListPanel.svelte"
import ComponentSettingsPanel from "./_components/settings/ComponentSettingsPanel.svelte"
// Keep URL and state in sync for selected component ID
const stopSyncing = syncURLToState({
@ -18,4 +20,6 @@
onDestroy(stopSyncing)
</script>
<ComponentListPanel />
<ComponentSettingsPanel />
<slot />

View File

@ -1,7 +1,4 @@
<script>
import ComponentListPanel from "./_components/navigation/ComponentListPanel.svelte"
import ComponentSettingsPanel from "./_components/settings/ComponentSettingsPanel.svelte"
</script>
<ComponentListPanel />
<ComponentSettingsPanel />
<!--
Placeholder file so that routify works.
No unique content is needed in this index page.
-->

View File

@ -6,15 +6,14 @@
ActionGroup,
ActionButton,
Search,
DetailSummary,
Icon,
Body,
Divider,
notifications,
} from "@budibase/bbui"
import structure from "./componentStructure.json"
import { store, selectedComponent } from "builderStore"
import { onMount } from "svelte"
import { fly } from "svelte/transition"
let section = "components"
let searchString
@ -150,12 +149,13 @@
})
</script>
<Panel
<div class="container" transition:fly|local={{ x: 260, duration: 300 }}>
<Panel
title="Add component"
showBackButton
onClickBackButton={() => $goto("../slot")}
borderRight
>
showCloseButton
onClickCloseButton={() => $goto("../")}
borderLeft
>
<Layout paddingX="L" paddingY="XL" gap="S">
<Search
placeholder="Search"
@ -177,19 +177,16 @@
>
</ActionGroup>
{/if}
</Layout>
<div>
<Divider noMargin noGrid />
</div>
{#if searchString || section === "components"}
{#if filteredStructure.length}
{#each filteredStructure as category}
<DetailSummary name={category.name} collapsible={false}>
<div class="component-grid">
<Layout noPadding gap="XS">
<div class="category-label">{category.name}</div>
{#each category.children as component}
<div
class="component"
class:wide={component.name?.length > 15}
class:selected={selectedIndex === orderMap[component.component]}
class:selected={selectedIndex ===
orderMap[component.component]}
on:click={() => addComponent(component.component)}
on:mouseover={() => (selectedIndex = null)}
>
@ -197,16 +194,19 @@
<Body size="XS">{component.name}</Body>
</div>
{/each}
</div>
</DetailSummary>
</Layout>
{/each}
{:else}
<Layout paddingX="L" paddingY="XL" gap="S">
<Body size="S">
There aren't any components matching the current filter
</Body>
{/if}
{:else}
<Body size="S">Blocks are collections of pre-built components</Body>
<Layout noPadding gap="XS">
{#each blocks as block}
<div
class="component block"
class="component"
on:click={() => addComponent(block.component)}
>
<Icon name={block.icon} />
@ -214,50 +214,51 @@
</div>
{/each}
</Layout>
</Layout>
{/if}
</Panel>
</Layout>
</Panel>
</div>
<style>
.component-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: var(--spacing-s);
.container {
position: fixed;
right: 0;
z-index: 1;
height: 100%;
display: flex;
flex-direction: row;
align-items: stretch;
}
.category-label {
color: var(--spectrum-global-color-gray-600);
text-transform: uppercase;
font-size: 12px;
font-weight: 600;
margin-top: var(--spacing-xs);
}
.component {
background-color: var(--spectrum-global-color-gray-200);
background: var(--spectrum-global-color-gray-200);
border-radius: 4px;
height: 76px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 0 var(--spacing-s);
gap: var(--spacing-s);
padding-top: 4px;
border: 1px solid var(--spectrum-global-color-gray-200);
transition: border-color 130ms ease-out;
transition: background 130ms ease-out, border-color 130ms ease-out;
flex-direction: row;
justify-content: flex-start;
padding: var(--spacing-s) var(--spacing-l);
gap: var(--spacing-m);
overflow: hidden;
}
.component.wide {
grid-column: span 2;
}
.component.selected,
.component:hover {
.component.selected {
border-color: var(--spectrum-global-color-blue-400);
}
.component:hover {
background: var(--spectrum-global-color-gray-300);
cursor: pointer;
}
.component :global(.spectrum-Body) {
line-height: 1.2 !important;
}
.block {
flex-direction: row;
justify-content: flex-start;
height: 48px;
padding: 0 var(--spacing-l);
gap: var(--spacing-m);
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,5 @@
<script>
import NewComponentPanel from "./_components/NewComponentPanel.svelte"
</script>
<NewComponentPanel />

View File

@ -1,21 +0,0 @@
<script>
import Panel from "components/design/Panel.svelte"
import { Body, Layout } from "@budibase/bbui"
import { selectedComponent, selectedScreen, store } from "builderStore"
$: componentDefinition = store.actions.components.getDefinition(
$selectedComponent?._component
)
$: isScreen = $selectedComponent?._id === $selectedScreen?.props._id
$: title = isScreen ? "Screen" : $selectedComponent?._instanceName
$: position = componentDefinition?.hasChildren ? "inside" : "below"
</script>
<Panel {title} icon={componentDefinition?.icon} borderLeft>
<Layout paddingX="L" paddingY="XL">
<Body size="S">
Components that you add will be placed {position}
{title}
</Body>
</Layout>
</Panel>

View File

@ -1,26 +0,0 @@
<script>
import NewComponentPanel from "./_components/NewComponentPanel.svelte"
import NewComponentTargetPanel from "./_components/NewComponentTargetPanel.svelte"
import { onMount } from "svelte"
import { store, selectedComponent, selectedScreen } from "builderStore"
import { redirect } from "@roxi/routify"
// Select the screen slot as the target to add to, if no component
// is selected
onMount(() => {
if (!$selectedComponent) {
if ($selectedScreen) {
store.update(state => {
state.selectedComponentId = $selectedScreen.props._id
return state
})
} else {
// Otherwise go back out of the add screen
$redirect("../")
}
}
})
</script>
<NewComponentPanel />
<NewComponentTargetPanel />

View File

@ -0,0 +1,58 @@
<script>
import { RoleUtils } from "@budibase/frontend-core"
import { Tooltip, StatusLight } from "@budibase/bbui"
import { roles } from "stores/backend"
import { Roles } from "constants/backend"
export let roleId
let showTooltip = false
$: color = RoleUtils.getRoleColour(roleId)
$: role = $roles.find(role => role._id === roleId)
$: tooltip =
roleId === Roles.PUBLIC
? "This screen is open to the public"
: `Requires at least ${role?.name} access`
</script>
<div
class="container"
on:mouseover={() => (showTooltip = true)}
on:mouseleave={() => (showTooltip = false)}
style="--color: {color};"
>
<StatusLight square {color} />
{#if showTooltip}
<div class="tooltip">
<Tooltip textWrapping text={tooltip} direction="left" />
</div>
{/if}
</div>
<style>
.container {
position: relative;
}
.tooltip {
z-index: 1;
position: absolute;
top: 50%;
left: calc(50% - 8px);
transform: translateX(-100%) translateY(-50%);
display: flex;
flex-direction: row;
justify-content: flex-end;
width: 130px;
pointer-events: none;
}
.tooltip :global(.spectrum-Tooltip) {
background: var(--color);
color: white;
font-weight: 600;
max-width: 130px;
}
.tooltip :global(.spectrum-Tooltip-tip) {
border-top-color: var(--color);
}
</style>

View File

@ -1,11 +1,12 @@
<script>
import { Search, Layout, Select, Body } from "@budibase/bbui"
import { Search, Layout, Select, Body, Button } from "@budibase/bbui"
import Panel from "components/design/Panel.svelte"
import { roles } from "stores/backend"
import { store, sortedScreens } from "builderStore"
import NavItem from "components/common/NavItem.svelte"
import ScreenDropdownMenu from "./ScreenDropdownMenu.svelte"
import ScreenWizard from "./ScreenWizard.svelte"
import RoleIndicator from "./RoleIndicator.svelte"
import { RoleUtils } from "@budibase/frontend-core"
let searchString
@ -28,13 +29,9 @@
}
</script>
<Panel
title="Screens"
showAddButton
onClickAddButton={showNewScreenModal}
borderRight
>
<Panel title="Screens" borderRight>
<Layout paddingX="L" paddingY="XL" gap="S">
<Button on:click={showNewScreenModal} cta>Add screen</Button>
<Search
placeholder="Search"
value={searchString}
@ -56,14 +53,15 @@
</Layout>
{#each filteredScreens as screen (screen._id)}
<NavItem
icon={screen.routing.homeScreen ? "Home" : "WebPage"}
icon={screen.routing.homeScreen ? "Home" : null}
indentLevel={0}
selected={$store.selectedScreenId === screen._id}
text={screen.routing.route}
on:click={() => store.actions.screens.select(screen._id)}
color={RoleUtils.getRoleColour(screen.routing.roleId)}
rightAlignIcon
>
<ScreenDropdownMenu screenId={screen._id} />
<RoleIndicator slot="right" roleId={screen.routing.roleId} />
</NavItem>
{/each}
{#if !filteredScreens?.length}

View File

@ -66,21 +66,26 @@
<Body>
The app is currently using version
<strong>{$store.version}</strong>
but version <strong>{clientPackage.version}</strong> is available.
</Body>
{:else}
<p class="version-status">
The app is currently using version
<strong>{$store.version}</strong>. You're running the latest!
</p>
{/if}
but version <strong>{clientPackage.version}</strong> is
available.
<br />
Updates can contain new features, performance improvements and bug
fixes.
</Body>
<div class="page-action">
<Button cta on:click={versionModal.show()}>Update app</Button>
</div>
{:else}
<div class="version-status">
The app is currently using version
<strong>{$store.version}</strong>. You're running the latest!
</div>
<div class="page-action">
<Button secondary on:click={versionModal.show()}>
Revert app
</Button>
</div>
{/if}
</Body>
</Layout>
</span>

View File

@ -1,7 +1,6 @@
<script>
import { Layout, Heading, Body, Divider, Label, Select } from "@budibase/bbui"
import { themeStore } from "builderStore"
import { capitalise } from "helpers"
import { Constants } from "@budibase/frontend-core"
</script>
@ -15,10 +14,11 @@
<div class="field">
<Label size="L">Builder theme</Label>
<Select
options={Constants.ThemeOptions}
options={Constants.Themes}
bind:value={$themeStore.theme}
placeholder={null}
getOptionLabel={capitalise}
getOptionLabel={x => x.name}
getOptionValue={x => x.class}
/>
</div>
</div>

View File

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

View File

@ -2763,7 +2763,7 @@
},
"longformfield": {
"name": "Long Form Field",
"icon": "AlignLeft",
"icon": "TextAlignLeft",
"styles": [
"size"
],
@ -3737,7 +3737,7 @@
"cardsblock": {
"block": true,
"name": "Cards block",
"icon": "Table",
"icon": "PersonalizationField",
"styles": [
"size"
],

View File

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

View File

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

View File

@ -133,11 +133,31 @@ export const SqlNumberTypeRangeMap = {
},
}
export const ThemeOptions = [
"lightest",
"light",
"dark",
"darkest",
"nord",
"midnight",
export const Themes = [
{
class: "lightest",
name: "Lightest",
},
{
class: "light",
name: "Light",
},
{
class: "dark",
name: "Dark",
},
{
class: "darkest",
name: "Darkest",
},
{
class: "nord",
name: "Nord",
base: "darkest",
},
{
class: "midnight",
name: "Midnight",
base: "darkest",
},
]

View File

@ -32,7 +32,7 @@
--spectrum-global-color-gray-50: #2e3440;
--spectrum-global-color-gray-75: #353b4a;
--spectrum-global-color-gray-100: #3b4252;
--spectrum-global-color-gray-200: #4a5367;
--spectrum-global-color-gray-200: #424a5c;
--spectrum-global-color-gray-300: #4c566a;
--spectrum-global-color-gray-400: #5a657d;
--spectrum-global-color-gray-500: #677590;
@ -41,6 +41,6 @@
--spectrum-global-color-gray-800: #bac1cd;
--spectrum-global-color-gray-900: #eceff4;
--spectrum-alias-highlight-hover: rgba(169, 177, 193, 0.06);
--spectrum-alias-highlight-hover: rgba(169, 177, 193, 0.1);
--spectrum-alias-highlight-active: rgba(169, 177, 193, 0.1);
}

View File

@ -1,6 +1,8 @@
import { Helpers } from "@budibase/bbui"
import { OperatorOptions, SqlNumberTypeRangeMap } from "../constants"
const HBS_REGEX = /{{([^{].*?)}}/g
/**
* Returns the valid operator options for a certain data type
* @param type the data type
@ -98,6 +100,8 @@ export const buildLuceneQuery = filter => {
if (Array.isArray(filter)) {
filter.forEach(expression => {
let { operator, field, type, value, externalType } = expression
const isHbs =
typeof value === "string" && value.match(HBS_REGEX)?.length > 0
// Parse all values into correct types
if (type === "datetime") {
// Ensure date value is a valid date and parse into correct format
@ -113,7 +117,7 @@ export const buildLuceneQuery = filter => {
if (type === "number" && !Array.isArray(value)) {
if (operator === "oneOf") {
value = value.split(",").map(item => parseFloat(item))
} else {
} else if (!isHbs) {
value = parseFloat(value)
}
}

View File

@ -7,10 +7,10 @@ const RolePriorities = {
[Roles.PUBLIC]: 1,
}
const RoleColours = {
[Roles.ADMIN]: "var(--spectrum-global-color-static-seafoam-400)",
[Roles.POWER]: "var(--spectrum-global-color-static-purple-400)",
[Roles.BASIC]: "var(--spectrum-global-color-static-magenta-400)",
[Roles.PUBLIC]: "var(--spectrum-global-color-static-yellow-400)",
[Roles.ADMIN]: "var(--spectrum-global-color-static-red-400)",
[Roles.POWER]: "var(--spectrum-global-color-static-orange-400)",
[Roles.BASIC]: "var(--spectrum-global-color-static-green-400)",
[Roles.PUBLIC]: "var(--spectrum-global-color-static-blue-400)",
}
export const getRolePriority = roleId => {
@ -18,5 +18,7 @@ export const getRolePriority = roleId => {
}
export const getRoleColour = roleId => {
return RoleColours[roleId] ?? "rgb(20, 115, 230)"
return (
RoleColours[roleId] ?? "var(--spectrum-global-color-static-magenta-400)"
)
}

View File

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

View File

@ -5,7 +5,11 @@ import {
getDevelopmentAppID,
} from "@budibase/backend-core/db"
import { DocumentTypes, getAutomationParams } from "../../../db/utils"
import { disableAllCrons, enableCronTrigger } from "../../../automations/utils"
import {
disableAllCrons,
enableCronTrigger,
clearMetadata,
} from "../../../automations/utils"
import { app as appCache } from "@budibase/backend-core/cache"
import {
getAppId,
@ -80,6 +84,7 @@ async function initDeployedApp(prodAppId: any) {
})
)
).rows.map((row: any) => row.doc)
await clearMetadata()
console.log("You have " + automations.length + " automations")
const promises = []
console.log("Disabling prod crons..")

View File

@ -82,6 +82,27 @@ async function getTable(appId, tableId) {
return ctx.body
}
function typeCoercion(filters, table) {
if (!filters || !table) {
return filters
}
for (let key of Object.keys(filters)) {
if (typeof filters[key] === "object") {
for (let [property, value] of Object.entries(filters[key])) {
const column = table.schema[property]
// convert string inputs
if (!column || typeof value !== "string") {
continue
}
if (column.type === FieldTypes.NUMBER) {
filters[key][property] = parseFloat(value)
}
}
}
}
return filters
}
exports.run = async function ({ inputs, appId }) {
const { tableId, filters, sortColumn, sortOrder, limit } = inputs
const table = await getTable(appId, tableId)
@ -99,7 +120,7 @@ exports.run = async function ({ inputs, appId }) {
sortType,
limit,
sort: sortColumn,
query: filters || {},
query: typeCoercion(filters || {}, table),
// default to ascending, like data tab
sortOrder: sortOrder || SortOrders.ASCENDING,
},

View File

@ -31,15 +31,21 @@ exports.definition = {
type: "boolean",
description: "Whether the action was successful",
},
message: {
type: "string",
description: "What was output",
},
required: ["success"],
},
required: ["success", "message"],
},
},
}
exports.run = async function ({ inputs, appId }) {
console.log(`App ${appId} - ${inputs.text}`)
const message = `App ${appId} - ${inputs.text}`
console.log(message)
return {
success: true,
message,
}
}

View File

@ -31,7 +31,7 @@ describe("Run through some parts of the automations system", () => {
it("should be able to init in builder", async () => {
await triggers.externalTrigger(basicAutomation(), { a: 1 })
await wait(100)
expect(thread).toHaveBeenCalled()
expect(thread.execute).toHaveBeenCalled()
})
it("should be able to init in prod", async () => {
@ -52,7 +52,7 @@ describe("Run through some parts of the automations system", () => {
}
})
await wait(100)
expect(thread).toHaveBeenCalledWith(makePartial({
expect(thread.execute).toHaveBeenCalledWith(makePartial({
data: {
event: {
fields: {

View File

@ -6,10 +6,16 @@ import newid from "../db/newid"
import { updateEntityMetadata } from "../utilities"
import { MetadataTypes, WebhookType } from "../constants"
import { getProdAppID, doWithDB } from "@budibase/backend-core/db"
import { getAutomationMetadataParams } from "../db/utils"
import { cloneDeep } from "lodash/fp"
import { getAppDB, getAppId } from "@budibase/backend-core/context"
import {
getAppDB,
getAppId,
getProdAppDB,
} from "@budibase/backend-core/context"
import { tenancy } from "@budibase/backend-core"
import { quotas } from "@budibase/pro"
import { Automation } from "@budibase/types"
const WH_STEP_ID = definitions.WEBHOOK.stepId
const CRON_STEP_ID = definitions.CRON.stepId
@ -82,6 +88,26 @@ export async function disableAllCrons(appId: any) {
return Promise.all(promises)
}
export async function disableCron(jobId: string, jobKey: string) {
await queue.removeRepeatableByKey(jobKey)
await queue.removeJobs(jobId)
}
export async function clearMetadata() {
const db = getProdAppDB()
const automationMetadata = (
await db.allDocs(
getAutomationMetadataParams({
include_docs: true,
})
)
).rows.map((row: any) => row.doc)
for (let metadata of automationMetadata) {
metadata._deleted = true
}
await db.bulkDocs(automationMetadata)
}
/**
* This function handles checking of any cron jobs that need to be enabled/updated.
* @param {string} appId The ID of the app in which we are checking for webhooks
@ -204,3 +230,30 @@ export async function checkForWebhooks({ oldAuto, newAuto }: any) {
export async function cleanupAutomations(appId: any) {
await disableAllCrons(appId)
}
/**
* Checks if the supplied automation is of a recurring type.
* @param automation The automation to check.
* @return {boolean} if it is recurring (cron).
*/
export function isRecurring(automation: Automation) {
return automation.definition.trigger.stepId === definitions.CRON.stepId
}
export function isErrorInOutput(output: {
steps: { outputs?: { success: boolean } }[]
}) {
let first = true,
error = false
for (let step of output.steps) {
// skip the trigger, its always successful if automation ran
if (first) {
first = false
continue
}
if (!step.outputs?.success) {
error = true
}
}
return error
}

View File

@ -208,10 +208,7 @@ exports.AutomationErrors = {
FAILURE_CONDITION: "FAILURE_CONDITION_MET",
}
exports.LoopStepTypes = {
ARRAY: "Array",
STRING: "String",
}
// pass through the list from the auth/core lib
exports.ObjectStoreBuckets = ObjectStoreBuckets
exports.MAX_AUTOMATION_RECURRING_ERRORS = 5

View File

@ -41,6 +41,7 @@ const DocumentTypes = {
METADATA: "metadata",
MEM_VIEW: "view",
USER_FLAG: "flag",
AUTOMATION_METADATA: "meta_au",
}
const InternalTables = {
@ -311,6 +312,21 @@ exports.generateQueryID = datasourceId => {
}${SEPARATOR}${datasourceId}${SEPARATOR}${newid()}`
}
/**
* Generates a metadata ID for automations, used to track errors in recurring
* automations etc.
*/
exports.generateAutomationMetadataID = automationId => {
return `${DocumentTypes.AUTOMATION_METADATA}${SEPARATOR}${automationId}`
}
/**
* Retrieve all automation metadata in an app database.
*/
exports.getAutomationMetadataParams = (otherProps = {}) => {
return getDocParams(DocumentTypes.AUTOMATION_METADATA, null, otherProps)
}
/**
* Gets parameters for retrieving a query, this is a utility function for the getDocParams function.
*/

View File

@ -0,0 +1,49 @@
import {
Automation,
AutomationResults,
AutomationStep,
Document,
} from "@budibase/types"
export enum LoopStepTypes {
ARRAY = "Array",
STRING = "String",
}
export interface LoopStep extends AutomationStep {
inputs: {
option: LoopStepTypes
[key: string]: any
}
}
export interface LoopInput {
binding: string[] | string
}
export interface TriggerOutput {
metadata?: any
appId?: string
timestamp?: number
}
export interface AutomationEvent {
data: {
automation: Automation
event: any
}
opts?: {
repeat?: {
jobId: string
}
}
}
export interface AutomationContext extends AutomationResults {
steps: any[]
trigger: any
}
export interface AutomationMetadata extends Document {
errorCount?: number
}

View File

@ -1,36 +1,47 @@
require("./utils").threadSetup()
const actions = require("../automations/actions")
const automationUtils = require("../automations/automationUtils")
const AutomationEmitter = require("../events/AutomationEmitter")
const { processObject } = require("@budibase/string-templates")
const { DocumentTypes } = require("../db/utils")
const { definitions: triggerDefs } = require("../automations/triggerInfo")
import { default as threadUtils } from "./utils"
threadUtils.threadSetup()
import { isRecurring, disableCron, isErrorInOutput } from "../automations/utils"
import { default as actions } from "../automations/actions"
import { default as automationUtils } from "../automations/automationUtils"
import { default as AutomationEmitter } from "../events/AutomationEmitter"
import { generateAutomationMetadataID, isProdAppID } from "../db/utils"
import { definitions as triggerDefs } from "../automations/triggerInfo"
import { AutomationErrors, MAX_AUTOMATION_RECURRING_ERRORS } from "../constants"
import { storeLog } from "../automations/logging"
import { Automation, AutomationStep, AutomationStatus } from "@budibase/types"
import {
LoopStep,
LoopStepTypes,
LoopInput,
AutomationEvent,
TriggerOutput,
AutomationContext,
AutomationMetadata,
} from "../definitions/automations"
import { WorkerCallback } from "./definitions"
const { doInAppContext, getAppDB } = require("@budibase/backend-core/context")
const { AutomationErrors, LoopStepTypes } = require("../constants")
const { storeLog } = require("../automations/logging")
const { logAlertWithInfo, logWarn } = require("@budibase/backend-core/logging")
const { processObject } = require("@budibase/string-templates")
const FILTER_STEP_ID = actions.ACTION_DEFINITIONS.FILTER.stepId
const LOOP_STEP_ID = actions.ACTION_DEFINITIONS.LOOP.stepId
const CRON_STEP_ID = triggerDefs.CRON.stepId
const STOPPED_STATUS = { success: true, status: "STOPPED" }
const STOPPED_STATUS = { success: true, status: AutomationStatus.STOPPED }
const { cloneDeep } = require("lodash/fp")
const env = require("../environment")
function typecastForLooping(loopStep, input) {
function typecastForLooping(loopStep: LoopStep, input: LoopInput) {
if (!input || !input.binding) {
return null
}
const isArray = Array.isArray(input.binding),
isString = typeof input.binding === "string"
try {
switch (loopStep.inputs.option) {
case LoopStepTypes.ARRAY:
if (isString) {
if (typeof input.binding === "string") {
return JSON.parse(input.binding)
}
break
case LoopStepTypes.STRING:
if (isArray) {
if (Array.isArray(input.binding)) {
return input.binding.join(",")
}
break
@ -41,7 +52,7 @@ function typecastForLooping(loopStep, input) {
return input.binding
}
function getLoopIterations(loopStep, input) {
function getLoopIterations(loopStep: LoopStep, input: LoopInput) {
const binding = typecastForLooping(loopStep, input)
if (!loopStep || !binding) {
return 1
@ -57,11 +68,24 @@ function getLoopIterations(loopStep, input) {
* inputs and handles any outputs.
*/
class Orchestrator {
constructor(automation, triggerOutput = {}) {
this._metadata = triggerOutput.metadata
this._chainCount = this._metadata ? this._metadata.automationChainCount : 0
this._appId = triggerOutput.appId
this._app = null
_chainCount: number
_appId: string
_automation: Automation
_emitter: any
_context: AutomationContext
_repeat?: { jobId: string; jobKey: string }
executionOutput: AutomationContext
constructor(automation: Automation, triggerOutput: TriggerOutput, opts: any) {
const metadata = triggerOutput.metadata
this._chainCount = metadata ? metadata.automationChainCount : 0
this._appId = triggerOutput.appId as string
if (opts?.repeat) {
this._repeat = {
jobId: opts.repeat.jobId,
jobKey: opts.repeat.key,
}
}
const triggerStepId = automation.definition.trigger.stepId
triggerOutput = this.cleanupTriggerOutputs(triggerStepId, triggerOutput)
// remove from context
@ -79,14 +103,14 @@ class Orchestrator {
this.updateExecutionOutput(triggerId, triggerStepId, null, triggerOutput)
}
cleanupTriggerOutputs(stepId, triggerOutput) {
cleanupTriggerOutputs(stepId: string, triggerOutput: TriggerOutput) {
if (stepId === CRON_STEP_ID) {
triggerOutput.timestamp = Date.now()
}
return triggerOutput
}
async getStepFunctionality(stepId) {
async getStepFunctionality(stepId: string) {
let step = await actions.getAction(stepId)
if (step == null) {
throw `Cannot find automation step by name ${stepId}`
@ -94,25 +118,107 @@ class Orchestrator {
return step
}
async getApp() {
if (this._app) {
return this._app
}
async getMetadata(): Promise<AutomationMetadata> {
const metadataId = generateAutomationMetadataID(this._automation._id)
const db = getAppDB()
this._app = await db.get(DocumentTypes.APP_METADATA)
return this._app
let metadata: AutomationMetadata
try {
metadata = await db.get(metadataId)
} catch (err) {
metadata = {
_id: metadataId,
errorCount: 0,
}
}
return metadata
}
updateExecutionOutput(id, stepId, inputs, outputs) {
async checkIfShouldStop(metadata: AutomationMetadata): Promise<boolean> {
if (!metadata.errorCount || !this._repeat) {
return false
}
const automation = this._automation
const trigger = automation.definition.trigger
if (metadata.errorCount >= MAX_AUTOMATION_RECURRING_ERRORS) {
logWarn(
`CRON disabled due to errors - ${this._appId}/${this._automation._id}`
)
await disableCron(this._repeat?.jobId, this._repeat?.jobKey)
this.updateExecutionOutput(
trigger.id,
trigger.stepId,
{},
{
status: AutomationStatus.STOPPED_ERROR,
success: false,
}
)
await storeLog(automation, this.executionOutput)
return true
}
return false
}
async updateMetadata(metadata: AutomationMetadata) {
const output = this.executionOutput,
automation = this._automation
if (!output || !isRecurring(automation)) {
return
}
const count = metadata.errorCount
const isError = isErrorInOutput(output)
// nothing to do in this scenario, escape
if (!count && !isError) {
return
}
if (isError) {
metadata.errorCount = count ? count + 1 : 1
} else {
metadata.errorCount = 0
}
const db = getAppDB()
try {
await db.put(metadata)
} catch (err) {
logAlertWithInfo(
"Failed to write automation metadata",
db.name,
automation._id,
err
)
}
}
updateExecutionOutput(id: string, stepId: string, inputs: any, outputs: any) {
const stepObj = { id, stepId, inputs, outputs }
// replacing trigger when disabling CRON
if (
stepId === CRON_STEP_ID &&
outputs.status === AutomationStatus.STOPPED_ERROR
) {
this.executionOutput.trigger = stepObj
this.executionOutput.steps = [stepObj]
return
}
// first entry is always the trigger (constructor)
if (this.executionOutput.steps.length === 0) {
if (
this.executionOutput.steps.length === 0 ||
this.executionOutput.trigger.id === id
) {
this.executionOutput.trigger = stepObj
}
this.executionOutput.steps.push(stepObj)
}
updateContextAndOutput(loopStepNumber, step, output, result) {
updateContextAndOutput(
loopStepNumber: number | undefined,
step: AutomationStep,
output: any,
result: { success: boolean; status: string }
) {
if (!loopStepNumber) {
throw new Error("No loop step number provided.")
}
this.executionOutput.steps.splice(loopStepNumber, 0, {
id: step.id,
stepId: step.stepId,
@ -133,11 +239,22 @@ class Orchestrator {
async execute() {
let automation = this._automation
let stopped = false
let loopStep = null
let loopStep: AutomationStep | undefined = undefined
let stepCount = 0
let loopStepNumber = null
let loopSteps = []
let loopStepNumber: any = undefined
let loopSteps: LoopStep[] | undefined = []
let metadata
// check if this is a recurring automation,
if (isProdAppID(this._appId) && isRecurring(automation)) {
metadata = await this.getMetadata()
const shouldStop = await this.checkIfShouldStop(metadata)
if (shouldStop) {
return
}
}
for (let step of automation.definition.steps) {
stepCount++
let input,
@ -151,7 +268,7 @@ class Orchestrator {
if (loopStep) {
input = await processObject(loopStep.inputs, this._context)
iterations = getLoopIterations(loopStep, input)
iterations = getLoopIterations(loopStep as LoopStep, input)
}
for (let index = 0; index < iterations; index++) {
@ -166,14 +283,17 @@ class Orchestrator {
let tempOutput = { items: loopSteps, iterations: iterationCount }
try {
newInput.binding = typecastForLooping(loopStep, newInput)
newInput.binding = typecastForLooping(
loopStep as LoopStep,
newInput
)
} catch (err) {
this.updateContextAndOutput(loopStepNumber, step, tempOutput, {
status: AutomationErrors.INCORRECT_TYPE,
success: false,
})
loopSteps = null
loopStep = null
loopSteps = undefined
loopStep = undefined
break
}
@ -223,8 +343,8 @@ class Orchestrator {
status: AutomationErrors.MAX_ITERATIONS,
success: true,
})
loopSteps = null
loopStep = null
loopSteps = undefined
loopStep = undefined
break
}
@ -232,7 +352,7 @@ class Orchestrator {
const currentItem = this._context.steps[loopStepNumber]?.currentItem
if (currentItem && typeof currentItem === "object") {
isFailure = Object.keys(currentItem).some(value => {
return currentItem[value] === loopStep.inputs.failure
return currentItem[value] === loopStep?.inputs.failure
})
} else {
isFailure = currentItem && currentItem === loopStep.inputs.failure
@ -243,8 +363,8 @@ class Orchestrator {
status: AutomationErrors.FAILURE_CONDITION,
success: false,
})
loopSteps = null
loopStep = null
loopSteps = undefined
loopStep = undefined
break
}
}
@ -295,7 +415,7 @@ class Orchestrator {
if (loopStep) {
iterationCount++
if (index === iterations - 1) {
loopStep = null
loopStep = undefined
this._context.steps.splice(loopStepNumber, 1)
break
}
@ -316,22 +436,26 @@ class Orchestrator {
})
this._context.steps.splice(loopStepNumber, 0, tempOutput)
loopSteps = null
loopSteps = undefined
}
}
// store the logs for the automation run
await storeLog(this._automation, this.executionOutput)
if (isProdAppID(this._appId) && isRecurring(automation) && metadata) {
await this.updateMetadata(metadata)
}
return this.executionOutput
}
}
module.exports = (input, callback) => {
export function execute(input: AutomationEvent, callback: WorkerCallback) {
const appId = input.data.event.appId
doInAppContext(appId, async () => {
const automationOrchestrator = new Orchestrator(
input.data.automation,
input.data.event
input.data.event,
input.opts
)
try {
const response = await automationOrchestrator.execute()

View File

@ -0,0 +1,18 @@
export type WorkerCallback = (error: any, response?: any) => void
export interface QueryEvent {
appId?: string
datasource: any
queryVerb: string
fields: { [key: string]: any }
parameters: { [key: string]: any }
pagination?: any
transformer: any
queryId: string
ctx?: any
}
export interface QueryVariable {
queryId: string
name: string
}

View File

@ -18,26 +18,23 @@ function typeToFile(type: any) {
default:
throw "Unknown thread type"
}
// have to use require here, to make it work with worker-farm
return require.resolve(filename)
}
export class Thread {
type: any
count: any
disableThreading: any
workers: any
timeoutMs: any
disableThreading: boolean
static workerRefs: any[] = []
constructor(type: any, opts: any = { timeoutMs: null, count: 1 }) {
this.type = type
this.count = opts.count ? opts.count : 1
this.disableThreading =
env.isTest() ||
env.DISABLE_THREADING ||
this.count === 0 ||
env.isInThread()
this.disableThreading = this.shouldDisableThreading()
if (!this.disableThreading) {
const workerOpts: any = {
autoStart: true,
@ -47,26 +44,28 @@ export class Thread {
this.timeoutMs = opts.timeoutMs
workerOpts.maxCallTime = opts.timeoutMs
}
this.workers = workerFarm(workerOpts, typeToFile(type))
this.workers = workerFarm(workerOpts, typeToFile(type), ["execute"])
Thread.workerRefs.push(this.workers)
}
}
run(data: any) {
return new Promise((resolve, reject) => {
let fncToCall
// if in test then don't use threading
if (this.disableThreading) {
fncToCall = require(typeToFile(this.type))
} else {
fncToCall = this.workers
shouldDisableThreading(): boolean {
return !!(
env.isTest() ||
env.DISABLE_THREADING ||
this.count === 0 ||
env.isInThread()
)
}
fncToCall(data, (err: any, response: any) => {
run(data: any) {
const timeout = this.timeoutMs
return new Promise((resolve, reject) => {
function fire(worker: any) {
worker.execute(data, (err: any, response: any) => {
if (err && err.type === "TimeoutError") {
reject(
new Error(
`Query response time exceeded ${this.timeoutMs}ms timeout.`
)
new Error(`Query response time exceeded ${timeout}ms timeout.`)
)
} else if (err) {
reject(err)
@ -74,6 +73,15 @@ export class Thread {
resolve(response)
}
})
}
// if in test then don't use threading
if (this.disableThreading) {
import(typeToFile(this.type)).then((thread: any) => {
fire(thread)
})
} else {
fire(this.workers)
}
})
}

View File

@ -1,5 +1,6 @@
const threadUtils = require("./utils")
import { default as threadUtils } from "./utils"
threadUtils.threadSetup()
import { WorkerCallback, QueryEvent, QueryVariable } from "./definitions"
const ScriptRunner = require("../utilities/scriptRunner")
const { integrations } = require("../integrations")
const { processStringSync } = require("@budibase/string-templates")
@ -19,7 +20,22 @@ const {
} = require("../integrations/queries/sql")
class QueryRunner {
constructor(input, flags = { noRecursiveQuery: false }) {
datasource: any
queryVerb: string
queryId: string
fields: any
parameters: any
pagination: any
transformer: any
cachedVariables: any[]
ctx: any
queryResponse: any
noRecursiveQuery: boolean
hasRerun: boolean
hasRefreshedOAuth: boolean
hasDynamicVariables: boolean
constructor(input: QueryEvent, flags = { noRecursiveQuery: false }) {
this.datasource = input.datasource
this.queryVerb = input.queryVerb
this.fields = input.fields
@ -37,9 +53,10 @@ class QueryRunner {
this.queryResponse = {}
this.hasRerun = false
this.hasRefreshedOAuth = false
this.hasDynamicVariables = false
}
async execute() {
async execute(): Promise<any> {
let { datasource, fields, queryVerb, transformer } = this
let datasourceClone = cloneDeep(datasource)
@ -52,7 +69,7 @@ class QueryRunner {
if (datasourceClone.config.authConfigs) {
datasourceClone.config.authConfigs =
datasourceClone.config.authConfigs.map(config => {
datasourceClone.config.authConfigs.map((config: any) => {
return enrichQueryFields(config, this.ctx)
})
}
@ -138,8 +155,8 @@ class QueryRunner {
}
// map into JSON if just raw primitive here
if (rows.find(row => typeof row !== "object")) {
rows = rows.map(value => ({ value }))
if (rows.find((row: any) => typeof row !== "object")) {
rows = rows.map((value: any) => ({ value }))
}
// get all the potential fields in the schema
@ -152,7 +169,7 @@ class QueryRunner {
return { rows, keys, info, extra, pagination }
}
async runAnotherQuery(queryId, parameters) {
async runAnotherQuery(queryId: string, parameters: any) {
const db = getAppDB()
const query = await db.get(queryId)
const datasource = await db.get(query.datasourceId)
@ -163,12 +180,13 @@ class QueryRunner {
fields: query.fields,
parameters,
transformer: query.transformer,
queryId,
},
{ noRecursiveQuery: true }
).execute()
}
async refreshOAuth2(ctx) {
async refreshOAuth2(ctx: any) {
const { oauth2, providerType, _id } = ctx.user
const { configId } = ctx.auth
@ -200,7 +218,7 @@ class QueryRunner {
return resp
}
async getDynamicVariable(variable) {
async getDynamicVariable(variable: QueryVariable) {
let { parameters } = this
const queryId = variable.queryId,
name = variable.name
@ -233,7 +251,7 @@ class QueryRunner {
if (!this.noRecursiveQuery) {
// need to see if this uses any variables
const stringFields = JSON.stringify(fields)
const foundVars = dynamicVars.filter(variable => {
const foundVars = dynamicVars.filter((variable: QueryVariable) => {
// don't allow a query to use its own dynamic variable (loop)
if (variable.queryId === this.queryId) {
return false
@ -242,7 +260,9 @@ class QueryRunner {
const regex = new RegExp(`{{[ ]*${variable.name}[ ]*}}`)
return regex.test(stringFields)
})
const dynamics = foundVars.map(dynVar => this.getDynamicVariable(dynVar))
const dynamics = foundVars.map((dynVar: QueryVariable) =>
this.getDynamicVariable(dynVar)
)
const responses = await Promise.all(dynamics)
for (let i = 0; i < foundVars.length; i++) {
const variable = foundVars[i]
@ -264,7 +284,7 @@ class QueryRunner {
}
}
module.exports = (input, callback) => {
export function execute(input: QueryEvent, callback: WorkerCallback) {
doInAppContext(input.appId, async () => {
const Runner = new QueryRunner(input)
try {

View File

@ -1,10 +1,11 @@
import { QueryVariable } from "./definitions"
const env = require("../environment")
const db = require("../db")
const redis = require("@budibase/backend-core/redis")
const { SEPARATOR } = require("@budibase/backend-core/db")
const VARIABLE_TTL_SECONDS = 3600
let client
let client: any
async function getClient() {
if (!client) {
@ -14,10 +15,16 @@ async function getClient() {
}
process.on("exit", async () => {
if (client) await client.finish()
if (client) {
await client.finish()
}
})
exports.threadSetup = () => {
function makeVariableKey(queryId: string, variable: string) {
return `${queryId}${SEPARATOR}${variable}`
}
export function threadSetup() {
// don't run this if not threading
if (env.isTest() || env.DISABLE_THREADING) {
return
@ -27,16 +34,15 @@ exports.threadSetup = () => {
db.init()
}
function makeVariableKey(queryId, variable) {
return `${queryId}${SEPARATOR}${variable}`
}
exports.checkCacheForDynamicVariable = async (queryId, variable) => {
export async function checkCacheForDynamicVariable(
queryId: string,
variable: string
) {
const cache = await getClient()
return cache.get(makeVariableKey(queryId, variable))
}
exports.invalidateDynamicVariables = async cachedVars => {
export async function invalidateDynamicVariables(cachedVars: QueryVariable[]) {
const cache = await getClient()
let promises = []
for (let variable of cachedVars) {
@ -47,7 +53,11 @@ exports.invalidateDynamicVariables = async cachedVars => {
await Promise.all(promises)
}
exports.storeDynamicVariable = async (queryId, variable, value) => {
export async function storeDynamicVariable(
queryId: string,
variable: string,
value: any
) {
const cache = await getClient()
await cache.store(
makeVariableKey(queryId, variable),
@ -56,7 +66,7 @@ exports.storeDynamicVariable = async (queryId, variable, value) => {
)
}
exports.formatResponse = resp => {
export function formatResponse(resp: any) {
if (typeof resp === "string") {
try {
resp = JSON.parse(resp)
@ -67,7 +77,7 @@ exports.formatResponse = resp => {
return resp
}
exports.hasExtraData = response => {
export function hasExtraData(response: any) {
return (
typeof response === "object" &&
!Array.isArray(response) &&
@ -76,3 +86,12 @@ exports.hasExtraData = response => {
response.info != null
)
}
export default {
hasExtraData,
formatResponse,
storeDynamicVariable,
invalidateDynamicVariables,
checkCacheForDynamicVariable,
threadSetup,
}

View File

@ -109,6 +109,10 @@ class InMemoryQueue {
async clean() {
return []
}
async getJob() {
return {}
}
}
module.exports = InMemoryQueue

View File

@ -156,9 +156,9 @@
adal-node "^0.2.2"
"@azure/storage-blob@^12.5.0":
version "12.11.0"
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.11.0.tgz#2e27902ab293715411ab1f7c8fae422ad0b4b827"
integrity sha512-na+FisoARuaOWaHWpmdtk3FeuTWf2VWamdJ9/TJJzj5ZdXPLC3juoDgFs6XVuJIoK30yuBpyFBEDXVRK4pB7Tg==
version "12.10.0"
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.10.0.tgz#b92269f45a1765700a900b41ca81a474a6e36ea4"
integrity sha512-FBEPKGnvtQJS8V8Tg1P9obgmVD9AodrIfwtwhBpsjenClhFyugMp3HPJY0tF7rInUB/CivKBCbnQKrUnKxqxzw==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/core-http" "^2.0.0"
@ -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.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.1.tgz#0940fa58c7d41d254a4f048854f4600ba684ea27"
integrity sha512-pJbg1wWFWBsMZwHDSyykr/9QagoK9wycgviTZjzJDwdGsQn/HpQYM1Brz3MhTKoMbnP3C39DwhUORMMrT9ch5Q==
"@budibase/backend-core@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.2.tgz#56c115be486fc264348ee2a06fc5387c202051ec"
integrity sha512-q2yIKrvFj8kQVOekNp17FOkclLlYSPy2gjKicfnsHg1Oeq+iGhgUHQYJ+QTBUlU61Xjd6E9Kkp5pQXOZ09Bf5g==
dependencies:
"@budibase/types" "^1.1.29-alpha.1"
"@budibase/types" "^1.1.29-alpha.2"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
@ -1177,13 +1177,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.1.tgz#df07cd31cac8439a924c1308f9a4fe22495e96b5"
integrity sha512-xBTnHvZV57AnekseGMjUMf3vq1TUd8o/iCQsnKNgYwj1Ie7alvJ1CscHnjylDULP6uqeOwvtoTJ4FyoaExx9fw==
"@budibase/pro@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.2.tgz#cafeb466acb9ff552dcb37710f84e3b2192d39f1"
integrity sha512-rD11gx5MvmSN0VS6ie2bjbeOnPj/0sbzzsoEqogOcki9ovdMdiXtlIHkYYcVZbgodY47Fw+jrJVSspJ9vr5SFg==
dependencies:
"@budibase/backend-core" "1.1.29-alpha.1"
"@budibase/types" "1.1.29-alpha.1"
"@budibase/backend-core" "1.1.29-alpha.2"
"@budibase/types" "1.1.29-alpha.2"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1206,10 +1206,15 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@1.1.29-alpha.1", "@budibase/types@^1.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.1.tgz#8141a6d44176b3dfd53d216640ab7f460fd96e75"
integrity sha512-e/6Pd1NA80y9vszYADy2NBTl3QMNpcpOoe5+CBfSomnR2GL0FPyJp9jBj9Nr0G88wDiXe5tvwMZsgY+hkLdvJQ==
"@budibase/types@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.2.tgz#d824f8045ba362c4ac91798b70239064a3aca98c"
integrity sha512-XYWfMmxcIHn4xVeub86+9MKrid/EzsvMazoC32kTmkH2DppPTjihqWXyGWhhLzDme7GpZ3/bzXPjbd3rkebFGQ==
"@budibase/types@^1.1.29-alpha.2":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.30.tgz#89bb0aeea747a890ddd299f68e178d686c9cafdc"
integrity sha512-Gh5zGQ4TWI6HFiJM7684bTgPot2JqHBnR0ReHcBOguIj/U/euUBPInxaa7xTZrLYs++Rbe4gffrqnYmZfEy2sg==
"@bull-board/api@3.7.0":
version "3.7.0"
@ -1959,24 +1964,29 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/gen-mapping@^0.3.0":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9"
integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==
version "0.3.2"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
dependencies:
"@jridgewell/set-array" "^1.0.0"
"@jridgewell/set-array" "^1.0.1"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
"@jridgewell/resolve-uri@^3.0.3":
version "3.0.7"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe"
integrity sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==
version "3.1.0"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
"@jridgewell/set-array@^1.0.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
"@jridgewell/set-array@^1.0.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
"@jridgewell/source-map@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb"
@ -1986,11 +1996,11 @@
"@jridgewell/trace-mapping" "^0.3.9"
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.13"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
version "1.4.14"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9":
"@jridgewell/trace-mapping@^0.3.7":
version "0.3.13"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
@ -1998,6 +2008,14 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping@^0.3.9":
version "0.3.14"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed"
integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==
dependencies:
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jsdevtools/ono@^7.1.3":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796"
@ -2842,7 +2860,7 @@
"@types/bson" "*"
"@types/node" "*"
"@types/node-fetch@2.6.1":
"@types/node-fetch@2.6.1", "@types/node-fetch@^2.5.0":
version "2.6.1"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975"
integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==
@ -2850,14 +2868,6 @@
"@types/node" "*"
form-data "^3.0.0"
"@types/node-fetch@^2.5.0":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da"
integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.13.4", "@types/node@>=13.7.0":
version "17.0.41"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b"
@ -3726,11 +3736,6 @@ atomic-sleep@^1.0.0:
resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b"
integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
available-typed-arrays@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
aws-sdk@2.1030.0:
version "2.1030.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1030.0.tgz#24a856af3d2b8b37c14a8f59974993661c66fd82"
@ -3747,9 +3752,9 @@ aws-sdk@2.1030.0:
xml2js "0.4.19"
aws-sdk@^2.878.0:
version "2.1174.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1174.0.tgz#3e2acb1ee29229cc5d97015b2d1a18c41e967979"
integrity sha512-t/Cwbdunmoj3WAI+u+hw/kr6mla1sYCn+VncxxIjkACStA47+ZTsfd7cQfpoVMit5KubkHaJ3SHX4/qvmt0Jfg==
version "2.1152.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1152.0.tgz#73e4fb81b3a9c289234b5d6848bcdb854f169bdf"
integrity sha512-Lqwk0bDhm3vzpYb3AAM9VgGHeDpbB8+o7UJnP9R+CO23kJfi/XRpKihAcbyKDD/AUQ+O1LJaUVpvaJYLS9Am7w==
dependencies:
buffer "4.9.2"
events "1.1.1"
@ -3758,7 +3763,6 @@ aws-sdk@^2.878.0:
querystring "0.2.0"
sax "1.2.1"
url "0.10.3"
util "^0.12.4"
uuid "8.0.0"
xml2js "0.4.19"
@ -5499,7 +5503,7 @@ error-inject@^1.0.0:
resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
integrity sha512-JM8N6PytDbmIYm1IhPWlo8vr3NtfjhDY/1MhD/a5b/aad/USE8a0+NsqE9d5n+GVGmuNkPQWm4bFQWv18d8tMg==
es-abstract@^1.17.5, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.0, es-abstract@^1.20.1:
es-abstract@^1.17.5, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1:
version "1.20.1"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814"
integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==
@ -7449,14 +7453,6 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
is-arguments@^1.0.4:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==
dependencies:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@ -7763,17 +7759,6 @@ is-type-of@^1.0.0:
is-class-hotfix "~0.0.6"
isstream "~0.1.2"
is-typed-array@^1.1.3, is-typed-array@^1.1.9:
version "1.1.9"
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.9.tgz#246d77d2871e7d9f5aeb1d54b9f52c71329ece67"
integrity sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
es-abstract "^1.20.0"
for-each "^0.3.3"
has-tostringtag "^1.0.0"
is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@ -9969,16 +9954,11 @@ moment-timezone@^0.5.15, moment-timezone@^0.5.31:
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0":
"moment@>= 2.9.0", moment@^2.29.3:
version "2.29.3"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3"
integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==
moment@^2.29.3:
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
mongodb@3.6.3:
version "3.6.3"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.3.tgz#eddaed0cc3598474d7a15f0f2a5b04848489fd05"
@ -12312,7 +12292,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
simple-lru-cache@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/simple-lru-cache/-/simple-lru-cache-0.0.2.tgz#d59cc3a193c1a5d0320f84ee732f6e4713e511dd"
integrity sha512-uEv/AFO0ADI7d99OHDmh1QfYzQk/izT1vCmu/riQfh7qjBVUUgRT87E5s5h7CxWCA/+YoZerykpEthzVrW3LIw==
integrity sha1-1ZzDoZPBpdAyD4Tucy9uRxPlEd0=
simple-swizzle@^0.2.2:
version "0.2.2"
@ -12383,9 +12363,9 @@ snowflake-promise@^4.5.0:
snowflake-sdk "^1.6.0"
snowflake-sdk@^1.6.0:
version "1.6.11"
resolved "https://registry.yarnpkg.com/snowflake-sdk/-/snowflake-sdk-1.6.11.tgz#2797c816d0d2af6d56180949e1364e53df8a9c13"
integrity sha512-w4oCXjNQ1peAJjhnrwihr+epYw1pSxbe5/+PdxexYb2rzowyOn0RA5PFbir90q/dx0jzM2gvPiHDjnSBEZ1/zA==
version "1.6.10"
resolved "https://registry.yarnpkg.com/snowflake-sdk/-/snowflake-sdk-1.6.10.tgz#c6c4f267edbc50d3c1ef6fcc2651188bb8545dce"
integrity sha512-kguQQSGhmNqZfmN/yZNDaIaMMktTcrTYBjtyx+szJzV69b5F+5b77btpYp+bCFqao69otVM+IPUtb3sugvCVnQ==
dependencies:
"@azure/storage-blob" "^12.5.0"
"@techteamer/ocsp" "1.0.0"
@ -13129,9 +13109,9 @@ terser-webpack-plugin@^5.1.3:
terser "^5.7.2"
terser@^5.7.2:
version "5.14.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.0.tgz#eefeec9af5153f55798180ee2617f390bdd285e2"
integrity sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==
version "5.14.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10"
integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==
dependencies:
"@jridgewell/source-map" "^0.3.2"
acorn "^8.5.0"
@ -13771,18 +13751,6 @@ util.promisify@^1.0.0, util.promisify@^1.0.1:
has-symbols "^1.0.1"
object.getownpropertydescriptors "^2.1.1"
util@^0.12.4:
version "0.12.4"
resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253"
integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==
dependencies:
inherits "^2.0.3"
is-arguments "^1.0.4"
is-generator-function "^1.0.7"
is-typed-array "^1.1.3"
safe-buffer "^5.1.2"
which-typed-array "^1.1.2"
utils-merge@1.x.x:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
@ -14066,18 +14034,6 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
which-typed-array@^1.1.2:
version "1.1.8"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.8.tgz#0cfd53401a6f334d90ed1125754a42ed663eb01f"
integrity sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==
dependencies:
available-typed-arrays "^1.0.5"
call-bind "^1.0.2"
es-abstract "^1.20.0"
for-each "^0.3.3"
has-tostringtag "^1.0.0"
is-typed-array "^1.1.9"
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@ -14120,23 +14076,7 @@ winston-transport@^4.5.0:
readable-stream "^3.6.0"
triple-beam "^1.3.0"
winston@^3.1.0:
version "3.8.1"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.8.1.tgz#76f15b3478cde170b780234e0c4cf805c5a7fb57"
integrity sha512-r+6YAiCR4uI3N8eQNOg8k3P3PqwAm20cLKlzVD9E66Ch39+LZC+VH1UKf9JemQj2B3QoUHfKD7Poewn0Pr3Y1w==
dependencies:
"@dabh/diagnostics" "^2.0.2"
async "^3.2.3"
is-stream "^2.0.0"
logform "^2.4.0"
one-time "^1.0.0"
readable-stream "^3.4.0"
safe-stable-stringify "^2.3.1"
stack-trace "0.0.x"
triple-beam "^1.3.0"
winston-transport "^4.5.0"
winston@^3.3.3:
winston@^3.1.0, winston@^3.3.3:
version "3.7.2"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1"
integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.1.29-alpha.1",
"version": "1.1.31",
"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.1.29-alpha.1",
"version": "1.1.31",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -12,6 +12,14 @@ export interface Automation extends Document {
export interface AutomationStep {
id: string
stepId: string
inputs: {
[key: string]: any
}
schema: {
inputs: {
[key: string]: any
}
}
}
export interface AutomationTrigger {
@ -23,11 +31,12 @@ export enum AutomationStatus {
SUCCESS = "success",
ERROR = "error",
STOPPED = "stopped",
STOPPED_ERROR = "stopped_error",
}
export interface AutomationResults {
automationId: string
status: string
automationId?: string
status?: AutomationStatus
trigger?: any
steps: {
stepId: string

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.1.29-alpha.1",
"version": "1.1.31",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -35,10 +35,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "^1.1.29-alpha.1",
"@budibase/pro": "1.1.29-alpha.1",
"@budibase/string-templates": "^1.1.29-alpha.1",
"@budibase/types": "^1.1.29-alpha.1",
"@budibase/backend-core": "^1.1.31",
"@budibase/pro": "1.1.31",
"@budibase/string-templates": "^1.1.31",
"@budibase/types": "^1.1.31",
"@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.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.1.tgz#0940fa58c7d41d254a4f048854f4600ba684ea27"
integrity sha512-pJbg1wWFWBsMZwHDSyykr/9QagoK9wycgviTZjzJDwdGsQn/HpQYM1Brz3MhTKoMbnP3C39DwhUORMMrT9ch5Q==
"@budibase/backend-core@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.2.tgz#56c115be486fc264348ee2a06fc5387c202051ec"
integrity sha512-q2yIKrvFj8kQVOekNp17FOkclLlYSPy2gjKicfnsHg1Oeq+iGhgUHQYJ+QTBUlU61Xjd6E9Kkp5pQXOZ09Bf5g==
dependencies:
"@budibase/types" "^1.1.29-alpha.1"
"@budibase/types" "^1.1.29-alpha.2"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
@ -324,21 +324,26 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@1.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.1.tgz#df07cd31cac8439a924c1308f9a4fe22495e96b5"
integrity sha512-xBTnHvZV57AnekseGMjUMf3vq1TUd8o/iCQsnKNgYwj1Ie7alvJ1CscHnjylDULP6uqeOwvtoTJ4FyoaExx9fw==
"@budibase/pro@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.2.tgz#cafeb466acb9ff552dcb37710f84e3b2192d39f1"
integrity sha512-rD11gx5MvmSN0VS6ie2bjbeOnPj/0sbzzsoEqogOcki9ovdMdiXtlIHkYYcVZbgodY47Fw+jrJVSspJ9vr5SFg==
dependencies:
"@budibase/backend-core" "1.1.29-alpha.1"
"@budibase/types" "1.1.29-alpha.1"
"@budibase/backend-core" "1.1.29-alpha.2"
"@budibase/types" "1.1.29-alpha.2"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@1.1.29-alpha.1", "@budibase/types@^1.1.29-alpha.1":
version "1.1.29-alpha.1"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.1.tgz#8141a6d44176b3dfd53d216640ab7f460fd96e75"
integrity sha512-e/6Pd1NA80y9vszYADy2NBTl3QMNpcpOoe5+CBfSomnR2GL0FPyJp9jBj9Nr0G88wDiXe5tvwMZsgY+hkLdvJQ==
"@budibase/types@1.1.29-alpha.2":
version "1.1.29-alpha.2"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.2.tgz#d824f8045ba362c4ac91798b70239064a3aca98c"
integrity sha512-XYWfMmxcIHn4xVeub86+9MKrid/EzsvMazoC32kTmkH2DppPTjihqWXyGWhhLzDme7GpZ3/bzXPjbd3rkebFGQ==
"@budibase/types@^1.1.29-alpha.2":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.30.tgz#89bb0aeea747a890ddd299f68e178d686c9cafdc"
integrity sha512-Gh5zGQ4TWI6HFiJM7684bTgPot2JqHBnR0ReHcBOguIj/U/euUBPInxaa7xTZrLYs++Rbe4gffrqnYmZfEy2sg==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"