1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

move constant to shared-core

This commit is contained in:
Peter Clement 2024-02-13 15:14:03 +00:00
parent 46903e36ef
commit 2660149fea
3 changed files with 6 additions and 7 deletions

View file

@ -2,15 +2,13 @@
import { Button, Select, Input, Label } from "@budibase/bbui"
import { onMount, createEventDispatcher } from "svelte"
import { flags } from "stores/backend"
import { helpers } from "@budibase/shared-core"
import { helpers, REBOOT_CRON } from "@budibase/shared-core"
const dispatch = createEventDispatcher()
export let value
let error
const reboot = "@reboot"
$: {
const exists = CRON_EXPRESSIONS.some(cron => cron.value === value)
const customIndex = CRON_EXPRESSIONS.findIndex(
@ -25,7 +23,7 @@
}
const onChange = e => {
if (value !== reboot) {
if (value !== REBOOT_CRON) {
error = helpers.cron.validate(e.detail).err
}
if (e.detail === value || error) {
@ -62,7 +60,7 @@
if (!$flags.cloud) {
CRON_EXPRESSIONS.push({
label: "Every Budibase Reboot",
value: reboot,
value: REBOOT_CRON,
})
}
})

View file

@ -16,10 +16,9 @@ import {
} from "@budibase/types"
import sdk from "../sdk"
import { automationsEnabled } from "../features"
import { helpers } from "@budibase/shared-core"
import { helpers, REBOOT_CRON } from "@budibase/shared-core"
import tracer from "dd-trace"
const REBOOT_CRON = "@reboot"
const WH_STEP_ID = definitions.WEBHOOK.stepId
const CRON_STEP_ID = definitions.CRON.stepId
let Runner: Thread

View file

@ -99,6 +99,8 @@ export const SocketSessionTTL = 60
export const ValidQueryNameRegex = /^[^()]*$/
export const ValidColumnNameRegex = /^[_a-zA-Z0-9\s]*$/g
export const REBOOT_CRON = "@reboot"
export const InvalidFileExtensions = [
"7z",
"action",