Delete old feature flags.
This commit is contained in:
parent
be5c619911
commit
af83f1b2e1
|
@ -1,9 +1,7 @@
|
||||||
import { derived } from "svelte/store"
|
import { derived } from "svelte/store"
|
||||||
import { admin } from "./admin"
|
import { admin } from "./admin"
|
||||||
import { auth } from "./auth"
|
import { auth } from "./auth"
|
||||||
import { isEnabled } from "@/helpers/featureFlags"
|
|
||||||
import { sdk } from "@budibase/shared-core"
|
import { sdk } from "@budibase/shared-core"
|
||||||
import { FeatureFlag } from "@budibase/types"
|
|
||||||
|
|
||||||
export const menu = derived([admin, auth], ([$admin, $auth]) => {
|
export const menu = derived([admin, auth], ([$admin, $auth]) => {
|
||||||
const user = $auth?.user
|
const user = $auth?.user
|
||||||
|
@ -63,13 +61,11 @@ export const menu = derived([admin, auth], ([$admin, $auth]) => {
|
||||||
title: "Environment",
|
title: "Environment",
|
||||||
href: "/builder/portal/settings/environment",
|
href: "/builder/portal/settings/environment",
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
if (isEnabled(FeatureFlag.AI_CUSTOM_CONFIGS)) {
|
|
||||||
settingsSubPages.push({
|
|
||||||
title: "AI",
|
title: "AI",
|
||||||
href: "/builder/portal/settings/ai",
|
href: "/builder/portal/settings/ai",
|
||||||
})
|
},
|
||||||
}
|
]
|
||||||
|
|
||||||
if (!cloud) {
|
if (!cloud) {
|
||||||
settingsSubPages.push({
|
settingsSubPages.push({
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 32d84f109d4edc526145472a7446327312151442
|
Subproject commit 23fdd50b7ef28cf320716ed2c46e15d63185daa7
|
|
@ -4,15 +4,8 @@ import {
|
||||||
processAIColumns,
|
processAIColumns,
|
||||||
processFormulas,
|
processFormulas,
|
||||||
} from "../../../utilities/rowProcessor"
|
} from "../../../utilities/rowProcessor"
|
||||||
import { context, features } from "@budibase/backend-core"
|
import { context } from "@budibase/backend-core"
|
||||||
import {
|
import { Table, Row, FormulaType, FieldType, ViewV2 } from "@budibase/types"
|
||||||
Table,
|
|
||||||
Row,
|
|
||||||
FeatureFlag,
|
|
||||||
FormulaType,
|
|
||||||
FieldType,
|
|
||||||
ViewV2,
|
|
||||||
} from "@budibase/types"
|
|
||||||
import * as linkRows from "../../../db/linkedRows"
|
import * as linkRows from "../../../db/linkedRows"
|
||||||
import isEqual from "lodash/isEqual"
|
import isEqual from "lodash/isEqual"
|
||||||
import { cloneDeep, merge } from "lodash/fp"
|
import { cloneDeep, merge } from "lodash/fp"
|
||||||
|
@ -163,10 +156,8 @@ export async function finaliseRow(
|
||||||
contextRows: [enrichedRow],
|
contextRows: [enrichedRow],
|
||||||
})
|
})
|
||||||
const aiEnabled =
|
const aiEnabled =
|
||||||
((await features.isEnabled(FeatureFlag.BUDIBASE_AI)) &&
|
(await pro.features.isBudibaseAIEnabled()) ||
|
||||||
(await pro.features.isBudibaseAIEnabled())) ||
|
(await pro.features.isAICustomConfigsEnabled())
|
||||||
((await features.isEnabled(FeatureFlag.AI_CUSTOM_CONFIGS)) &&
|
|
||||||
(await pro.features.isAICustomConfigsEnabled()))
|
|
||||||
if (aiEnabled) {
|
if (aiEnabled) {
|
||||||
row = await processAIColumns(table, row, {
|
row = await processAIColumns(table, row, {
|
||||||
contextRows: [enrichedRow],
|
contextRows: [enrichedRow],
|
||||||
|
|
|
@ -27,11 +27,9 @@ import {
|
||||||
Hosting,
|
Hosting,
|
||||||
ActionImplementation,
|
ActionImplementation,
|
||||||
AutomationStepDefinition,
|
AutomationStepDefinition,
|
||||||
FeatureFlag,
|
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import sdk from "../sdk"
|
import sdk from "../sdk"
|
||||||
import { getAutomationPlugin } from "../utilities/fileSystem"
|
import { getAutomationPlugin } from "../utilities/fileSystem"
|
||||||
import { features } from "@budibase/backend-core"
|
|
||||||
|
|
||||||
type ActionImplType = ActionImplementations<
|
type ActionImplType = ActionImplementations<
|
||||||
typeof env.SELF_HOSTED extends "true" ? Hosting.SELF : Hosting.CLOUD
|
typeof env.SELF_HOSTED extends "true" ? Hosting.SELF : Hosting.CLOUD
|
||||||
|
@ -78,6 +76,7 @@ export const BUILTIN_ACTION_DEFINITIONS: Record<
|
||||||
LOOP: loop.definition,
|
LOOP: loop.definition,
|
||||||
COLLECT: collect.definition,
|
COLLECT: collect.definition,
|
||||||
TRIGGER_AUTOMATION_RUN: triggerAutomationRun.definition,
|
TRIGGER_AUTOMATION_RUN: triggerAutomationRun.definition,
|
||||||
|
BRANCH: branch.definition,
|
||||||
// these used to be lowercase step IDs, maintain for backwards compat
|
// these used to be lowercase step IDs, maintain for backwards compat
|
||||||
discord: discord.definition,
|
discord: discord.definition,
|
||||||
slack: slack.definition,
|
slack: slack.definition,
|
||||||
|
@ -105,14 +104,7 @@ if (env.SELF_HOSTED) {
|
||||||
export async function getActionDefinitions(): Promise<
|
export async function getActionDefinitions(): Promise<
|
||||||
Record<keyof typeof AutomationActionStepId, AutomationStepDefinition>
|
Record<keyof typeof AutomationActionStepId, AutomationStepDefinition>
|
||||||
> {
|
> {
|
||||||
if (await features.isEnabled(FeatureFlag.AUTOMATION_BRANCHING)) {
|
if (env.SELF_HOSTED) {
|
||||||
BUILTIN_ACTION_DEFINITIONS["BRANCH"] = branch.definition
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
env.SELF_HOSTED ||
|
|
||||||
(await features.isEnabled(FeatureFlag.BUDIBASE_AI)) ||
|
|
||||||
(await features.isEnabled(FeatureFlag.AI_CUSTOM_CONFIGS))
|
|
||||||
) {
|
|
||||||
BUILTIN_ACTION_DEFINITIONS["OPENAI"] = openai.definition
|
BUILTIN_ACTION_DEFINITIONS["OPENAI"] = openai.definition
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,8 @@ import {
|
||||||
AutomationIOType,
|
AutomationIOType,
|
||||||
OpenAIStepInputs,
|
OpenAIStepInputs,
|
||||||
OpenAIStepOutputs,
|
OpenAIStepOutputs,
|
||||||
FeatureFlag,
|
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { env, features } from "@budibase/backend-core"
|
import { env } from "@budibase/backend-core"
|
||||||
import * as automationUtils from "../automationUtils"
|
import * as automationUtils from "../automationUtils"
|
||||||
import * as pro from "@budibase/pro"
|
import * as pro from "@budibase/pro"
|
||||||
|
|
||||||
|
@ -99,12 +98,8 @@ export async function run({
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let response
|
let response
|
||||||
const customConfigsEnabled =
|
const customConfigsEnabled = await pro.features.isAICustomConfigsEnabled()
|
||||||
(await features.isEnabled(FeatureFlag.AI_CUSTOM_CONFIGS)) &&
|
const budibaseAIEnabled = await pro.features.isBudibaseAIEnabled()
|
||||||
(await pro.features.isAICustomConfigsEnabled())
|
|
||||||
const budibaseAIEnabled =
|
|
||||||
(await features.isEnabled(FeatureFlag.BUDIBASE_AI)) &&
|
|
||||||
(await pro.features.isBudibaseAIEnabled())
|
|
||||||
|
|
||||||
let llmWrapper
|
let llmWrapper
|
||||||
if (budibaseAIEnabled || customConfigsEnabled) {
|
if (budibaseAIEnabled || customConfigsEnabled) {
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
export enum FeatureFlag {
|
export enum FeatureFlag {
|
||||||
AUTOMATION_BRANCHING = "AUTOMATION_BRANCHING",
|
|
||||||
AI_CUSTOM_CONFIGS = "AI_CUSTOM_CONFIGS",
|
|
||||||
DEFAULT_VALUES = "DEFAULT_VALUES",
|
|
||||||
BUDIBASE_AI = "BUDIBASE_AI",
|
|
||||||
USE_ZOD_VALIDATOR = "USE_ZOD_VALIDATOR",
|
USE_ZOD_VALIDATOR = "USE_ZOD_VALIDATOR",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const FeatureFlagDefaults = {
|
export const FeatureFlagDefaults = {
|
||||||
[FeatureFlag.DEFAULT_VALUES]: true,
|
|
||||||
[FeatureFlag.AUTOMATION_BRANCHING]: true,
|
|
||||||
[FeatureFlag.AI_CUSTOM_CONFIGS]: true,
|
|
||||||
[FeatureFlag.BUDIBASE_AI]: true,
|
|
||||||
[FeatureFlag.USE_ZOD_VALIDATOR]: false,
|
[FeatureFlag.USE_ZOD_VALIDATOR]: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue