Merge branch 'master' into dependabot/npm_and_yarn/braces-3.0.3
This commit is contained in:
commit
624cc9fe88
|
@ -93,15 +93,21 @@ function isApps() {
|
||||||
return environment.SERVICE_TYPE === ServiceType.APPS
|
return environment.SERVICE_TYPE === ServiceType.APPS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isQA() {
|
||||||
|
return environment.BUDIBASE_ENVIRONMENT === "QA"
|
||||||
|
}
|
||||||
|
|
||||||
const environment = {
|
const environment = {
|
||||||
isTest,
|
isTest,
|
||||||
isJest,
|
isJest,
|
||||||
isDev,
|
isDev,
|
||||||
isWorker,
|
isWorker,
|
||||||
isApps,
|
isApps,
|
||||||
|
isQA,
|
||||||
isProd: () => {
|
isProd: () => {
|
||||||
return !isDev()
|
return !isDev()
|
||||||
},
|
},
|
||||||
|
BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT,
|
||||||
JS_BCRYPT: process.env.JS_BCRYPT,
|
JS_BCRYPT: process.env.JS_BCRYPT,
|
||||||
JWT_SECRET: process.env.JWT_SECRET,
|
JWT_SECRET: process.env.JWT_SECRET,
|
||||||
JWT_SECRET_FALLBACK: process.env.JWT_SECRET_FALLBACK,
|
JWT_SECRET_FALLBACK: process.env.JWT_SECRET_FALLBACK,
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
on:click={() => onSelect(data)}
|
on:click={() => onSelect(data)}
|
||||||
>
|
>
|
||||||
<span class="spectrum-Menu-itemLabel">
|
<span class="spectrum-Menu-itemLabel">
|
||||||
{data.label}
|
{data.datasource?.name ? `${data.datasource.name} - ` : ""}{data.label}
|
||||||
</span>
|
</span>
|
||||||
<svg
|
<svg
|
||||||
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
|
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
label: m.name,
|
label: m.name,
|
||||||
tableId: m._id,
|
tableId: m._id,
|
||||||
type: "table",
|
type: "table",
|
||||||
|
datasource: $datasources.list.find(ds => ds._id === m.sourceId || m.datasourceId),
|
||||||
}))
|
}))
|
||||||
$: viewsV1 = $viewsStore.list.map(view => ({
|
$: viewsV1 = $viewsStore.list.map(view => ({
|
||||||
...view,
|
...view,
|
||||||
|
|
|
@ -25,8 +25,8 @@ export async function getAppMigrationVersion(appId: string): Promise<string> {
|
||||||
|
|
||||||
let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey)
|
let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey)
|
||||||
|
|
||||||
// We don't want to cache in dev, in order to be able to tweak it
|
// We don't want to cache in dev or QA in order to be able to tweak it
|
||||||
if (metadata && !env.isDev()) {
|
if (metadata && !env.isDev() && !env.isQA()) {
|
||||||
return metadata.version
|
return metadata.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import * as pro from "@budibase/pro"
|
||||||
import * as api from "../api"
|
import * as api from "../api"
|
||||||
import sdk from "../sdk"
|
import sdk from "../sdk"
|
||||||
import { initialise as initialiseWebsockets } from "../websockets"
|
import { initialise as initialiseWebsockets } from "../websockets"
|
||||||
import { automationsEnabled, printFeatures } from "../features"
|
import { apiEnabled, automationsEnabled, printFeatures } from "../features"
|
||||||
import * as jsRunner from "../jsRunner"
|
import * as jsRunner from "../jsRunner"
|
||||||
import Koa from "koa"
|
import Koa from "koa"
|
||||||
import { Server } from "http"
|
import { Server } from "http"
|
||||||
|
@ -70,6 +70,9 @@ export async function startup(
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
printFeatures()
|
printFeatures()
|
||||||
|
if (env.BUDIBASE_ENVIRONMENT) {
|
||||||
|
console.log(`service running environment: "${env.BUDIBASE_ENVIRONMENT}"`)
|
||||||
|
}
|
||||||
STARTUP_RAN = true
|
STARTUP_RAN = true
|
||||||
if (app && server && !env.CLUSTER_MODE) {
|
if (app && server && !env.CLUSTER_MODE) {
|
||||||
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
||||||
|
@ -117,9 +120,11 @@ export async function startup(
|
||||||
queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
|
queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
|
||||||
// app migrations and automations on other service
|
// app migrations and automations on other service
|
||||||
if (automationsEnabled()) {
|
if (automationsEnabled()) {
|
||||||
queuePromises.push(appMigrations.init())
|
|
||||||
queuePromises.push(automations.init())
|
queuePromises.push(automations.init())
|
||||||
}
|
}
|
||||||
|
if (apiEnabled()) {
|
||||||
|
queuePromises.push(appMigrations.init())
|
||||||
|
}
|
||||||
queuePromises.push(initPro())
|
queuePromises.push(initPro())
|
||||||
if (app) {
|
if (app) {
|
||||||
// bring routes online as final step once everything ready
|
// bring routes online as final step once everything ready
|
||||||
|
|
|
@ -46,6 +46,7 @@ const environment = {
|
||||||
SMTP_FALLBACK_ENABLED: process.env.SMTP_FALLBACK_ENABLED,
|
SMTP_FALLBACK_ENABLED: process.env.SMTP_FALLBACK_ENABLED,
|
||||||
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
||||||
SQS_SEARCH_ENABLE: process.env.SQS_SEARCH_ENABLE,
|
SQS_SEARCH_ENABLE: process.env.SQS_SEARCH_ENABLE,
|
||||||
|
BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT,
|
||||||
// smtp
|
// smtp
|
||||||
SMTP_USER: process.env.SMTP_USER,
|
SMTP_USER: process.env.SMTP_USER,
|
||||||
SMTP_PASSWORD: process.env.SMTP_PASSWORD,
|
SMTP_PASSWORD: process.env.SMTP_PASSWORD,
|
||||||
|
|
|
@ -88,7 +88,11 @@ const shutdown = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default server.listen(parseInt(env.PORT || "4002"), async () => {
|
export default server.listen(parseInt(env.PORT || "4002"), async () => {
|
||||||
console.log(`Worker running on ${JSON.stringify(server.address())}`)
|
let startupLog = `Worker running on ${JSON.stringify(server.address())}`
|
||||||
|
if (env.BUDIBASE_ENVIRONMENT) {
|
||||||
|
startupLog = `${startupLog} - environment: "${env.BUDIBASE_ENVIRONMENT}"`
|
||||||
|
}
|
||||||
|
console.log(startupLog)
|
||||||
await initPro()
|
await initPro()
|
||||||
await redis.clients.init()
|
await redis.clients.init()
|
||||||
cache.docWritethrough.init()
|
cache.docWritethrough.init()
|
||||||
|
|
Loading…
Reference in New Issue