Merge branch 'master' into isolated-vm
This commit is contained in:
commit
3aff1004c8
|
@ -45,6 +45,16 @@
|
|||
"no-prototype-builtins": "off",
|
||||
"local-rules/no-budibase-imports": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"packages/builder/**/*",
|
||||
"packages/client/**/*",
|
||||
"packages/frontend-core/**/*"
|
||||
],
|
||||
"rules": {
|
||||
"no-console": ["error", { "allow": ["warn", "error", "debug"] } ]
|
||||
}
|
||||
}
|
||||
],
|
||||
"rules": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.16.0",
|
||||
"version": "2.16.2",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 485ec16a9eed48c548a5f1239772139f3319f028
|
||||
Subproject commit 52f51dcfb96d3fe58c8cc7a905e7d733f7cd84c2
|
|
@ -21,7 +21,7 @@
|
|||
"test:watch": "jest --watchAll"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/nano": "10.1.4",
|
||||
"@budibase/nano": "10.1.5",
|
||||
"@budibase/pouchdb-replication-stream": "1.2.10",
|
||||
"@budibase/shared-core": "0.0.0",
|
||||
"@budibase/types": "0.0.0",
|
||||
|
|
|
@ -23,7 +23,7 @@ const getCloudfrontSignParams = () => {
|
|||
return {
|
||||
keypairId: env.CLOUDFRONT_PUBLIC_KEY_ID!,
|
||||
privateKeyString: getPrivateKey(),
|
||||
expireTime: new Date().getTime() + 1000 * 60 * 60, // 1 hour
|
||||
expireTime: new Date().getTime() + 1000 * 60 * 60 * 24, // 1 day
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -364,7 +364,6 @@ const getContextBindings = (asset, componentId) => {
|
|||
* Generates a set of bindings for a given component context
|
||||
*/
|
||||
const generateComponentContextBindings = (asset, componentContext) => {
|
||||
console.log("Hello ")
|
||||
const { component, definition, contexts } = componentContext
|
||||
if (!component || !definition || !contexts?.length) {
|
||||
return []
|
||||
|
|
|
@ -158,6 +158,7 @@ export const getFrontendStore = () => {
|
|||
...INITIAL_FRONTEND_STATE.features,
|
||||
...application.features,
|
||||
},
|
||||
automations: application.automations || {},
|
||||
icon: application.icon || {},
|
||||
initialised: true,
|
||||
}))
|
||||
|
|
|
@ -21,7 +21,7 @@ export const createBuilderWebsocket = appId => {
|
|||
})
|
||||
})
|
||||
socket.on("connect_error", err => {
|
||||
console.log("Failed to connect to builder websocket:", err.message)
|
||||
console.error("Failed to connect to builder websocket:", err.message)
|
||||
})
|
||||
socket.on("disconnect", () => {
|
||||
userStore.actions.reset()
|
||||
|
|
|
@ -157,6 +157,7 @@
|
|||
let bindings = []
|
||||
let loopBlockCount = 0
|
||||
const addBinding = (name, value, icon, idx, isLoopBlock, bindingName) => {
|
||||
if (!name) return
|
||||
const runtimeBinding = determineRuntimeBinding(name, idx, isLoopBlock)
|
||||
const categoryName = determineCategoryName(idx, isLoopBlock, bindingName)
|
||||
|
||||
|
@ -291,7 +292,6 @@
|
|||
loopBlockCount++
|
||||
continue
|
||||
}
|
||||
|
||||
Object.entries(schema).forEach(([name, value]) =>
|
||||
addBinding(name, value, icon, idx, isLoopBlock, bindingName)
|
||||
)
|
||||
|
|
|
@ -312,7 +312,7 @@ export const insertBinding = (view, from, to, text, mode) => {
|
|||
} else if (mode.name == "handlebars") {
|
||||
parsedInsert = hbInsert(view.state.doc?.toString(), from, to, text)
|
||||
} else {
|
||||
console.log("Unsupported")
|
||||
console.warn("Unsupported")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
}))
|
||||
navigateStep(target)
|
||||
} else {
|
||||
console.log("Could not retrieve step")
|
||||
console.warn("Could not retrieve step")
|
||||
}
|
||||
} else {
|
||||
if (typeof tourStep.onComplete === "function") {
|
||||
|
|
|
@ -3,11 +3,11 @@ import { get } from "svelte/store"
|
|||
|
||||
const registerNode = async (node, tourStepKey) => {
|
||||
if (!node) {
|
||||
console.log("Tour Handler - an anchor node is required")
|
||||
console.warn("Tour Handler - an anchor node is required")
|
||||
}
|
||||
|
||||
if (!get(store).tourKey) {
|
||||
console.log("Tour Handler - No active tour ", tourStepKey, node)
|
||||
console.error("Tour Handler - No active tour ", tourStepKey, node)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const endUserOnboarding = async ({ skipped = false } = {}) => {
|
|||
onboarding: false,
|
||||
}))
|
||||
} catch (e) {
|
||||
console.log("Onboarding failed", e)
|
||||
console.error("Onboarding failed", e)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
@ -52,7 +52,7 @@ export const syncURLToState = options => {
|
|||
let cachedPage = get(routify.page)
|
||||
let previousParamsHash = null
|
||||
let debug = false
|
||||
const log = (...params) => debug && console.log(`[${urlParam}]`, ...params)
|
||||
const log = (...params) => debug && console.debug(`[${urlParam}]`, ...params)
|
||||
|
||||
// Navigate to a certain URL
|
||||
const gotoUrl = (url, params) => {
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
return
|
||||
}
|
||||
if (!prodAppId) {
|
||||
console.log("Application id required")
|
||||
console.error("Application id required")
|
||||
return
|
||||
}
|
||||
await usersFetch.update({
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
try {
|
||||
await store.actions.screens.updateSetting(get(selectedScreen), key, value)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
notifications.error("Error saving screen settings")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
$goto(`./${screenId}`)
|
||||
store.actions.screens.select(screenId)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
notifications.error("Error creating screens")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,15 +36,12 @@
|
|||
let status = null
|
||||
let timeRange = null
|
||||
let loaded = false
|
||||
|
||||
$: app = $apps.find(app => app.devId === $store.appId?.includes(app.appId))
|
||||
$: app = $apps.find(app => $store.appId?.includes(app.appId))
|
||||
$: licensePlan = $auth.user?.license?.plan
|
||||
$: page = $pageInfo.page
|
||||
$: fetchLogs(automationId, status, page, timeRange)
|
||||
$: isCloud = $admin.cloud
|
||||
|
||||
$: chainAutomations = app?.automations?.chainAutomations ?? !isCloud
|
||||
|
||||
const timeOptions = [
|
||||
{ value: "90-d", label: "Past 90 days" },
|
||||
{ value: "30-d", label: "Past 30 days" },
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
async function login() {
|
||||
form.validate()
|
||||
if (Object.keys(errors).length > 0) {
|
||||
console.log("errors", errors)
|
||||
console.error("errors", errors)
|
||||
return
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -307,7 +307,7 @@
|
|||
// Reset view
|
||||
resetView()
|
||||
} catch (e) {
|
||||
console.log("There was a problem with the map", e)
|
||||
console.error("There was a problem with the map", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
resolve({ initialised: true })
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("There was a problem scanning the image", err)
|
||||
console.error("There was a problem scanning the image", err)
|
||||
resolve({ initialised: false })
|
||||
})
|
||||
})
|
||||
|
|
|
@ -28,6 +28,7 @@ import { fetchDatasourceSchema } from "./utils/schema.js"
|
|||
import { getAPIKey } from "./utils/api.js"
|
||||
import { enrichButtonActions } from "./utils/buttonActions.js"
|
||||
import { processStringSync, makePropSafe } from "@budibase/string-templates"
|
||||
import { fetchData, LuceneUtils } from "@budibase/frontend-core"
|
||||
|
||||
export default {
|
||||
API,
|
||||
|
@ -54,6 +55,8 @@ export default {
|
|||
linkable,
|
||||
getAction,
|
||||
fetchDatasourceSchema,
|
||||
fetchData,
|
||||
LuceneUtils,
|
||||
ContextScopes,
|
||||
getAPIKey,
|
||||
enrichButtonActions,
|
||||
|
|
|
@ -14,7 +14,7 @@ const createOrgStore = () => {
|
|||
const settingsConfigDoc = await API.getTenantConfig(tenantId)
|
||||
set({ logoUrl: settingsConfigDoc.config.logoUrl })
|
||||
} catch (e) {
|
||||
console.log("Could not init org ", e)
|
||||
console.error("Could not init org ", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -211,29 +211,27 @@ const deleteRowHandler = async action => {
|
|||
|
||||
const triggerAutomationHandler = async action => {
|
||||
const { fields, notificationOverride, timeout } = action.parameters
|
||||
if (fields) {
|
||||
try {
|
||||
const result = await API.triggerAutomation({
|
||||
automationId: action.parameters.automationId,
|
||||
fields,
|
||||
timeout,
|
||||
})
|
||||
|
||||
// Value will exist if automation is synchronous, so return it.
|
||||
if (result.value) {
|
||||
if (!notificationOverride) {
|
||||
notificationStore.actions.success("Automation ran successfully")
|
||||
}
|
||||
return { result }
|
||||
}
|
||||
try {
|
||||
const result = await API.triggerAutomation({
|
||||
automationId: action.parameters.automationId,
|
||||
fields,
|
||||
timeout,
|
||||
})
|
||||
|
||||
// Value will exist if automation is synchronous, so return it.
|
||||
if (result.value) {
|
||||
if (!notificationOverride) {
|
||||
notificationStore.actions.success("Automation triggered")
|
||||
notificationStore.actions.success("Automation ran successfully")
|
||||
}
|
||||
} catch (error) {
|
||||
// Abort next actions
|
||||
return false
|
||||
return { result }
|
||||
}
|
||||
|
||||
if (!notificationOverride) {
|
||||
notificationStore.actions.success("Automation triggered")
|
||||
}
|
||||
} catch (error) {
|
||||
// Abort next actions
|
||||
return false
|
||||
}
|
||||
}
|
||||
const navigationHandler = action => {
|
||||
|
|
|
@ -29,7 +29,7 @@ export const createGridWebsocket = context => {
|
|||
connectToDatasource(get(datasource))
|
||||
})
|
||||
socket.on("connect_error", err => {
|
||||
console.log("Failed to connect to grid websocket:", err.message)
|
||||
console.error("Failed to connect to grid websocket:", err.message)
|
||||
})
|
||||
|
||||
// User events
|
||||
|
|
|
@ -445,6 +445,9 @@ export async function update(ctx: UserCtx) {
|
|||
name: app.name,
|
||||
url: app.url,
|
||||
icon: app.icon,
|
||||
automations: {
|
||||
chainAutomations: app.automations?.chainAutomations,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"jest": {},
|
||||
"devDependencies": {
|
||||
"@budibase/nano": "10.1.4",
|
||||
"@budibase/nano": "10.1.5",
|
||||
"@types/koa": "2.13.4",
|
||||
"@types/pouchdb": "6.4.0",
|
||||
"@types/redlock": "4.0.3",
|
||||
|
|
|
@ -2050,10 +2050,10 @@
|
|||
to-gfm-code-block "^0.1.1"
|
||||
uuid "^9.0.1"
|
||||
|
||||
"@budibase/nano@10.1.4":
|
||||
version "10.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.4.tgz#5c2670d0b4c12d736ddd6581c57d47c0aa45efad"
|
||||
integrity sha512-J+IVaAljGideDvJss/AUxXA1599HEIUJo5c0LLlmc1KMA3GZWZjyX+w2fxAw3qF7hqFvX+qAStQgdcD3+/GPMA==
|
||||
"@budibase/nano@10.1.5":
|
||||
version "10.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.5.tgz#eeaded7bfc707ecabf8fde604425b865a90c06ec"
|
||||
integrity sha512-q1eKIsYKo+iK17zsJYd3VBl+5ufQMPpHYLec0wVsid8wnJVrTQk7RNpBlBUn/EDgXM7t8XNNHlERqHu+CxJu8Q==
|
||||
dependencies:
|
||||
"@types/tough-cookie" "^4.0.2"
|
||||
axios "^1.1.3"
|
||||
|
|
Loading…
Reference in New Issue