Merge branch 'develop' of github.com:Budibase/budibase into labday/transpiler
This commit is contained in:
commit
90259de131
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"build": "lerna run build",
|
"build": "lerna run build",
|
||||||
"build:dev": "lerna run prebuild && tsc --build --watch --preserveWatchOutput",
|
"build:dev": "lerna run prebuild && tsc --build --watch --preserveWatchOutput",
|
||||||
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish && yarn release:pro",
|
"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": "bash scripts/pro/release.sh",
|
||||||
"release:pro:develop": "bash scripts/pro/release.sh develop",
|
"release:pro:develop": "bash scripts/pro/release.sh develop",
|
||||||
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
|
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
"test:watch": "jest --watchAll"
|
"test:watch": "jest --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/types": "^1.1.29-alpha.1",
|
"@budibase/types": "^1.1.31",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-sdk": "2.1030.0",
|
"aws-sdk": "2.1030.0",
|
||||||
"bcrypt": "5.0.1",
|
"bcrypt": "5.0.1",
|
||||||
|
|
|
@ -15,11 +15,22 @@ export function logAlert(message: string, e?: any) {
|
||||||
console.error(`bb-alert: ${message} ${errorJson}`)
|
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) {
|
export function logWarn(message: string) {
|
||||||
console.warn(`bb-warn: ${message}`)
|
console.warn(`bb-warn: ${message}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
logAlert,
|
logAlert,
|
||||||
|
logAlertWithInfo,
|
||||||
logWarn,
|
logWarn,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "^1.1.29-alpha.1",
|
"@budibase/string-templates": "^1.1.31",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -84,6 +84,7 @@
|
||||||
}
|
}
|
||||||
:global([dir="ltr"] .spectrum-ActionButton .spectrum-Icon) {
|
:global([dir="ltr"] .spectrum-ActionButton .spectrum-Icon) {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
transition: color ease-out 130ms;
|
||||||
}
|
}
|
||||||
.is-selected:not(.spectrum-ActionButton--emphasized) {
|
.is-selected:not(.spectrum-ActionButton--emphasized) {
|
||||||
background: var(--spectrum-global-color-gray-300);
|
background: var(--spectrum-global-color-gray-300);
|
||||||
|
@ -92,4 +93,10 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
.spectrum-ActionButton--quiet {
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
.is-selected:not(.emphasized) .spectrum-Icon {
|
||||||
|
color: var(--spectrum-global-color-gray-900);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -87,10 +87,15 @@
|
||||||
on:mousedown={onClick}
|
on:mousedown={onClick}
|
||||||
>
|
>
|
||||||
{#if fieldIcon}
|
{#if fieldIcon}
|
||||||
<span class="option-icon">
|
<span class="option-extra">
|
||||||
<Icon name={fieldIcon} />
|
<Icon name={fieldIcon} />
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if fieldColour}
|
||||||
|
<span class="option-extra">
|
||||||
|
<StatusLight square color={fieldColour} />
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
<span
|
<span
|
||||||
class="spectrum-Picker-label"
|
class="spectrum-Picker-label"
|
||||||
class:is-placeholder={isPlaceholder}
|
class:is-placeholder={isPlaceholder}
|
||||||
|
@ -108,11 +113,6 @@
|
||||||
<use xlink:href="#spectrum-icon-18-Alert" />
|
<use xlink:href="#spectrum-icon-18-Alert" />
|
||||||
</svg>
|
</svg>
|
||||||
{/if}
|
{/if}
|
||||||
{#if fieldColour}
|
|
||||||
<span class="option-colour">
|
|
||||||
<StatusLight size="L" color={fieldColour} />
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
<svg
|
<svg
|
||||||
class="spectrum-Icon spectrum-UIIcon-ChevronDown100 spectrum-Picker-menuIcon"
|
class="spectrum-Icon spectrum-UIIcon-ChevronDown100 spectrum-Picker-menuIcon"
|
||||||
focusable="false"
|
focusable="false"
|
||||||
|
@ -166,10 +166,15 @@
|
||||||
on:click={() => onSelectOption(getOptionValue(option, idx))}
|
on:click={() => onSelectOption(getOptionValue(option, idx))}
|
||||||
>
|
>
|
||||||
{#if getOptionIcon(option, idx)}
|
{#if getOptionIcon(option, idx)}
|
||||||
<span class="option-icon">
|
<span class="option-extra">
|
||||||
<Icon name={getOptionIcon(option, idx)} />
|
<Icon name={getOptionIcon(option, idx)} />
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if getOptionColour(option, idx)}
|
||||||
|
<span class="option-extra">
|
||||||
|
<StatusLight square color={getOptionColour(option, idx)} />
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
<span class="spectrum-Menu-itemLabel">
|
<span class="spectrum-Menu-itemLabel">
|
||||||
{getOptionLabel(option, idx)}
|
{getOptionLabel(option, idx)}
|
||||||
</span>
|
</span>
|
||||||
|
@ -180,11 +185,6 @@
|
||||||
>
|
>
|
||||||
<use xlink:href="#spectrum-css-icon-Checkmark100" />
|
<use xlink:href="#spectrum-css-icon-Checkmark100" />
|
||||||
</svg>
|
</svg>
|
||||||
{#if getOptionColour(option, idx)}
|
|
||||||
<span class="option-colour">
|
|
||||||
<StatusLight size="L" color={getOptionColour(option, idx)} />
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -209,6 +209,9 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
.spectrum-Picker-label.auto-width {
|
||||||
|
margin-right: var(--spacing-xs);
|
||||||
|
}
|
||||||
.spectrum-Picker-label:not(.auto-width) {
|
.spectrum-Picker-label:not(.auto-width) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -221,16 +224,16 @@
|
||||||
.spectrum-Picker-label.auto-width.is-placeholder {
|
.spectrum-Picker-label.auto-width.is-placeholder {
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
.auto-width .spectrum-Menu-item {
|
||||||
|
padding-right: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
|
||||||
/* Icon and colour alignment */
|
/* Icon and colour alignment */
|
||||||
.spectrum-Menu-checkmark {
|
.spectrum-Menu-checkmark {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
.option-colour {
|
.option-extra {
|
||||||
padding-left: 8px;
|
|
||||||
}
|
|
||||||
.option-icon {
|
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,16 @@
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
export let active = false
|
export let active = false
|
||||||
export let color = null
|
export let color = null
|
||||||
|
export let square = false
|
||||||
|
export let hoverable = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
on:click
|
||||||
class="spectrum-StatusLight spectrum-StatusLight--size{size}"
|
class="spectrum-StatusLight spectrum-StatusLight--size{size}"
|
||||||
class:custom={!!color}
|
class:custom={!!color}
|
||||||
|
class:square
|
||||||
|
class:hoverable
|
||||||
style={`--color: ${color};`}
|
style={`--color: ${color};`}
|
||||||
class:spectrum-StatusLight--celery={celery}
|
class:spectrum-StatusLight--celery={celery}
|
||||||
class:spectrum-StatusLight--yellow={yellow}
|
class:spectrum-StatusLight--yellow={yellow}
|
||||||
|
@ -54,6 +59,7 @@
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
transition: color ease-out 130ms;
|
||||||
}
|
}
|
||||||
.spectrum-StatusLight.withText::before {
|
.spectrum-StatusLight.withText::before {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
@ -61,4 +67,14 @@
|
||||||
.custom::before {
|
.custom::before {
|
||||||
background: var(--color) !important;
|
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>
|
</style>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<script>
|
<script>
|
||||||
import Tooltip from "../Tooltip/Tooltip.svelte"
|
|
||||||
import Link from "../Link/Link.svelte"
|
import Link from "../Link/Link.svelte"
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
|
@ -17,18 +16,16 @@
|
||||||
{#each attachments as attachment}
|
{#each attachments as attachment}
|
||||||
{#if isImage(attachment.extension)}
|
{#if isImage(attachment.extension)}
|
||||||
<Link quiet target="_blank" href={attachment.url}>
|
<Link quiet target="_blank" href={attachment.url}>
|
||||||
<div class="center">
|
<div class="center" title={attachment.name}>
|
||||||
<img src={attachment.url} alt={attachment.extension} />
|
<img src={attachment.url} alt={attachment.extension} />
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
{:else}
|
{:else}
|
||||||
<Tooltip text={attachment.name} direction="right">
|
<div class="file" title={attachment.name}>
|
||||||
<div class="file">
|
|
||||||
<Link quiet target="_blank" href={attachment.url}>
|
<Link quiet target="_blank" href={attachment.url}>
|
||||||
{attachment.extension}
|
{attachment.extension}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
{#if leftover}
|
{#if leftover}
|
||||||
|
@ -52,7 +49,7 @@
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
color: var(--spectrum-global-color-gray-800);
|
color: var(--spectrum-global-color-gray-800);
|
||||||
border: 1px solid var(--spectrum-global-color-gray-300);
|
border: 1px solid var(--spectrum-global-color-gray-300);
|
||||||
border-radius: 2px;
|
border-radius: 4px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -69,10 +69,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.1.29-alpha.1",
|
"@budibase/bbui": "^1.1.31",
|
||||||
"@budibase/client": "^1.1.29-alpha.1",
|
"@budibase/client": "^1.1.31",
|
||||||
"@budibase/frontend-core": "^1.1.29-alpha.1",
|
"@budibase/frontend-core": "^1.1.31",
|
||||||
"@budibase/string-templates": "^1.1.29-alpha.1",
|
"@budibase/string-templates": "^1.1.31",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -16,16 +16,19 @@ export const getThemeStore = () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Constants.ThemeOptions.forEach(option => {
|
// Update global class names to use the new theme and remove others
|
||||||
|
Constants.Themes.forEach(option => {
|
||||||
themeElement.classList.toggle(
|
themeElement.classList.toggle(
|
||||||
`spectrum--${option}`,
|
`spectrum--${option.class}`,
|
||||||
option === state.theme
|
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
|
return store
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
if (!results) {
|
if (!results) {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
if (results.outputs?.status?.toLowerCase() === "stopped") {
|
const lcStatus = results.outputs?.status?.toLowerCase()
|
||||||
|
if (lcStatus === "stopped" || lcStatus === "stopped_error") {
|
||||||
return { yellow: true, message: "Stopped" }
|
return { yellow: true, message: "Stopped" }
|
||||||
} else if (results.outputs?.success || isTrigger) {
|
} else if (results.outputs?.success || isTrigger) {
|
||||||
return { positive: true, message: "Success" }
|
return { positive: true, message: "Success" }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Icon, StatusLight } from "@budibase/bbui"
|
import { Icon } from "@budibase/bbui"
|
||||||
import { createEventDispatcher, getContext } from "svelte"
|
import { createEventDispatcher, getContext } from "svelte"
|
||||||
|
|
||||||
export let icon
|
export let icon
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
export let iconText
|
export let iconText
|
||||||
export let iconColor
|
export let iconColor
|
||||||
export let scrollable = false
|
export let scrollable = false
|
||||||
export let color
|
|
||||||
export let highlighted = false
|
export let highlighted = false
|
||||||
|
export let rightAlignIcon = false
|
||||||
|
|
||||||
const scrollApi = getContext("scroll")
|
const scrollApi = getContext("scroll")
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
{iconText}
|
{iconText}
|
||||||
</div>
|
</div>
|
||||||
{:else if icon}
|
{:else if icon}
|
||||||
<div class="icon">
|
<div class="icon" class:right={rightAlignIcon}>
|
||||||
<Icon color={iconColor} size="S" name={icon} />
|
<Icon color={iconColor} size="S" name={icon} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -88,9 +88,9 @@
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if color}
|
{#if $$slots.right}
|
||||||
<div class="light">
|
<div class="right">
|
||||||
<StatusLight size="L" {color} />
|
<slot name="right" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
.nav-item.scrollable {
|
.nav-item.scrollable {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -135,10 +135,8 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-xs);
|
gap: var(--spacing-xs);
|
||||||
width: max-content;
|
width: max-content;
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: var(--spacing-l);
|
padding-left: var(--spacing-l);
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Needed to fully display the actions icon */
|
/* Needed to fully display the actions icon */
|
||||||
|
@ -153,10 +151,15 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--spectrum-global-color-gray-600);
|
color: var(--spectrum-global-color-gray-600);
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
.icon.right {
|
||||||
|
order: 4;
|
||||||
}
|
}
|
||||||
.icon.arrow {
|
.icon.arrow {
|
||||||
flex: 0 0 20px;
|
flex: 0 0 20px;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
|
order: 0;
|
||||||
}
|
}
|
||||||
.icon.arrow.absolute {
|
.icon.arrow.absolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -188,11 +191,14 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
color: var(--spectrum-global-color-gray-800);
|
color: var(--spectrum-global-color-gray-900);
|
||||||
|
order: 2;
|
||||||
|
width: 0;
|
||||||
}
|
}
|
||||||
.scrollable .text {
|
.scrollable .text {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
max-width: 160px;
|
max-width: 160px;
|
||||||
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
|
@ -201,18 +207,17 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
order: 3;
|
||||||
.actions,
|
opacity: 0;
|
||||||
.light :global(.spectrum-StatusLight) {
|
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-left: var(--spacing-s);
|
margin-left: var(--spacing-xs);
|
||||||
}
|
}
|
||||||
.light {
|
.nav-item.withActions:hover .actions {
|
||||||
position: absolute;
|
opacity: 1;
|
||||||
right: 0;
|
|
||||||
}
|
}
|
||||||
.nav-item.withActions:hover .light {
|
|
||||||
display: none;
|
.right {
|
||||||
|
order: 10;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -56,6 +56,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const previewApp = () => {
|
||||||
|
window.open(`/${application}`)
|
||||||
|
}
|
||||||
|
|
||||||
const viewApp = () => {
|
const viewApp = () => {
|
||||||
analytics.captureEvent(Events.APP_VIEW_PUBLISHED, {
|
analytics.captureEvent(Events.APP_VIEW_PUBLISHED, {
|
||||||
appId: selectedApp.appId,
|
appId: selectedApp.appId,
|
||||||
|
@ -174,7 +178,10 @@
|
||||||
Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>?
|
Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>?
|
||||||
</ConfirmDialog>
|
</ConfirmDialog>
|
||||||
|
|
||||||
|
<div class="buttons">
|
||||||
|
<Button on:click={previewApp} newStyles secondary>Preview</Button>
|
||||||
<DeployModal onOk={completePublish} />
|
<DeployModal onOk={completePublish} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.publish-popover-actions :global([data-cy="publish-popover-action"]) {
|
.publish-popover-actions :global([data-cy="publish-popover-action"]) {
|
||||||
|
@ -183,4 +190,11 @@
|
||||||
:global([data-cy="publish-popover-menu"]) {
|
:global([data-cy="publish-popover-menu"]) {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
.buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--spacing-m);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
Icon,
|
|
||||||
Modal,
|
Modal,
|
||||||
notifications,
|
notifications,
|
||||||
ModalContent,
|
ModalContent,
|
||||||
Body,
|
Body,
|
||||||
Button,
|
Button,
|
||||||
|
StatusLight,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
@ -67,17 +67,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !hideIcon}
|
{#if !hideIcon && updateAvailable}
|
||||||
<div class="icon-wrapper" class:highlight={updateAvailable}>
|
<StatusLight hoverable on:click={updateModal.show} notice>
|
||||||
<Icon
|
Update available
|
||||||
name="Refresh"
|
</StatusLight>
|
||||||
hoverable
|
|
||||||
on:click={updateModal.show}
|
|
||||||
tooltip={updateAvailable
|
|
||||||
? "An update is available"
|
|
||||||
: "No updates are available"}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
<Modal bind:this={updateModal}>
|
<Modal bind:this={updateModal}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
export let icon
|
export let icon
|
||||||
|
export let expandable = false
|
||||||
export let showAddButton = false
|
export let showAddButton = false
|
||||||
export let showBackButton = false
|
export let showBackButton = false
|
||||||
export let showExpandIcon = false
|
export let showCloseButton = false
|
||||||
export let onClickAddButton
|
export let onClickAddButton
|
||||||
export let onClickBackButton
|
export let onClickBackButton
|
||||||
|
export let onClickCloseButton
|
||||||
export let borderLeft = false
|
export let borderLeft = false
|
||||||
export let borderRight = false
|
export let borderRight = false
|
||||||
|
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<Heading size="XXS">{title || ""}</Heading>
|
<Heading size="XXS">{title || ""}</Heading>
|
||||||
</div>
|
</div>
|
||||||
{#if showExpandIcon}
|
{#if expandable}
|
||||||
<Icon
|
<Icon
|
||||||
name={wide ? "Minimize" : "Maximize"}
|
name={wide ? "Minimize" : "Maximize"}
|
||||||
hoverable
|
hoverable
|
||||||
|
@ -37,6 +39,9 @@
|
||||||
<Icon name="Add" />
|
<Icon name="Add" />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if showCloseButton}
|
||||||
|
<Icon name="Close" hoverable on:click={onClickCloseButton} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Layout, Icon, ActionButton } from "@budibase/bbui"
|
import { Layout, Icon, ActionButton, InlineAlert } from "@budibase/bbui"
|
||||||
import StatusRenderer from "./StatusRenderer.svelte"
|
import StatusRenderer from "./StatusRenderer.svelte"
|
||||||
import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte"
|
import DateTimeRenderer from "components/common/renderers/DateTimeRenderer.svelte"
|
||||||
import TestDisplay from "components/automation/AutomationBuilder/TestDisplay.svelte"
|
import TestDisplay from "components/automation/AutomationBuilder/TestDisplay.svelte"
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
export let history
|
export let history
|
||||||
export let appId
|
export let appId
|
||||||
export let close
|
export let close
|
||||||
|
const STOPPED_ERROR = "stopped_error"
|
||||||
|
|
||||||
$: exists = $automationStore.automations?.find(
|
$: exists = $automationStore.automations?.find(
|
||||||
auto => auto._id === history?.automationId
|
auto => auto._id === history?.automationId
|
||||||
|
@ -32,6 +33,15 @@
|
||||||
<Icon name="JourneyVoyager" />
|
<Icon name="JourneyVoyager" />
|
||||||
<div>{history.automationName}</div>
|
<div>{history.automationName}</div>
|
||||||
</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>
|
<div>
|
||||||
{#if exists}
|
{#if exists}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
@ -87,4 +97,10 @@
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
gap: var(--spacing-s);
|
gap: var(--spacing-s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cron-error {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
export let value
|
export let value
|
||||||
|
|
||||||
$: isError = !value || value.toLowerCase() === "error"
|
$: isError = !value || value.toLowerCase() === "error"
|
||||||
$: isStopped = value?.toLowerCase() === "stopped"
|
$: isStoppedError = value?.toLowerCase() === "stopped_error"
|
||||||
|
$: isStopped = value?.toLowerCase() === "stopped" || isStoppedError
|
||||||
$: status = getStatus(isError, isStopped)
|
$: status = getStatus(isError, isStopped)
|
||||||
|
|
||||||
function getStatus(error, stopped) {
|
function getStatus(error, stopped) {
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
|
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
|
||||||
)
|
)
|
||||||
|
|
||||||
const previewApp = () => {
|
|
||||||
window.open(`/${application}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getPackage() {
|
async function getPackage() {
|
||||||
try {
|
try {
|
||||||
store.actions.reset()
|
store.actions.reset()
|
||||||
|
@ -108,14 +104,10 @@
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
<div class="toprightnav">
|
<div class="toprightnav">
|
||||||
|
<div class="version">
|
||||||
<VersionModal />
|
<VersionModal />
|
||||||
|
</div>
|
||||||
<RevertModal />
|
<RevertModal />
|
||||||
<Icon
|
|
||||||
name="Visibility"
|
|
||||||
tooltip="Open app preview"
|
|
||||||
hoverable
|
|
||||||
on:click={previewApp}
|
|
||||||
/>
|
|
||||||
<DeployNavigation {application} />
|
<DeployNavigation {application} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -183,4 +175,8 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-xl);
|
gap: var(--spacing-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
margin-right: var(--spacing-s);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
import DevicePreviewSelect from "./DevicePreviewSelect.svelte"
|
import DevicePreviewSelect from "./DevicePreviewSelect.svelte"
|
||||||
import AppPreview from "./AppPreview.svelte"
|
import AppPreview from "./AppPreview.svelte"
|
||||||
import { store, selectedScreen, sortedScreens } from "builderStore"
|
import { store, sortedScreens } from "builderStore"
|
||||||
import { Button, Select } from "@budibase/bbui"
|
import { Select } from "@budibase/bbui"
|
||||||
import { RoleUtils } from "@budibase/frontend-core"
|
import { RoleUtils } from "@budibase/frontend-core"
|
||||||
import { goto } from "@roxi/routify"
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="app-panel">
|
<div class="app-panel">
|
||||||
|
@ -15,24 +14,17 @@
|
||||||
options={$sortedScreens}
|
options={$sortedScreens}
|
||||||
getOptionLabel={x => x.routing.route}
|
getOptionLabel={x => x.routing.route}
|
||||||
getOptionValue={x => x._id}
|
getOptionValue={x => x._id}
|
||||||
getOptionIcon={x => (x.routing.homeScreen ? "Home" : "WebPage")}
|
|
||||||
getOptionColour={x => RoleUtils.getRoleColour(x.routing.roleId)}
|
getOptionColour={x => RoleUtils.getRoleColour(x.routing.roleId)}
|
||||||
value={$store.selectedScreenId}
|
value={$store.selectedScreenId}
|
||||||
on:change={e => store.actions.screens.select(e.detail)}
|
on:change={e => store.actions.screens.select(e.detail)}
|
||||||
|
quiet
|
||||||
|
autoWidth
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
{#if $store.clientFeatures.devicePreview}
|
{#if $store.clientFeatures.devicePreview}
|
||||||
<DevicePreviewSelect />
|
<DevicePreviewSelect />
|
||||||
{/if}
|
{/if}
|
||||||
<Button
|
|
||||||
newStyles
|
|
||||||
secondary
|
|
||||||
icon="Add"
|
|
||||||
on:click={() => $goto(`../${$selectedScreen._id}/components/new`)}
|
|
||||||
>
|
|
||||||
Component
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -59,6 +51,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: var(--spacing-l);
|
gap: var(--spacing-l);
|
||||||
|
margin: 0 2px;
|
||||||
}
|
}
|
||||||
.header-left,
|
.header-left,
|
||||||
.header-right {
|
.header-right {
|
||||||
|
@ -69,7 +62,8 @@
|
||||||
gap: var(--spacing-l);
|
gap: var(--spacing-l);
|
||||||
}
|
}
|
||||||
.header-left :global(.spectrum-Picker) {
|
.header-left :global(.spectrum-Picker) {
|
||||||
width: 250px;
|
font-weight: 600;
|
||||||
|
color: var(--spectrum-global-color-gray-900);
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import { onMount, onDestroy } from "svelte"
|
import { onMount, onDestroy } from "svelte"
|
||||||
import {
|
import {
|
||||||
store,
|
store,
|
||||||
|
selectedComponent,
|
||||||
selectedScreen,
|
selectedScreen,
|
||||||
selectedLayout,
|
selectedLayout,
|
||||||
currentAsset,
|
currentAsset,
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
Layout,
|
Layout,
|
||||||
Heading,
|
Heading,
|
||||||
Body,
|
Body,
|
||||||
|
Icon,
|
||||||
notifications,
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw"
|
import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw"
|
||||||
|
@ -96,6 +98,11 @@
|
||||||
$: json = JSON.stringify(previewData)
|
$: json = JSON.stringify(previewData)
|
||||||
$: refreshContent(json)
|
$: 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
|
// Update the iframe with the builder info to render the correct preview
|
||||||
const refreshContent = message => {
|
const refreshContent = message => {
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
|
@ -219,6 +226,16 @@
|
||||||
idToDelete = null
|
idToDelete = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const toggleAddComponent = () => {
|
||||||
|
if (isAddingComponent) {
|
||||||
|
$goto(`../${$selectedScreen._id}/components/${$selectedComponent?._id}`)
|
||||||
|
} else {
|
||||||
|
$goto(
|
||||||
|
`../${$selectedScreen._id}/components/${$selectedComponent?._id}/new`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
window.addEventListener("message", receiveMessage)
|
window.addEventListener("message", receiveMessage)
|
||||||
if (!$store.clientFeatures.messagePassing) {
|
if (!$store.clientFeatures.messagePassing) {
|
||||||
|
@ -282,6 +299,13 @@
|
||||||
class:tablet={$store.previewDevice === "tablet"}
|
class:tablet={$store.previewDevice === "tablet"}
|
||||||
class:mobile={$store.previewDevice === "mobile"}
|
class:mobile={$store.previewDevice === "mobile"}
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
class="add-component"
|
||||||
|
class:active={isAddingComponent}
|
||||||
|
on:click={toggleAddComponent}
|
||||||
|
>
|
||||||
|
<Icon size="XL" name="Add">Component</Icon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
|
@ -343,4 +367,26 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 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>
|
</style>
|
||||||
|
|
|
@ -3,18 +3,21 @@
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ActionGroup compact>
|
<ActionGroup compact quiet>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
quiet
|
||||||
icon="DeviceDesktop"
|
icon="DeviceDesktop"
|
||||||
selected={$store.previewDevice === "desktop"}
|
selected={$store.previewDevice === "desktop"}
|
||||||
on:click={() => store.actions.preview.setDevice("desktop")}
|
on:click={() => store.actions.preview.setDevice("desktop")}
|
||||||
/>
|
/>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
quiet
|
||||||
icon="DeviceTablet"
|
icon="DeviceTablet"
|
||||||
selected={$store.previewDevice === "tablet"}
|
selected={$store.previewDevice === "tablet"}
|
||||||
on:click={() => store.actions.preview.setDevice("tablet")}
|
on:click={() => store.actions.preview.setDevice("tablet")}
|
||||||
/>
|
/>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
quiet
|
||||||
icon="DevicePhone"
|
icon="DevicePhone"
|
||||||
selected={$store.previewDevice === "mobile"}
|
selected={$store.previewDevice === "mobile"}
|
||||||
on:click={() => store.actions.preview.setDevice("mobile")}
|
on:click={() => store.actions.preview.setDevice("mobile")}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import { setContext } from "svelte"
|
import { setContext } from "svelte"
|
||||||
import DNDPositionIndicator from "./DNDPositionIndicator.svelte"
|
import DNDPositionIndicator from "./DNDPositionIndicator.svelte"
|
||||||
import { DropPosition } from "./dndStore"
|
import { DropPosition } from "./dndStore"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications, Button } from "@budibase/bbui"
|
||||||
|
|
||||||
let scrollRef
|
let scrollRef
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
let newOffsets = {}
|
let newOffsets = {}
|
||||||
|
|
||||||
// Calculate left offset
|
// Calculate left offset
|
||||||
const offsetX = bounds.left + bounds.width + scrollLeft - 58
|
const offsetX = bounds.left + bounds.width + scrollLeft - 36
|
||||||
if (offsetX > sidebarWidth) {
|
if (offsetX > sidebarWidth) {
|
||||||
newOffsets.left = offsetX - sidebarWidth
|
newOffsets.left = offsetX - sidebarWidth
|
||||||
} else {
|
} else {
|
||||||
|
@ -71,13 +71,10 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Panel
|
<Panel title="Components" showExpandIcon borderRight>
|
||||||
title="Components"
|
<div class="add-component">
|
||||||
showAddButton
|
<Button on:click={() => $goto("./new")} cta>Add component</Button>
|
||||||
onClickAddButton={() => $goto("../new")}
|
</div>
|
||||||
showExpandIcon
|
|
||||||
borderRight
|
|
||||||
>
|
|
||||||
<div class="nav-items-container" bind:this={scrollRef}>
|
<div class="nav-items-container" bind:this={scrollRef}>
|
||||||
<ul>
|
<ul>
|
||||||
<li
|
<li
|
||||||
|
@ -121,6 +118,13 @@
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.add-component {
|
||||||
|
padding: var(--spacing-xl) var(--spacing-l);
|
||||||
|
padding-bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
.nav-items-container {
|
.nav-items-container {
|
||||||
padding: var(--spacing-xl) 0;
|
padding: var(--spacing-xl) 0;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
import * as routify from "@roxi/routify"
|
import * as routify from "@roxi/routify"
|
||||||
import { onDestroy } from "svelte"
|
import { onDestroy } from "svelte"
|
||||||
import { findComponent } from "builderStore/componentUtils"
|
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
|
// Keep URL and state in sync for selected component ID
|
||||||
const stopSyncing = syncURLToState({
|
const stopSyncing = syncURLToState({
|
||||||
|
@ -18,4 +20,6 @@
|
||||||
onDestroy(stopSyncing)
|
onDestroy(stopSyncing)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<ComponentListPanel />
|
||||||
|
<ComponentSettingsPanel />
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
<script>
|
<!--
|
||||||
import ComponentListPanel from "./_components/navigation/ComponentListPanel.svelte"
|
Placeholder file so that routify works.
|
||||||
import ComponentSettingsPanel from "./_components/settings/ComponentSettingsPanel.svelte"
|
No unique content is needed in this index page.
|
||||||
</script>
|
-->
|
||||||
|
|
||||||
<ComponentListPanel />
|
|
||||||
<ComponentSettingsPanel />
|
|
||||||
|
|
|
@ -6,15 +6,14 @@
|
||||||
ActionGroup,
|
ActionGroup,
|
||||||
ActionButton,
|
ActionButton,
|
||||||
Search,
|
Search,
|
||||||
DetailSummary,
|
|
||||||
Icon,
|
Icon,
|
||||||
Body,
|
Body,
|
||||||
Divider,
|
|
||||||
notifications,
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import structure from "./componentStructure.json"
|
import structure from "./componentStructure.json"
|
||||||
import { store, selectedComponent } from "builderStore"
|
import { store, selectedComponent } from "builderStore"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
import { fly } from "svelte/transition"
|
||||||
|
|
||||||
let section = "components"
|
let section = "components"
|
||||||
let searchString
|
let searchString
|
||||||
|
@ -150,11 +149,12 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<div class="container" transition:fly|local={{ x: 260, duration: 300 }}>
|
||||||
<Panel
|
<Panel
|
||||||
title="Add component"
|
title="Add component"
|
||||||
showBackButton
|
showCloseButton
|
||||||
onClickBackButton={() => $goto("../slot")}
|
onClickCloseButton={() => $goto("../")}
|
||||||
borderRight
|
borderLeft
|
||||||
>
|
>
|
||||||
<Layout paddingX="L" paddingY="XL" gap="S">
|
<Layout paddingX="L" paddingY="XL" gap="S">
|
||||||
<Search
|
<Search
|
||||||
|
@ -177,19 +177,16 @@
|
||||||
>
|
>
|
||||||
</ActionGroup>
|
</ActionGroup>
|
||||||
{/if}
|
{/if}
|
||||||
</Layout>
|
|
||||||
<div>
|
|
||||||
<Divider noMargin noGrid />
|
|
||||||
</div>
|
|
||||||
{#if searchString || section === "components"}
|
{#if searchString || section === "components"}
|
||||||
|
{#if filteredStructure.length}
|
||||||
{#each filteredStructure as category}
|
{#each filteredStructure as category}
|
||||||
<DetailSummary name={category.name} collapsible={false}>
|
<Layout noPadding gap="XS">
|
||||||
<div class="component-grid">
|
<div class="category-label">{category.name}</div>
|
||||||
{#each category.children as component}
|
{#each category.children as component}
|
||||||
<div
|
<div
|
||||||
class="component"
|
class="component"
|
||||||
class:wide={component.name?.length > 15}
|
class:selected={selectedIndex ===
|
||||||
class:selected={selectedIndex === orderMap[component.component]}
|
orderMap[component.component]}
|
||||||
on:click={() => addComponent(component.component)}
|
on:click={() => addComponent(component.component)}
|
||||||
on:mouseover={() => (selectedIndex = null)}
|
on:mouseover={() => (selectedIndex = null)}
|
||||||
>
|
>
|
||||||
|
@ -197,16 +194,19 @@
|
||||||
<Body size="XS">{component.name}</Body>
|
<Body size="XS">{component.name}</Body>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</Layout>
|
||||||
</DetailSummary>
|
|
||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{: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>
|
<Body size="S">Blocks are collections of pre-built components</Body>
|
||||||
<Layout noPadding gap="XS">
|
<Layout noPadding gap="XS">
|
||||||
{#each blocks as block}
|
{#each blocks as block}
|
||||||
<div
|
<div
|
||||||
class="component block"
|
class="component"
|
||||||
on:click={() => addComponent(block.component)}
|
on:click={() => addComponent(block.component)}
|
||||||
>
|
>
|
||||||
<Icon name={block.icon} />
|
<Icon name={block.icon} />
|
||||||
|
@ -214,50 +214,51 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</Layout>
|
</Layout>
|
||||||
</Layout>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</Layout>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.component-grid {
|
.container {
|
||||||
display: grid;
|
position: fixed;
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
right: 0;
|
||||||
gap: var(--spacing-s);
|
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 {
|
.component {
|
||||||
background-color: var(--spectrum-global-color-gray-200);
|
background: var(--spectrum-global-color-gray-200);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
height: 76px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: 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);
|
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 {
|
.component.selected {
|
||||||
grid-column: span 2;
|
|
||||||
}
|
|
||||||
.component.selected,
|
|
||||||
.component:hover {
|
|
||||||
border-color: var(--spectrum-global-color-blue-400);
|
border-color: var(--spectrum-global-color-blue-400);
|
||||||
}
|
}
|
||||||
.component:hover {
|
.component:hover {
|
||||||
|
background: var(--spectrum-global-color-gray-300);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.component :global(.spectrum-Body) {
|
.component :global(.spectrum-Body) {
|
||||||
line-height: 1.2 !important;
|
line-height: 1.2 !important;
|
||||||
}
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
.block {
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
height: 48px;
|
|
||||||
padding: 0 var(--spacing-l);
|
|
||||||
gap: var(--spacing-m);
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<script>
|
||||||
|
import NewComponentPanel from "./_components/NewComponentPanel.svelte"
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<NewComponentPanel />
|
|
@ -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>
|
|
|
@ -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 />
|
|
|
@ -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>
|
|
@ -1,11 +1,12 @@
|
||||||
<script>
|
<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 Panel from "components/design/Panel.svelte"
|
||||||
import { roles } from "stores/backend"
|
import { roles } from "stores/backend"
|
||||||
import { store, sortedScreens } from "builderStore"
|
import { store, sortedScreens } from "builderStore"
|
||||||
import NavItem from "components/common/NavItem.svelte"
|
import NavItem from "components/common/NavItem.svelte"
|
||||||
import ScreenDropdownMenu from "./ScreenDropdownMenu.svelte"
|
import ScreenDropdownMenu from "./ScreenDropdownMenu.svelte"
|
||||||
import ScreenWizard from "./ScreenWizard.svelte"
|
import ScreenWizard from "./ScreenWizard.svelte"
|
||||||
|
import RoleIndicator from "./RoleIndicator.svelte"
|
||||||
import { RoleUtils } from "@budibase/frontend-core"
|
import { RoleUtils } from "@budibase/frontend-core"
|
||||||
|
|
||||||
let searchString
|
let searchString
|
||||||
|
@ -28,13 +29,9 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Panel
|
<Panel title="Screens" borderRight>
|
||||||
title="Screens"
|
|
||||||
showAddButton
|
|
||||||
onClickAddButton={showNewScreenModal}
|
|
||||||
borderRight
|
|
||||||
>
|
|
||||||
<Layout paddingX="L" paddingY="XL" gap="S">
|
<Layout paddingX="L" paddingY="XL" gap="S">
|
||||||
|
<Button on:click={showNewScreenModal} cta>Add screen</Button>
|
||||||
<Search
|
<Search
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
value={searchString}
|
value={searchString}
|
||||||
|
@ -56,14 +53,15 @@
|
||||||
</Layout>
|
</Layout>
|
||||||
{#each filteredScreens as screen (screen._id)}
|
{#each filteredScreens as screen (screen._id)}
|
||||||
<NavItem
|
<NavItem
|
||||||
icon={screen.routing.homeScreen ? "Home" : "WebPage"}
|
icon={screen.routing.homeScreen ? "Home" : null}
|
||||||
indentLevel={0}
|
indentLevel={0}
|
||||||
selected={$store.selectedScreenId === screen._id}
|
selected={$store.selectedScreenId === screen._id}
|
||||||
text={screen.routing.route}
|
text={screen.routing.route}
|
||||||
on:click={() => store.actions.screens.select(screen._id)}
|
on:click={() => store.actions.screens.select(screen._id)}
|
||||||
color={RoleUtils.getRoleColour(screen.routing.roleId)}
|
rightAlignIcon
|
||||||
>
|
>
|
||||||
<ScreenDropdownMenu screenId={screen._id} />
|
<ScreenDropdownMenu screenId={screen._id} />
|
||||||
|
<RoleIndicator slot="right" roleId={screen.routing.roleId} />
|
||||||
</NavItem>
|
</NavItem>
|
||||||
{/each}
|
{/each}
|
||||||
{#if !filteredScreens?.length}
|
{#if !filteredScreens?.length}
|
||||||
|
|
|
@ -66,21 +66,26 @@
|
||||||
<Body>
|
<Body>
|
||||||
The app is currently using version
|
The app is currently using version
|
||||||
<strong>{$store.version}</strong>
|
<strong>{$store.version}</strong>
|
||||||
but version <strong>{clientPackage.version}</strong> is available.
|
but version <strong>{clientPackage.version}</strong> is
|
||||||
</Body>
|
available.
|
||||||
{:else}
|
<br />
|
||||||
<p class="version-status">
|
|
||||||
The app is currently using version
|
|
||||||
<strong>{$store.version}</strong>. You're running the latest!
|
|
||||||
</p>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
Updates can contain new features, performance improvements and bug
|
Updates can contain new features, performance improvements and bug
|
||||||
fixes.
|
fixes.
|
||||||
|
</Body>
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
<Button cta on:click={versionModal.show()}>Update app</Button>
|
<Button cta on:click={versionModal.show()}>Update app</Button>
|
||||||
</div>
|
</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>
|
</Body>
|
||||||
</Layout>
|
</Layout>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { Layout, Heading, Body, Divider, Label, Select } from "@budibase/bbui"
|
import { Layout, Heading, Body, Divider, Label, Select } from "@budibase/bbui"
|
||||||
import { themeStore } from "builderStore"
|
import { themeStore } from "builderStore"
|
||||||
import { capitalise } from "helpers"
|
|
||||||
import { Constants } from "@budibase/frontend-core"
|
import { Constants } from "@budibase/frontend-core"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -15,10 +14,11 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<Label size="L">Builder theme</Label>
|
<Label size="L">Builder theme</Label>
|
||||||
<Select
|
<Select
|
||||||
options={Constants.ThemeOptions}
|
options={Constants.Themes}
|
||||||
bind:value={$themeStore.theme}
|
bind:value={$themeStore.theme}
|
||||||
placeholder={null}
|
placeholder={null}
|
||||||
getOptionLabel={capitalise}
|
getOptionLabel={x => x.name}
|
||||||
|
getOptionValue={x => x.class}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.1.29-alpha.1",
|
"@budibase/backend-core": "^1.1.29-alpha.2",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
|
@ -2763,7 +2763,7 @@
|
||||||
},
|
},
|
||||||
"longformfield": {
|
"longformfield": {
|
||||||
"name": "Long Form Field",
|
"name": "Long Form Field",
|
||||||
"icon": "AlignLeft",
|
"icon": "TextAlignLeft",
|
||||||
"styles": [
|
"styles": [
|
||||||
"size"
|
"size"
|
||||||
],
|
],
|
||||||
|
@ -3737,7 +3737,7 @@
|
||||||
"cardsblock": {
|
"cardsblock": {
|
||||||
"block": true,
|
"block": true,
|
||||||
"name": "Cards block",
|
"name": "Cards block",
|
||||||
"icon": "Table",
|
"icon": "PersonalizationField",
|
||||||
"styles": [
|
"styles": [
|
||||||
"size"
|
"size"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.1.29-alpha.1",
|
"@budibase/bbui": "^1.1.31",
|
||||||
"@budibase/frontend-core": "^1.1.29-alpha.1",
|
"@budibase/frontend-core": "^1.1.31",
|
||||||
"@budibase/string-templates": "^1.1.29-alpha.1",
|
"@budibase/string-templates": "^1.1.31",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.1.29-alpha.1",
|
"@budibase/bbui": "^1.1.31",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,11 +133,31 @@ export const SqlNumberTypeRangeMap = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ThemeOptions = [
|
export const Themes = [
|
||||||
"lightest",
|
{
|
||||||
"light",
|
class: "lightest",
|
||||||
"dark",
|
name: "Lightest",
|
||||||
"darkest",
|
},
|
||||||
"nord",
|
{
|
||||||
"midnight",
|
class: "light",
|
||||||
|
name: "Light",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class: "dark",
|
||||||
|
name: "Dark",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class: "darkest",
|
||||||
|
name: "Darkest",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class: "nord",
|
||||||
|
name: "Nord",
|
||||||
|
base: "darkest",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class: "midnight",
|
||||||
|
name: "Midnight",
|
||||||
|
base: "darkest",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
--spectrum-global-color-gray-50: #2e3440;
|
--spectrum-global-color-gray-50: #2e3440;
|
||||||
--spectrum-global-color-gray-75: #353b4a;
|
--spectrum-global-color-gray-75: #353b4a;
|
||||||
--spectrum-global-color-gray-100: #3b4252;
|
--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-300: #4c566a;
|
||||||
--spectrum-global-color-gray-400: #5a657d;
|
--spectrum-global-color-gray-400: #5a657d;
|
||||||
--spectrum-global-color-gray-500: #677590;
|
--spectrum-global-color-gray-500: #677590;
|
||||||
|
@ -41,6 +41,6 @@
|
||||||
--spectrum-global-color-gray-800: #bac1cd;
|
--spectrum-global-color-gray-800: #bac1cd;
|
||||||
--spectrum-global-color-gray-900: #eceff4;
|
--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);
|
--spectrum-alias-highlight-active: rgba(169, 177, 193, 0.1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { Helpers } from "@budibase/bbui"
|
import { Helpers } from "@budibase/bbui"
|
||||||
import { OperatorOptions, SqlNumberTypeRangeMap } from "../constants"
|
import { OperatorOptions, SqlNumberTypeRangeMap } from "../constants"
|
||||||
|
|
||||||
|
const HBS_REGEX = /{{([^{].*?)}}/g
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the valid operator options for a certain data type
|
* Returns the valid operator options for a certain data type
|
||||||
* @param type the data type
|
* @param type the data type
|
||||||
|
@ -98,6 +100,8 @@ export const buildLuceneQuery = filter => {
|
||||||
if (Array.isArray(filter)) {
|
if (Array.isArray(filter)) {
|
||||||
filter.forEach(expression => {
|
filter.forEach(expression => {
|
||||||
let { operator, field, type, value, externalType } = 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
|
// Parse all values into correct types
|
||||||
if (type === "datetime") {
|
if (type === "datetime") {
|
||||||
// Ensure date value is a valid date and parse into correct format
|
// 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 (type === "number" && !Array.isArray(value)) {
|
||||||
if (operator === "oneOf") {
|
if (operator === "oneOf") {
|
||||||
value = value.split(",").map(item => parseFloat(item))
|
value = value.split(",").map(item => parseFloat(item))
|
||||||
} else {
|
} else if (!isHbs) {
|
||||||
value = parseFloat(value)
|
value = parseFloat(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ const RolePriorities = {
|
||||||
[Roles.PUBLIC]: 1,
|
[Roles.PUBLIC]: 1,
|
||||||
}
|
}
|
||||||
const RoleColours = {
|
const RoleColours = {
|
||||||
[Roles.ADMIN]: "var(--spectrum-global-color-static-seafoam-400)",
|
[Roles.ADMIN]: "var(--spectrum-global-color-static-red-400)",
|
||||||
[Roles.POWER]: "var(--spectrum-global-color-static-purple-400)",
|
[Roles.POWER]: "var(--spectrum-global-color-static-orange-400)",
|
||||||
[Roles.BASIC]: "var(--spectrum-global-color-static-magenta-400)",
|
[Roles.BASIC]: "var(--spectrum-global-color-static-green-400)",
|
||||||
[Roles.PUBLIC]: "var(--spectrum-global-color-static-yellow-400)",
|
[Roles.PUBLIC]: "var(--spectrum-global-color-static-blue-400)",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getRolePriority = roleId => {
|
export const getRolePriority = roleId => {
|
||||||
|
@ -18,5 +18,7 @@ export const getRolePriority = roleId => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getRoleColour = roleId => {
|
export const getRoleColour = roleId => {
|
||||||
return RoleColours[roleId] ?? "rgb(20, 115, 230)"
|
return (
|
||||||
|
RoleColours[roleId] ?? "var(--spectrum-global-color-static-magenta-400)"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -77,11 +77,11 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "10.0.3",
|
"@apidevtools/swagger-parser": "10.0.3",
|
||||||
"@budibase/backend-core": "^1.1.29-alpha.1",
|
"@budibase/backend-core": "^1.1.31",
|
||||||
"@budibase/client": "^1.1.29-alpha.1",
|
"@budibase/client": "^1.1.31",
|
||||||
"@budibase/pro": "1.1.29-alpha.1",
|
"@budibase/pro": "1.1.31",
|
||||||
"@budibase/string-templates": "^1.1.29-alpha.1",
|
"@budibase/string-templates": "^1.1.31",
|
||||||
"@budibase/types": "^1.1.29-alpha.1",
|
"@budibase/types": "^1.1.31",
|
||||||
"@bull-board/api": "3.7.0",
|
"@bull-board/api": "3.7.0",
|
||||||
"@bull-board/koa": "3.9.4",
|
"@bull-board/koa": "3.9.4",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -5,7 +5,11 @@ import {
|
||||||
getDevelopmentAppID,
|
getDevelopmentAppID,
|
||||||
} from "@budibase/backend-core/db"
|
} from "@budibase/backend-core/db"
|
||||||
import { DocumentTypes, getAutomationParams } from "../../../db/utils"
|
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 { app as appCache } from "@budibase/backend-core/cache"
|
||||||
import {
|
import {
|
||||||
getAppId,
|
getAppId,
|
||||||
|
@ -80,6 +84,7 @@ async function initDeployedApp(prodAppId: any) {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
).rows.map((row: any) => row.doc)
|
).rows.map((row: any) => row.doc)
|
||||||
|
await clearMetadata()
|
||||||
console.log("You have " + automations.length + " automations")
|
console.log("You have " + automations.length + " automations")
|
||||||
const promises = []
|
const promises = []
|
||||||
console.log("Disabling prod crons..")
|
console.log("Disabling prod crons..")
|
||||||
|
|
|
@ -82,6 +82,27 @@ async function getTable(appId, tableId) {
|
||||||
return ctx.body
|
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 }) {
|
exports.run = async function ({ inputs, appId }) {
|
||||||
const { tableId, filters, sortColumn, sortOrder, limit } = inputs
|
const { tableId, filters, sortColumn, sortOrder, limit } = inputs
|
||||||
const table = await getTable(appId, tableId)
|
const table = await getTable(appId, tableId)
|
||||||
|
@ -99,7 +120,7 @@ exports.run = async function ({ inputs, appId }) {
|
||||||
sortType,
|
sortType,
|
||||||
limit,
|
limit,
|
||||||
sort: sortColumn,
|
sort: sortColumn,
|
||||||
query: filters || {},
|
query: typeCoercion(filters || {}, table),
|
||||||
// default to ascending, like data tab
|
// default to ascending, like data tab
|
||||||
sortOrder: sortOrder || SortOrders.ASCENDING,
|
sortOrder: sortOrder || SortOrders.ASCENDING,
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,15 +31,21 @@ exports.definition = {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
description: "Whether the action was successful",
|
description: "Whether the action was successful",
|
||||||
},
|
},
|
||||||
|
message: {
|
||||||
|
type: "string",
|
||||||
|
description: "What was output",
|
||||||
},
|
},
|
||||||
required: ["success"],
|
},
|
||||||
|
required: ["success", "message"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.run = async function ({ inputs, appId }) {
|
exports.run = async function ({ inputs, appId }) {
|
||||||
console.log(`App ${appId} - ${inputs.text}`)
|
const message = `App ${appId} - ${inputs.text}`
|
||||||
|
console.log(message)
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
|
message,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe("Run through some parts of the automations system", () => {
|
||||||
it("should be able to init in builder", async () => {
|
it("should be able to init in builder", async () => {
|
||||||
await triggers.externalTrigger(basicAutomation(), { a: 1 })
|
await triggers.externalTrigger(basicAutomation(), { a: 1 })
|
||||||
await wait(100)
|
await wait(100)
|
||||||
expect(thread).toHaveBeenCalled()
|
expect(thread.execute).toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to init in prod", async () => {
|
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)
|
await wait(100)
|
||||||
expect(thread).toHaveBeenCalledWith(makePartial({
|
expect(thread.execute).toHaveBeenCalledWith(makePartial({
|
||||||
data: {
|
data: {
|
||||||
event: {
|
event: {
|
||||||
fields: {
|
fields: {
|
||||||
|
|
|
@ -6,10 +6,16 @@ import newid from "../db/newid"
|
||||||
import { updateEntityMetadata } from "../utilities"
|
import { updateEntityMetadata } from "../utilities"
|
||||||
import { MetadataTypes, WebhookType } from "../constants"
|
import { MetadataTypes, WebhookType } from "../constants"
|
||||||
import { getProdAppID, doWithDB } from "@budibase/backend-core/db"
|
import { getProdAppID, doWithDB } from "@budibase/backend-core/db"
|
||||||
|
import { getAutomationMetadataParams } from "../db/utils"
|
||||||
import { cloneDeep } from "lodash/fp"
|
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 { tenancy } from "@budibase/backend-core"
|
||||||
import { quotas } from "@budibase/pro"
|
import { quotas } from "@budibase/pro"
|
||||||
|
import { Automation } from "@budibase/types"
|
||||||
|
|
||||||
const WH_STEP_ID = definitions.WEBHOOK.stepId
|
const WH_STEP_ID = definitions.WEBHOOK.stepId
|
||||||
const CRON_STEP_ID = definitions.CRON.stepId
|
const CRON_STEP_ID = definitions.CRON.stepId
|
||||||
|
@ -82,6 +88,26 @@ export async function disableAllCrons(appId: any) {
|
||||||
return Promise.all(promises)
|
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.
|
* 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
|
* @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) {
|
export async function cleanupAutomations(appId: any) {
|
||||||
await disableAllCrons(appId)
|
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
|
||||||
|
}
|
||||||
|
|
|
@ -208,10 +208,7 @@ exports.AutomationErrors = {
|
||||||
FAILURE_CONDITION: "FAILURE_CONDITION_MET",
|
FAILURE_CONDITION: "FAILURE_CONDITION_MET",
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.LoopStepTypes = {
|
|
||||||
ARRAY: "Array",
|
|
||||||
STRING: "String",
|
|
||||||
}
|
|
||||||
|
|
||||||
// pass through the list from the auth/core lib
|
// pass through the list from the auth/core lib
|
||||||
exports.ObjectStoreBuckets = ObjectStoreBuckets
|
exports.ObjectStoreBuckets = ObjectStoreBuckets
|
||||||
|
|
||||||
|
exports.MAX_AUTOMATION_RECURRING_ERRORS = 5
|
||||||
|
|
|
@ -41,6 +41,7 @@ const DocumentTypes = {
|
||||||
METADATA: "metadata",
|
METADATA: "metadata",
|
||||||
MEM_VIEW: "view",
|
MEM_VIEW: "view",
|
||||||
USER_FLAG: "flag",
|
USER_FLAG: "flag",
|
||||||
|
AUTOMATION_METADATA: "meta_au",
|
||||||
}
|
}
|
||||||
|
|
||||||
const InternalTables = {
|
const InternalTables = {
|
||||||
|
@ -311,6 +312,21 @@ exports.generateQueryID = datasourceId => {
|
||||||
}${SEPARATOR}${datasourceId}${SEPARATOR}${newid()}`
|
}${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.
|
* Gets parameters for retrieving a query, this is a utility function for the getDocParams function.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
|
@ -1,36 +1,47 @@
|
||||||
require("./utils").threadSetup()
|
import { default as threadUtils } from "./utils"
|
||||||
const actions = require("../automations/actions")
|
threadUtils.threadSetup()
|
||||||
const automationUtils = require("../automations/automationUtils")
|
import { isRecurring, disableCron, isErrorInOutput } from "../automations/utils"
|
||||||
const AutomationEmitter = require("../events/AutomationEmitter")
|
import { default as actions } from "../automations/actions"
|
||||||
const { processObject } = require("@budibase/string-templates")
|
import { default as automationUtils } from "../automations/automationUtils"
|
||||||
const { DocumentTypes } = require("../db/utils")
|
import { default as AutomationEmitter } from "../events/AutomationEmitter"
|
||||||
const { definitions: triggerDefs } = require("../automations/triggerInfo")
|
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 { doInAppContext, getAppDB } = require("@budibase/backend-core/context")
|
||||||
const { AutomationErrors, LoopStepTypes } = require("../constants")
|
const { logAlertWithInfo, logWarn } = require("@budibase/backend-core/logging")
|
||||||
const { storeLog } = require("../automations/logging")
|
const { processObject } = require("@budibase/string-templates")
|
||||||
const FILTER_STEP_ID = actions.ACTION_DEFINITIONS.FILTER.stepId
|
const FILTER_STEP_ID = actions.ACTION_DEFINITIONS.FILTER.stepId
|
||||||
const LOOP_STEP_ID = actions.ACTION_DEFINITIONS.LOOP.stepId
|
const LOOP_STEP_ID = actions.ACTION_DEFINITIONS.LOOP.stepId
|
||||||
|
|
||||||
const CRON_STEP_ID = triggerDefs.CRON.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 { cloneDeep } = require("lodash/fp")
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
|
|
||||||
function typecastForLooping(loopStep, input) {
|
function typecastForLooping(loopStep: LoopStep, input: LoopInput) {
|
||||||
if (!input || !input.binding) {
|
if (!input || !input.binding) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const isArray = Array.isArray(input.binding),
|
|
||||||
isString = typeof input.binding === "string"
|
|
||||||
try {
|
try {
|
||||||
switch (loopStep.inputs.option) {
|
switch (loopStep.inputs.option) {
|
||||||
case LoopStepTypes.ARRAY:
|
case LoopStepTypes.ARRAY:
|
||||||
if (isString) {
|
if (typeof input.binding === "string") {
|
||||||
return JSON.parse(input.binding)
|
return JSON.parse(input.binding)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case LoopStepTypes.STRING:
|
case LoopStepTypes.STRING:
|
||||||
if (isArray) {
|
if (Array.isArray(input.binding)) {
|
||||||
return input.binding.join(",")
|
return input.binding.join(",")
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
@ -41,7 +52,7 @@ function typecastForLooping(loopStep, input) {
|
||||||
return input.binding
|
return input.binding
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLoopIterations(loopStep, input) {
|
function getLoopIterations(loopStep: LoopStep, input: LoopInput) {
|
||||||
const binding = typecastForLooping(loopStep, input)
|
const binding = typecastForLooping(loopStep, input)
|
||||||
if (!loopStep || !binding) {
|
if (!loopStep || !binding) {
|
||||||
return 1
|
return 1
|
||||||
|
@ -57,11 +68,24 @@ function getLoopIterations(loopStep, input) {
|
||||||
* inputs and handles any outputs.
|
* inputs and handles any outputs.
|
||||||
*/
|
*/
|
||||||
class Orchestrator {
|
class Orchestrator {
|
||||||
constructor(automation, triggerOutput = {}) {
|
_chainCount: number
|
||||||
this._metadata = triggerOutput.metadata
|
_appId: string
|
||||||
this._chainCount = this._metadata ? this._metadata.automationChainCount : 0
|
_automation: Automation
|
||||||
this._appId = triggerOutput.appId
|
_emitter: any
|
||||||
this._app = null
|
_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
|
const triggerStepId = automation.definition.trigger.stepId
|
||||||
triggerOutput = this.cleanupTriggerOutputs(triggerStepId, triggerOutput)
|
triggerOutput = this.cleanupTriggerOutputs(triggerStepId, triggerOutput)
|
||||||
// remove from context
|
// remove from context
|
||||||
|
@ -79,14 +103,14 @@ class Orchestrator {
|
||||||
this.updateExecutionOutput(triggerId, triggerStepId, null, triggerOutput)
|
this.updateExecutionOutput(triggerId, triggerStepId, null, triggerOutput)
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanupTriggerOutputs(stepId, triggerOutput) {
|
cleanupTriggerOutputs(stepId: string, triggerOutput: TriggerOutput) {
|
||||||
if (stepId === CRON_STEP_ID) {
|
if (stepId === CRON_STEP_ID) {
|
||||||
triggerOutput.timestamp = Date.now()
|
triggerOutput.timestamp = Date.now()
|
||||||
}
|
}
|
||||||
return triggerOutput
|
return triggerOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStepFunctionality(stepId) {
|
async getStepFunctionality(stepId: string) {
|
||||||
let step = await actions.getAction(stepId)
|
let step = await actions.getAction(stepId)
|
||||||
if (step == null) {
|
if (step == null) {
|
||||||
throw `Cannot find automation step by name ${stepId}`
|
throw `Cannot find automation step by name ${stepId}`
|
||||||
|
@ -94,25 +118,107 @@ class Orchestrator {
|
||||||
return step
|
return step
|
||||||
}
|
}
|
||||||
|
|
||||||
async getApp() {
|
async getMetadata(): Promise<AutomationMetadata> {
|
||||||
if (this._app) {
|
const metadataId = generateAutomationMetadataID(this._automation._id)
|
||||||
return this._app
|
|
||||||
}
|
|
||||||
const db = getAppDB()
|
const db = getAppDB()
|
||||||
this._app = await db.get(DocumentTypes.APP_METADATA)
|
let metadata: AutomationMetadata
|
||||||
return this._app
|
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 }
|
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)
|
// 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.trigger = stepObj
|
||||||
}
|
}
|
||||||
this.executionOutput.steps.push(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, {
|
this.executionOutput.steps.splice(loopStepNumber, 0, {
|
||||||
id: step.id,
|
id: step.id,
|
||||||
stepId: step.stepId,
|
stepId: step.stepId,
|
||||||
|
@ -133,11 +239,22 @@ class Orchestrator {
|
||||||
async execute() {
|
async execute() {
|
||||||
let automation = this._automation
|
let automation = this._automation
|
||||||
let stopped = false
|
let stopped = false
|
||||||
let loopStep = null
|
let loopStep: AutomationStep | undefined = undefined
|
||||||
|
|
||||||
let stepCount = 0
|
let stepCount = 0
|
||||||
let loopStepNumber = null
|
let loopStepNumber: any = undefined
|
||||||
let loopSteps = []
|
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) {
|
for (let step of automation.definition.steps) {
|
||||||
stepCount++
|
stepCount++
|
||||||
let input,
|
let input,
|
||||||
|
@ -151,7 +268,7 @@ class Orchestrator {
|
||||||
|
|
||||||
if (loopStep) {
|
if (loopStep) {
|
||||||
input = await processObject(loopStep.inputs, this._context)
|
input = await processObject(loopStep.inputs, this._context)
|
||||||
iterations = getLoopIterations(loopStep, input)
|
iterations = getLoopIterations(loopStep as LoopStep, input)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let index = 0; index < iterations; index++) {
|
for (let index = 0; index < iterations; index++) {
|
||||||
|
@ -166,14 +283,17 @@ class Orchestrator {
|
||||||
|
|
||||||
let tempOutput = { items: loopSteps, iterations: iterationCount }
|
let tempOutput = { items: loopSteps, iterations: iterationCount }
|
||||||
try {
|
try {
|
||||||
newInput.binding = typecastForLooping(loopStep, newInput)
|
newInput.binding = typecastForLooping(
|
||||||
|
loopStep as LoopStep,
|
||||||
|
newInput
|
||||||
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.updateContextAndOutput(loopStepNumber, step, tempOutput, {
|
this.updateContextAndOutput(loopStepNumber, step, tempOutput, {
|
||||||
status: AutomationErrors.INCORRECT_TYPE,
|
status: AutomationErrors.INCORRECT_TYPE,
|
||||||
success: false,
|
success: false,
|
||||||
})
|
})
|
||||||
loopSteps = null
|
loopSteps = undefined
|
||||||
loopStep = null
|
loopStep = undefined
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,8 +343,8 @@ class Orchestrator {
|
||||||
status: AutomationErrors.MAX_ITERATIONS,
|
status: AutomationErrors.MAX_ITERATIONS,
|
||||||
success: true,
|
success: true,
|
||||||
})
|
})
|
||||||
loopSteps = null
|
loopSteps = undefined
|
||||||
loopStep = null
|
loopStep = undefined
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +352,7 @@ class Orchestrator {
|
||||||
const currentItem = this._context.steps[loopStepNumber]?.currentItem
|
const currentItem = this._context.steps[loopStepNumber]?.currentItem
|
||||||
if (currentItem && typeof currentItem === "object") {
|
if (currentItem && typeof currentItem === "object") {
|
||||||
isFailure = Object.keys(currentItem).some(value => {
|
isFailure = Object.keys(currentItem).some(value => {
|
||||||
return currentItem[value] === loopStep.inputs.failure
|
return currentItem[value] === loopStep?.inputs.failure
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
isFailure = currentItem && currentItem === loopStep.inputs.failure
|
isFailure = currentItem && currentItem === loopStep.inputs.failure
|
||||||
|
@ -243,8 +363,8 @@ class Orchestrator {
|
||||||
status: AutomationErrors.FAILURE_CONDITION,
|
status: AutomationErrors.FAILURE_CONDITION,
|
||||||
success: false,
|
success: false,
|
||||||
})
|
})
|
||||||
loopSteps = null
|
loopSteps = undefined
|
||||||
loopStep = null
|
loopStep = undefined
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,7 +415,7 @@ class Orchestrator {
|
||||||
if (loopStep) {
|
if (loopStep) {
|
||||||
iterationCount++
|
iterationCount++
|
||||||
if (index === iterations - 1) {
|
if (index === iterations - 1) {
|
||||||
loopStep = null
|
loopStep = undefined
|
||||||
this._context.steps.splice(loopStepNumber, 1)
|
this._context.steps.splice(loopStepNumber, 1)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -316,22 +436,26 @@ class Orchestrator {
|
||||||
})
|
})
|
||||||
|
|
||||||
this._context.steps.splice(loopStepNumber, 0, tempOutput)
|
this._context.steps.splice(loopStepNumber, 0, tempOutput)
|
||||||
loopSteps = null
|
loopSteps = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the logs for the automation run
|
// store the logs for the automation run
|
||||||
await storeLog(this._automation, this.executionOutput)
|
await storeLog(this._automation, this.executionOutput)
|
||||||
|
if (isProdAppID(this._appId) && isRecurring(automation) && metadata) {
|
||||||
|
await this.updateMetadata(metadata)
|
||||||
|
}
|
||||||
return this.executionOutput
|
return this.executionOutput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = (input, callback) => {
|
export function execute(input: AutomationEvent, callback: WorkerCallback) {
|
||||||
const appId = input.data.event.appId
|
const appId = input.data.event.appId
|
||||||
doInAppContext(appId, async () => {
|
doInAppContext(appId, async () => {
|
||||||
const automationOrchestrator = new Orchestrator(
|
const automationOrchestrator = new Orchestrator(
|
||||||
input.data.automation,
|
input.data.automation,
|
||||||
input.data.event
|
input.data.event,
|
||||||
|
input.opts
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
const response = await automationOrchestrator.execute()
|
const response = await automationOrchestrator.execute()
|
|
@ -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
|
||||||
|
}
|
|
@ -18,26 +18,23 @@ function typeToFile(type: any) {
|
||||||
default:
|
default:
|
||||||
throw "Unknown thread type"
|
throw "Unknown thread type"
|
||||||
}
|
}
|
||||||
|
// have to use require here, to make it work with worker-farm
|
||||||
return require.resolve(filename)
|
return require.resolve(filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Thread {
|
export class Thread {
|
||||||
type: any
|
type: any
|
||||||
count: any
|
count: any
|
||||||
disableThreading: any
|
|
||||||
workers: any
|
workers: any
|
||||||
timeoutMs: any
|
timeoutMs: any
|
||||||
|
disableThreading: boolean
|
||||||
|
|
||||||
static workerRefs: any[] = []
|
static workerRefs: any[] = []
|
||||||
|
|
||||||
constructor(type: any, opts: any = { timeoutMs: null, count: 1 }) {
|
constructor(type: any, opts: any = { timeoutMs: null, count: 1 }) {
|
||||||
this.type = type
|
this.type = type
|
||||||
this.count = opts.count ? opts.count : 1
|
this.count = opts.count ? opts.count : 1
|
||||||
this.disableThreading =
|
this.disableThreading = this.shouldDisableThreading()
|
||||||
env.isTest() ||
|
|
||||||
env.DISABLE_THREADING ||
|
|
||||||
this.count === 0 ||
|
|
||||||
env.isInThread()
|
|
||||||
if (!this.disableThreading) {
|
if (!this.disableThreading) {
|
||||||
const workerOpts: any = {
|
const workerOpts: any = {
|
||||||
autoStart: true,
|
autoStart: true,
|
||||||
|
@ -47,26 +44,28 @@ export class Thread {
|
||||||
this.timeoutMs = opts.timeoutMs
|
this.timeoutMs = opts.timeoutMs
|
||||||
workerOpts.maxCallTime = opts.timeoutMs
|
workerOpts.maxCallTime = opts.timeoutMs
|
||||||
}
|
}
|
||||||
this.workers = workerFarm(workerOpts, typeToFile(type))
|
this.workers = workerFarm(workerOpts, typeToFile(type), ["execute"])
|
||||||
Thread.workerRefs.push(this.workers)
|
Thread.workerRefs.push(this.workers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run(data: any) {
|
shouldDisableThreading(): boolean {
|
||||||
return new Promise((resolve, reject) => {
|
return !!(
|
||||||
let fncToCall
|
env.isTest() ||
|
||||||
// if in test then don't use threading
|
env.DISABLE_THREADING ||
|
||||||
if (this.disableThreading) {
|
this.count === 0 ||
|
||||||
fncToCall = require(typeToFile(this.type))
|
env.isInThread()
|
||||||
} else {
|
)
|
||||||
fncToCall = this.workers
|
|
||||||
}
|
}
|
||||||
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") {
|
if (err && err.type === "TimeoutError") {
|
||||||
reject(
|
reject(
|
||||||
new Error(
|
new Error(`Query response time exceeded ${timeout}ms timeout.`)
|
||||||
`Query response time exceeded ${this.timeoutMs}ms timeout.`
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
@ -74,6 +73,15 @@ export class Thread {
|
||||||
resolve(response)
|
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)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const threadUtils = require("./utils")
|
import { default as threadUtils } from "./utils"
|
||||||
threadUtils.threadSetup()
|
threadUtils.threadSetup()
|
||||||
|
import { WorkerCallback, QueryEvent, QueryVariable } from "./definitions"
|
||||||
const ScriptRunner = require("../utilities/scriptRunner")
|
const ScriptRunner = require("../utilities/scriptRunner")
|
||||||
const { integrations } = require("../integrations")
|
const { integrations } = require("../integrations")
|
||||||
const { processStringSync } = require("@budibase/string-templates")
|
const { processStringSync } = require("@budibase/string-templates")
|
||||||
|
@ -19,7 +20,22 @@ const {
|
||||||
} = require("../integrations/queries/sql")
|
} = require("../integrations/queries/sql")
|
||||||
|
|
||||||
class QueryRunner {
|
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.datasource = input.datasource
|
||||||
this.queryVerb = input.queryVerb
|
this.queryVerb = input.queryVerb
|
||||||
this.fields = input.fields
|
this.fields = input.fields
|
||||||
|
@ -37,9 +53,10 @@ class QueryRunner {
|
||||||
this.queryResponse = {}
|
this.queryResponse = {}
|
||||||
this.hasRerun = false
|
this.hasRerun = false
|
||||||
this.hasRefreshedOAuth = false
|
this.hasRefreshedOAuth = false
|
||||||
|
this.hasDynamicVariables = false
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute() {
|
async execute(): Promise<any> {
|
||||||
let { datasource, fields, queryVerb, transformer } = this
|
let { datasource, fields, queryVerb, transformer } = this
|
||||||
|
|
||||||
let datasourceClone = cloneDeep(datasource)
|
let datasourceClone = cloneDeep(datasource)
|
||||||
|
@ -52,7 +69,7 @@ class QueryRunner {
|
||||||
|
|
||||||
if (datasourceClone.config.authConfigs) {
|
if (datasourceClone.config.authConfigs) {
|
||||||
datasourceClone.config.authConfigs =
|
datasourceClone.config.authConfigs =
|
||||||
datasourceClone.config.authConfigs.map(config => {
|
datasourceClone.config.authConfigs.map((config: any) => {
|
||||||
return enrichQueryFields(config, this.ctx)
|
return enrichQueryFields(config, this.ctx)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -138,8 +155,8 @@ class QueryRunner {
|
||||||
}
|
}
|
||||||
|
|
||||||
// map into JSON if just raw primitive here
|
// map into JSON if just raw primitive here
|
||||||
if (rows.find(row => typeof row !== "object")) {
|
if (rows.find((row: any) => typeof row !== "object")) {
|
||||||
rows = rows.map(value => ({ value }))
|
rows = rows.map((value: any) => ({ value }))
|
||||||
}
|
}
|
||||||
|
|
||||||
// get all the potential fields in the schema
|
// get all the potential fields in the schema
|
||||||
|
@ -152,7 +169,7 @@ class QueryRunner {
|
||||||
return { rows, keys, info, extra, pagination }
|
return { rows, keys, info, extra, pagination }
|
||||||
}
|
}
|
||||||
|
|
||||||
async runAnotherQuery(queryId, parameters) {
|
async runAnotherQuery(queryId: string, parameters: any) {
|
||||||
const db = getAppDB()
|
const db = getAppDB()
|
||||||
const query = await db.get(queryId)
|
const query = await db.get(queryId)
|
||||||
const datasource = await db.get(query.datasourceId)
|
const datasource = await db.get(query.datasourceId)
|
||||||
|
@ -163,12 +180,13 @@ class QueryRunner {
|
||||||
fields: query.fields,
|
fields: query.fields,
|
||||||
parameters,
|
parameters,
|
||||||
transformer: query.transformer,
|
transformer: query.transformer,
|
||||||
|
queryId,
|
||||||
},
|
},
|
||||||
{ noRecursiveQuery: true }
|
{ noRecursiveQuery: true }
|
||||||
).execute()
|
).execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
async refreshOAuth2(ctx) {
|
async refreshOAuth2(ctx: any) {
|
||||||
const { oauth2, providerType, _id } = ctx.user
|
const { oauth2, providerType, _id } = ctx.user
|
||||||
const { configId } = ctx.auth
|
const { configId } = ctx.auth
|
||||||
|
|
||||||
|
@ -200,7 +218,7 @@ class QueryRunner {
|
||||||
return resp
|
return resp
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDynamicVariable(variable) {
|
async getDynamicVariable(variable: QueryVariable) {
|
||||||
let { parameters } = this
|
let { parameters } = this
|
||||||
const queryId = variable.queryId,
|
const queryId = variable.queryId,
|
||||||
name = variable.name
|
name = variable.name
|
||||||
|
@ -233,7 +251,7 @@ class QueryRunner {
|
||||||
if (!this.noRecursiveQuery) {
|
if (!this.noRecursiveQuery) {
|
||||||
// need to see if this uses any variables
|
// need to see if this uses any variables
|
||||||
const stringFields = JSON.stringify(fields)
|
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)
|
// don't allow a query to use its own dynamic variable (loop)
|
||||||
if (variable.queryId === this.queryId) {
|
if (variable.queryId === this.queryId) {
|
||||||
return false
|
return false
|
||||||
|
@ -242,7 +260,9 @@ class QueryRunner {
|
||||||
const regex = new RegExp(`{{[ ]*${variable.name}[ ]*}}`)
|
const regex = new RegExp(`{{[ ]*${variable.name}[ ]*}}`)
|
||||||
return regex.test(stringFields)
|
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)
|
const responses = await Promise.all(dynamics)
|
||||||
for (let i = 0; i < foundVars.length; i++) {
|
for (let i = 0; i < foundVars.length; i++) {
|
||||||
const variable = foundVars[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 () => {
|
doInAppContext(input.appId, async () => {
|
||||||
const Runner = new QueryRunner(input)
|
const Runner = new QueryRunner(input)
|
||||||
try {
|
try {
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { QueryVariable } from "./definitions"
|
||||||
const env = require("../environment")
|
const env = require("../environment")
|
||||||
const db = require("../db")
|
const db = require("../db")
|
||||||
const redis = require("@budibase/backend-core/redis")
|
const redis = require("@budibase/backend-core/redis")
|
||||||
const { SEPARATOR } = require("@budibase/backend-core/db")
|
const { SEPARATOR } = require("@budibase/backend-core/db")
|
||||||
|
|
||||||
const VARIABLE_TTL_SECONDS = 3600
|
const VARIABLE_TTL_SECONDS = 3600
|
||||||
let client
|
let client: any
|
||||||
|
|
||||||
async function getClient() {
|
async function getClient() {
|
||||||
if (!client) {
|
if (!client) {
|
||||||
|
@ -14,10 +15,16 @@ async function getClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
process.on("exit", async () => {
|
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
|
// don't run this if not threading
|
||||||
if (env.isTest() || env.DISABLE_THREADING) {
|
if (env.isTest() || env.DISABLE_THREADING) {
|
||||||
return
|
return
|
||||||
|
@ -27,16 +34,15 @@ exports.threadSetup = () => {
|
||||||
db.init()
|
db.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeVariableKey(queryId, variable) {
|
export async function checkCacheForDynamicVariable(
|
||||||
return `${queryId}${SEPARATOR}${variable}`
|
queryId: string,
|
||||||
}
|
variable: string
|
||||||
|
) {
|
||||||
exports.checkCacheForDynamicVariable = async (queryId, variable) => {
|
|
||||||
const cache = await getClient()
|
const cache = await getClient()
|
||||||
return cache.get(makeVariableKey(queryId, variable))
|
return cache.get(makeVariableKey(queryId, variable))
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.invalidateDynamicVariables = async cachedVars => {
|
export async function invalidateDynamicVariables(cachedVars: QueryVariable[]) {
|
||||||
const cache = await getClient()
|
const cache = await getClient()
|
||||||
let promises = []
|
let promises = []
|
||||||
for (let variable of cachedVars) {
|
for (let variable of cachedVars) {
|
||||||
|
@ -47,7 +53,11 @@ exports.invalidateDynamicVariables = async cachedVars => {
|
||||||
await Promise.all(promises)
|
await Promise.all(promises)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.storeDynamicVariable = async (queryId, variable, value) => {
|
export async function storeDynamicVariable(
|
||||||
|
queryId: string,
|
||||||
|
variable: string,
|
||||||
|
value: any
|
||||||
|
) {
|
||||||
const cache = await getClient()
|
const cache = await getClient()
|
||||||
await cache.store(
|
await cache.store(
|
||||||
makeVariableKey(queryId, variable),
|
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") {
|
if (typeof resp === "string") {
|
||||||
try {
|
try {
|
||||||
resp = JSON.parse(resp)
|
resp = JSON.parse(resp)
|
||||||
|
@ -67,7 +77,7 @@ exports.formatResponse = resp => {
|
||||||
return resp
|
return resp
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.hasExtraData = response => {
|
export function hasExtraData(response: any) {
|
||||||
return (
|
return (
|
||||||
typeof response === "object" &&
|
typeof response === "object" &&
|
||||||
!Array.isArray(response) &&
|
!Array.isArray(response) &&
|
||||||
|
@ -76,3 +86,12 @@ exports.hasExtraData = response => {
|
||||||
response.info != null
|
response.info != null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
hasExtraData,
|
||||||
|
formatResponse,
|
||||||
|
storeDynamicVariable,
|
||||||
|
invalidateDynamicVariables,
|
||||||
|
checkCacheForDynamicVariable,
|
||||||
|
threadSetup,
|
||||||
|
}
|
|
@ -109,6 +109,10 @@ class InMemoryQueue {
|
||||||
async clean() {
|
async clean() {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getJob() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = InMemoryQueue
|
module.exports = InMemoryQueue
|
||||||
|
|
|
@ -156,9 +156,9 @@
|
||||||
adal-node "^0.2.2"
|
adal-node "^0.2.2"
|
||||||
|
|
||||||
"@azure/storage-blob@^12.5.0":
|
"@azure/storage-blob@^12.5.0":
|
||||||
version "12.11.0"
|
version "12.10.0"
|
||||||
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.11.0.tgz#2e27902ab293715411ab1f7c8fae422ad0b4b827"
|
resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.10.0.tgz#b92269f45a1765700a900b41ca81a474a6e36ea4"
|
||||||
integrity sha512-na+FisoARuaOWaHWpmdtk3FeuTWf2VWamdJ9/TJJzj5ZdXPLC3juoDgFs6XVuJIoK30yuBpyFBEDXVRK4pB7Tg==
|
integrity sha512-FBEPKGnvtQJS8V8Tg1P9obgmVD9AodrIfwtwhBpsjenClhFyugMp3HPJY0tF7rInUB/CivKBCbnQKrUnKxqxzw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@azure/abort-controller" "^1.0.0"
|
"@azure/abort-controller" "^1.0.0"
|
||||||
"@azure/core-http" "^2.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"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@1.1.29-alpha.1":
|
"@budibase/backend-core@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.1.tgz#0940fa58c7d41d254a4f048854f4600ba684ea27"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.2.tgz#56c115be486fc264348ee2a06fc5387c202051ec"
|
||||||
integrity sha512-pJbg1wWFWBsMZwHDSyykr/9QagoK9wycgviTZjzJDwdGsQn/HpQYM1Brz3MhTKoMbnP3C39DwhUORMMrT9ch5Q==
|
integrity sha512-q2yIKrvFj8kQVOekNp17FOkclLlYSPy2gjKicfnsHg1Oeq+iGhgUHQYJ+QTBUlU61Xjd6E9Kkp5pQXOZ09Bf5g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/types" "^1.1.29-alpha.1"
|
"@budibase/types" "^1.1.29-alpha.2"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-sdk "2.1030.0"
|
aws-sdk "2.1030.0"
|
||||||
bcrypt "5.0.1"
|
bcrypt "5.0.1"
|
||||||
|
@ -1177,13 +1177,13 @@
|
||||||
svelte-flatpickr "^3.2.3"
|
svelte-flatpickr "^3.2.3"
|
||||||
svelte-portal "^1.0.0"
|
svelte-portal "^1.0.0"
|
||||||
|
|
||||||
"@budibase/pro@1.1.29-alpha.1":
|
"@budibase/pro@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.1.tgz#df07cd31cac8439a924c1308f9a4fe22495e96b5"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.2.tgz#cafeb466acb9ff552dcb37710f84e3b2192d39f1"
|
||||||
integrity sha512-xBTnHvZV57AnekseGMjUMf3vq1TUd8o/iCQsnKNgYwj1Ie7alvJ1CscHnjylDULP6uqeOwvtoTJ4FyoaExx9fw==
|
integrity sha512-rD11gx5MvmSN0VS6ie2bjbeOnPj/0sbzzsoEqogOcki9ovdMdiXtlIHkYYcVZbgodY47Fw+jrJVSspJ9vr5SFg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "1.1.29-alpha.1"
|
"@budibase/backend-core" "1.1.29-alpha.2"
|
||||||
"@budibase/types" "1.1.29-alpha.1"
|
"@budibase/types" "1.1.29-alpha.2"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
@ -1206,10 +1206,15 @@
|
||||||
svelte-apexcharts "^1.0.2"
|
svelte-apexcharts "^1.0.2"
|
||||||
svelte-flatpickr "^3.1.0"
|
svelte-flatpickr "^3.1.0"
|
||||||
|
|
||||||
"@budibase/types@1.1.29-alpha.1", "@budibase/types@^1.1.29-alpha.1":
|
"@budibase/types@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.1.tgz#8141a6d44176b3dfd53d216640ab7f460fd96e75"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.2.tgz#d824f8045ba362c4ac91798b70239064a3aca98c"
|
||||||
integrity sha512-e/6Pd1NA80y9vszYADy2NBTl3QMNpcpOoe5+CBfSomnR2GL0FPyJp9jBj9Nr0G88wDiXe5tvwMZsgY+hkLdvJQ==
|
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":
|
"@bull-board/api@3.7.0":
|
||||||
version "3.7.0"
|
version "3.7.0"
|
||||||
|
@ -1959,24 +1964,29 @@
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||||
|
|
||||||
"@jridgewell/gen-mapping@^0.3.0":
|
"@jridgewell/gen-mapping@^0.3.0":
|
||||||
version "0.3.1"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9"
|
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
|
||||||
integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==
|
integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/set-array" "^1.0.0"
|
"@jridgewell/set-array" "^1.0.1"
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||||
"@jridgewell/trace-mapping" "^0.3.9"
|
"@jridgewell/trace-mapping" "^0.3.9"
|
||||||
|
|
||||||
"@jridgewell/resolve-uri@^3.0.3":
|
"@jridgewell/resolve-uri@^3.0.3":
|
||||||
version "3.0.7"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe"
|
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
|
||||||
integrity sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==
|
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
|
||||||
|
|
||||||
"@jridgewell/set-array@^1.0.0":
|
"@jridgewell/set-array@^1.0.0":
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
|
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
|
||||||
integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
|
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":
|
"@jridgewell/source-map@^0.3.2":
|
||||||
version "0.3.2"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb"
|
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/trace-mapping" "^0.3.9"
|
||||||
|
|
||||||
"@jridgewell/sourcemap-codec@^1.4.10":
|
"@jridgewell/sourcemap-codec@^1.4.10":
|
||||||
version "1.4.13"
|
version "1.4.14"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
|
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
|
||||||
integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
|
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"
|
version "0.3.13"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
|
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
|
||||||
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
|
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
|
||||||
|
@ -1998,6 +2008,14 @@
|
||||||
"@jridgewell/resolve-uri" "^3.0.3"
|
"@jridgewell/resolve-uri" "^3.0.3"
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
"@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":
|
"@jsdevtools/ono@^7.1.3":
|
||||||
version "7.1.3"
|
version "7.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796"
|
resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796"
|
||||||
|
@ -2842,7 +2860,7 @@
|
||||||
"@types/bson" "*"
|
"@types/bson" "*"
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/node-fetch@2.6.1":
|
"@types/node-fetch@2.6.1", "@types/node-fetch@^2.5.0":
|
||||||
version "2.6.1"
|
version "2.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975"
|
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975"
|
||||||
integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==
|
integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==
|
||||||
|
@ -2850,14 +2868,6 @@
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
form-data "^3.0.0"
|
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":
|
"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.13.4", "@types/node@>=13.7.0":
|
||||||
version "17.0.41"
|
version "17.0.41"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.41.tgz#1607b2fd3da014ae5d4d1b31bc792a39348dfb9b"
|
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"
|
resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b"
|
||||||
integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
|
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:
|
aws-sdk@2.1030.0:
|
||||||
version "2.1030.0"
|
version "2.1030.0"
|
||||||
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1030.0.tgz#24a856af3d2b8b37c14a8f59974993661c66fd82"
|
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"
|
xml2js "0.4.19"
|
||||||
|
|
||||||
aws-sdk@^2.878.0:
|
aws-sdk@^2.878.0:
|
||||||
version "2.1174.0"
|
version "2.1152.0"
|
||||||
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1174.0.tgz#3e2acb1ee29229cc5d97015b2d1a18c41e967979"
|
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1152.0.tgz#73e4fb81b3a9c289234b5d6848bcdb854f169bdf"
|
||||||
integrity sha512-t/Cwbdunmoj3WAI+u+hw/kr6mla1sYCn+VncxxIjkACStA47+ZTsfd7cQfpoVMit5KubkHaJ3SHX4/qvmt0Jfg==
|
integrity sha512-Lqwk0bDhm3vzpYb3AAM9VgGHeDpbB8+o7UJnP9R+CO23kJfi/XRpKihAcbyKDD/AUQ+O1LJaUVpvaJYLS9Am7w==
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer "4.9.2"
|
buffer "4.9.2"
|
||||||
events "1.1.1"
|
events "1.1.1"
|
||||||
|
@ -3758,7 +3763,6 @@ aws-sdk@^2.878.0:
|
||||||
querystring "0.2.0"
|
querystring "0.2.0"
|
||||||
sax "1.2.1"
|
sax "1.2.1"
|
||||||
url "0.10.3"
|
url "0.10.3"
|
||||||
util "^0.12.4"
|
|
||||||
uuid "8.0.0"
|
uuid "8.0.0"
|
||||||
xml2js "0.4.19"
|
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"
|
resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
|
||||||
integrity sha512-JM8N6PytDbmIYm1IhPWlo8vr3NtfjhDY/1MhD/a5b/aad/USE8a0+NsqE9d5n+GVGmuNkPQWm4bFQWv18d8tMg==
|
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"
|
version "1.20.1"
|
||||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814"
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814"
|
||||||
integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==
|
integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==
|
||||||
|
@ -7449,14 +7453,6 @@ is-accessor-descriptor@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
kind-of "^6.0.0"
|
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:
|
is-arrayish@^0.2.1:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
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"
|
is-class-hotfix "~0.0.6"
|
||||||
isstream "~0.1.2"
|
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:
|
is-typedarray@^1.0.0, is-typedarray@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
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:
|
dependencies:
|
||||||
moment ">= 2.9.0"
|
moment ">= 2.9.0"
|
||||||
|
|
||||||
"moment@>= 2.9.0":
|
"moment@>= 2.9.0", moment@^2.29.3:
|
||||||
version "2.29.3"
|
version "2.29.3"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3"
|
||||||
integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==
|
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:
|
mongodb@3.6.3:
|
||||||
version "3.6.3"
|
version "3.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.3.tgz#eddaed0cc3598474d7a15f0f2a5b04848489fd05"
|
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:
|
simple-lru-cache@^0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/simple-lru-cache/-/simple-lru-cache-0.0.2.tgz#d59cc3a193c1a5d0320f84ee732f6e4713e511dd"
|
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:
|
simple-swizzle@^0.2.2:
|
||||||
version "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"
|
||||||
|
|
||||||
snowflake-sdk@^1.6.0:
|
snowflake-sdk@^1.6.0:
|
||||||
version "1.6.11"
|
version "1.6.10"
|
||||||
resolved "https://registry.yarnpkg.com/snowflake-sdk/-/snowflake-sdk-1.6.11.tgz#2797c816d0d2af6d56180949e1364e53df8a9c13"
|
resolved "https://registry.yarnpkg.com/snowflake-sdk/-/snowflake-sdk-1.6.10.tgz#c6c4f267edbc50d3c1ef6fcc2651188bb8545dce"
|
||||||
integrity sha512-w4oCXjNQ1peAJjhnrwihr+epYw1pSxbe5/+PdxexYb2rzowyOn0RA5PFbir90q/dx0jzM2gvPiHDjnSBEZ1/zA==
|
integrity sha512-kguQQSGhmNqZfmN/yZNDaIaMMktTcrTYBjtyx+szJzV69b5F+5b77btpYp+bCFqao69otVM+IPUtb3sugvCVnQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@azure/storage-blob" "^12.5.0"
|
"@azure/storage-blob" "^12.5.0"
|
||||||
"@techteamer/ocsp" "1.0.0"
|
"@techteamer/ocsp" "1.0.0"
|
||||||
|
@ -13129,9 +13109,9 @@ terser-webpack-plugin@^5.1.3:
|
||||||
terser "^5.7.2"
|
terser "^5.7.2"
|
||||||
|
|
||||||
terser@^5.7.2:
|
terser@^5.7.2:
|
||||||
version "5.14.0"
|
version "5.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.0.tgz#eefeec9af5153f55798180ee2617f390bdd285e2"
|
resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10"
|
||||||
integrity sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==
|
integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@jridgewell/source-map" "^0.3.2"
|
"@jridgewell/source-map" "^0.3.2"
|
||||||
acorn "^8.5.0"
|
acorn "^8.5.0"
|
||||||
|
@ -13771,18 +13751,6 @@ util.promisify@^1.0.0, util.promisify@^1.0.1:
|
||||||
has-symbols "^1.0.1"
|
has-symbols "^1.0.1"
|
||||||
object.getownpropertydescriptors "^2.1.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:
|
utils-merge@1.x.x:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
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"
|
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
|
||||||
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
|
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:
|
which@^1.2.9:
|
||||||
version "1.3.1"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
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"
|
readable-stream "^3.6.0"
|
||||||
triple-beam "^1.3.0"
|
triple-beam "^1.3.0"
|
||||||
|
|
||||||
winston@^3.1.0:
|
winston@^3.1.0, winston@^3.3.3:
|
||||||
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:
|
|
||||||
version "3.7.2"
|
version "3.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1"
|
resolved "https://registry.yarnpkg.com/winston/-/winston-3.7.2.tgz#95b4eeddbec902b3db1424932ac634f887c400b1"
|
||||||
integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==
|
integrity sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/types",
|
"name": "@budibase/types",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase types",
|
"description": "Budibase types",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
|
@ -12,6 +12,14 @@ export interface Automation extends Document {
|
||||||
export interface AutomationStep {
|
export interface AutomationStep {
|
||||||
id: string
|
id: string
|
||||||
stepId: string
|
stepId: string
|
||||||
|
inputs: {
|
||||||
|
[key: string]: any
|
||||||
|
}
|
||||||
|
schema: {
|
||||||
|
inputs: {
|
||||||
|
[key: string]: any
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AutomationTrigger {
|
export interface AutomationTrigger {
|
||||||
|
@ -23,11 +31,12 @@ export enum AutomationStatus {
|
||||||
SUCCESS = "success",
|
SUCCESS = "success",
|
||||||
ERROR = "error",
|
ERROR = "error",
|
||||||
STOPPED = "stopped",
|
STOPPED = "stopped",
|
||||||
|
STOPPED_ERROR = "stopped_error",
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AutomationResults {
|
export interface AutomationResults {
|
||||||
automationId: string
|
automationId?: string
|
||||||
status: string
|
status?: AutomationStatus
|
||||||
trigger?: any
|
trigger?: any
|
||||||
steps: {
|
steps: {
|
||||||
stepId: string
|
stepId: string
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.1.29-alpha.1",
|
"version": "1.1.31",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -35,10 +35,10 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.1.29-alpha.1",
|
"@budibase/backend-core": "^1.1.31",
|
||||||
"@budibase/pro": "1.1.29-alpha.1",
|
"@budibase/pro": "1.1.31",
|
||||||
"@budibase/string-templates": "^1.1.29-alpha.1",
|
"@budibase/string-templates": "^1.1.31",
|
||||||
"@budibase/types": "^1.1.29-alpha.1",
|
"@budibase/types": "^1.1.31",
|
||||||
"@koa/router": "8.0.8",
|
"@koa/router": "8.0.8",
|
||||||
"@sentry/node": "6.17.7",
|
"@sentry/node": "6.17.7",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
|
|
|
@ -291,12 +291,12 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@budibase/backend-core@1.1.29-alpha.1":
|
"@budibase/backend-core@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.1.tgz#0940fa58c7d41d254a4f048854f4600ba684ea27"
|
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.29-alpha.2.tgz#56c115be486fc264348ee2a06fc5387c202051ec"
|
||||||
integrity sha512-pJbg1wWFWBsMZwHDSyykr/9QagoK9wycgviTZjzJDwdGsQn/HpQYM1Brz3MhTKoMbnP3C39DwhUORMMrT9ch5Q==
|
integrity sha512-q2yIKrvFj8kQVOekNp17FOkclLlYSPy2gjKicfnsHg1Oeq+iGhgUHQYJ+QTBUlU61Xjd6E9Kkp5pQXOZ09Bf5g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/types" "^1.1.29-alpha.1"
|
"@budibase/types" "^1.1.29-alpha.2"
|
||||||
"@techpass/passport-openidconnect" "0.3.2"
|
"@techpass/passport-openidconnect" "0.3.2"
|
||||||
aws-sdk "2.1030.0"
|
aws-sdk "2.1030.0"
|
||||||
bcrypt "5.0.1"
|
bcrypt "5.0.1"
|
||||||
|
@ -324,21 +324,26 @@
|
||||||
uuid "8.3.2"
|
uuid "8.3.2"
|
||||||
zlib "1.0.5"
|
zlib "1.0.5"
|
||||||
|
|
||||||
"@budibase/pro@1.1.29-alpha.1":
|
"@budibase/pro@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.1.tgz#df07cd31cac8439a924c1308f9a4fe22495e96b5"
|
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.29-alpha.2.tgz#cafeb466acb9ff552dcb37710f84e3b2192d39f1"
|
||||||
integrity sha512-xBTnHvZV57AnekseGMjUMf3vq1TUd8o/iCQsnKNgYwj1Ie7alvJ1CscHnjylDULP6uqeOwvtoTJ4FyoaExx9fw==
|
integrity sha512-rD11gx5MvmSN0VS6ie2bjbeOnPj/0sbzzsoEqogOcki9ovdMdiXtlIHkYYcVZbgodY47Fw+jrJVSspJ9vr5SFg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@budibase/backend-core" "1.1.29-alpha.1"
|
"@budibase/backend-core" "1.1.29-alpha.2"
|
||||||
"@budibase/types" "1.1.29-alpha.1"
|
"@budibase/types" "1.1.29-alpha.2"
|
||||||
"@koa/router" "8.0.8"
|
"@koa/router" "8.0.8"
|
||||||
joi "17.6.0"
|
joi "17.6.0"
|
||||||
node-fetch "^2.6.1"
|
node-fetch "^2.6.1"
|
||||||
|
|
||||||
"@budibase/types@1.1.29-alpha.1", "@budibase/types@^1.1.29-alpha.1":
|
"@budibase/types@1.1.29-alpha.2":
|
||||||
version "1.1.29-alpha.1"
|
version "1.1.29-alpha.2"
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.1.tgz#8141a6d44176b3dfd53d216640ab7f460fd96e75"
|
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.29-alpha.2.tgz#d824f8045ba362c4ac91798b70239064a3aca98c"
|
||||||
integrity sha512-e/6Pd1NA80y9vszYADy2NBTl3QMNpcpOoe5+CBfSomnR2GL0FPyJp9jBj9Nr0G88wDiXe5tvwMZsgY+hkLdvJQ==
|
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":
|
"@cspotcode/source-map-consumer@0.8.0":
|
||||||
version "0.8.0"
|
version "0.8.0"
|
||||||
|
|
Loading…
Reference in New Issue