diff --git a/packages/pro b/packages/pro index 628ea63036..6fa0bb7738 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 628ea63036ece71f25d6f754a259bb4255b23325 +Subproject commit 6fa0bb7738b72d322ca10e63ed7fe8c4f07b7c68 diff --git a/packages/server/src/api/controllers/row/staticFormula.ts b/packages/server/src/api/controllers/row/staticFormula.ts index b5d520f771..efe6f8719c 100644 --- a/packages/server/src/api/controllers/row/staticFormula.ts +++ b/packages/server/src/api/controllers/row/staticFormula.ts @@ -9,7 +9,7 @@ import { context } from "@budibase/backend-core" import { Table, Row } from "@budibase/types" import * as linkRows from "../../../db/linkedRows" import sdk from "../../../sdk" -import { isEqual } from "lodash" +import isEqual from "lodash/isEqual" import { cloneDeep } from "lodash/fp" /** diff --git a/packages/server/src/api/controllers/table/bulkFormula.ts b/packages/server/src/api/controllers/table/bulkFormula.ts index 142eeff6df..e44cb95391 100644 --- a/packages/server/src/api/controllers/table/bulkFormula.ts +++ b/packages/server/src/api/controllers/table/bulkFormula.ts @@ -2,7 +2,8 @@ import { FieldTypes, FormulaTypes } from "../../../constants" import { clearColumns } from "./utils" import { doesContainStrings } from "@budibase/string-templates" import { cloneDeep } from "lodash/fp" -import { isEqual, uniq } from "lodash" +import isEqual from "lodash/isEqual" +import uniq from "lodash/uniq" import { updateAllFormulasInTable } from "../row/staticFormula" import { context } from "@budibase/backend-core" import { FieldSchema, Table } from "@budibase/types" diff --git a/packages/server/src/api/controllers/table/internal.ts b/packages/server/src/api/controllers/table/internal.ts index eab77e9169..7317d11e18 100644 --- a/packages/server/src/api/controllers/table/internal.ts +++ b/packages/server/src/api/controllers/table/internal.ts @@ -11,7 +11,7 @@ import { import { runStaticFormulaChecks } from "./bulkFormula" import { Table } from "@budibase/types" import { quotas } from "@budibase/pro" -import { isEqual } from "lodash" +import isEqual from "lodash/isEqual" import { cloneDeep } from "lodash/fp" import sdk from "../../../sdk" diff --git a/packages/server/src/api/controllers/table/utils.ts b/packages/server/src/api/controllers/table/utils.ts index 54ee1b91ca..e1469bb267 100644 --- a/packages/server/src/api/controllers/table/utils.ts +++ b/packages/server/src/api/controllers/table/utils.ts @@ -1,6 +1,6 @@ import { parse, isSchema, isRows } from "../../../utilities/schema" import { getRowParams, generateRowID, InternalTables } from "../../../db/utils" -import { isEqual } from "lodash" +import isEqual from "lodash/isEqual" import { AutoFieldSubTypes, FieldTypes, diff --git a/packages/server/src/api/controllers/view/views.ts b/packages/server/src/api/controllers/view/views.ts index 257baf5e45..86deff09ef 100644 --- a/packages/server/src/api/controllers/view/views.ts +++ b/packages/server/src/api/controllers/view/views.ts @@ -17,7 +17,8 @@ import { } from "@budibase/types" import { builderSocket } from "../../../websockets" -const { cloneDeep, isEqual } = require("lodash") +const cloneDeep = require("lodash/cloneDeep") +import isEqual from "lodash/isEqual" export async function fetch(ctx: Ctx) { ctx.body = await getViews() diff --git a/packages/server/src/db/dynamoClient.ts b/packages/server/src/db/dynamoClient.ts index 597be2b21e..148c433c41 100644 --- a/packages/server/src/db/dynamoClient.ts +++ b/packages/server/src/db/dynamoClient.ts @@ -1,4 +1,4 @@ -import { merge } from "lodash" +import merge from "lodash/merge" import env from "../environment" export const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1" diff --git a/packages/server/src/db/linkedRows/index.ts b/packages/server/src/db/linkedRows/index.ts index 4d58d32f9b..3c5379ac97 100644 --- a/packages/server/src/db/linkedRows/index.ts +++ b/packages/server/src/db/linkedRows/index.ts @@ -8,10 +8,10 @@ import { getLinkedTableIDs, getLinkedTable, } from "./linkUtils" -import { flatten } from "lodash" +import flatten from "lodash/flatten" import { FieldTypes } from "../../constants" import { getMultiIDParams, USER_METDATA_PREFIX } from "../utils" -import { partition } from "lodash" +import partition from "lodash/partition" import { getGlobalUsersFromMetadata } from "../../utilities/global" import { processFormulas } from "../../utilities/rowProcessor" import { context } from "@budibase/backend-core" diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index f0b1243159..49761bac85 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -17,7 +17,7 @@ import oracle from "./oracle" import { SourceName, Integration, PluginType } from "@budibase/types" import { getDatasourcePlugin } from "../utilities/fileSystem" import env from "../environment" -import { cloneDeep } from "lodash" +import cloneDeep from "lodash/cloneDeep" import sdk from "../sdk" const DEFINITIONS: Record = { diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index 3262aba980..e9d1d8268e 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -11,7 +11,7 @@ import { RestBasicAuthConfig, RestBearerAuthConfig, } from "@budibase/types" -import { get } from "lodash" +import get from "lodash/get" import * as https from "https" import qs from "querystring" import fetch from "node-fetch" diff --git a/packages/server/src/sdk/app/datasources/datasources.ts b/packages/server/src/sdk/app/datasources/datasources.ts index 9713cea38f..35107fd6b8 100644 --- a/packages/server/src/sdk/app/datasources/datasources.ts +++ b/packages/server/src/sdk/app/datasources/datasources.ts @@ -15,7 +15,7 @@ import { import { cloneDeep } from "lodash/fp" import { getEnvironmentVariables } from "../../utils" import { getDefinitions, getDefinition } from "../../../integrations" -import _ from "lodash" +import merge from "lodash/merge" import { BudibaseInternalDB, getDatasourceParams, @@ -227,7 +227,7 @@ export function mergeConfigs(update: Datasource, old: Datasource) { } if (old.config?.auth) { - update.config = _.merge(old.config, update.config) + update.config = merge(old.config, update.config) } // update back to actual passwords for everything else diff --git a/packages/server/src/sdk/app/tables/index.ts b/packages/server/src/sdk/app/tables/index.ts index 7f88c35010..3313e8dfc6 100644 --- a/packages/server/src/sdk/app/tables/index.ts +++ b/packages/server/src/sdk/app/tables/index.ts @@ -14,7 +14,6 @@ import { import datasources from "../datasources" import { populateExternalTableSchemas, isEditableColumn } from "./validation" import sdk from "../../../sdk" -import _ from "lodash" async function getAllInternalTables(db?: Database): Promise { if (!db) { diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 5bd38cf2b2..244ac899c1 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -3,7 +3,7 @@ import { TableSchema, UIFieldMetadata, View, ViewV2 } from "@budibase/types" import sdk from "../../../sdk" import * as utils from "../../../db/utils" -import _ from "lodash" +import merge from "lodash/merge" export async function get(viewId: string): Promise { const { tableId } = utils.extractViewInfoFromID(viewId) @@ -103,7 +103,7 @@ function enrichViewV2Schema( delete tableFieldSchema.order } - result[columnName] = _.merge(tableFieldSchema, columnUIMetadata) + result[columnName] = merge(tableFieldSchema, columnUIMetadata) } return result } diff --git a/packages/server/src/sdk/users/utils.ts b/packages/server/src/sdk/users/utils.ts index 08084caad1..03ddc954e9 100644 --- a/packages/server/src/sdk/users/utils.ts +++ b/packages/server/src/sdk/users/utils.ts @@ -6,7 +6,7 @@ import { getUserMetadataParams, InternalTables, } from "../../db/utils" -import { isEqual } from "lodash" +import isEqual from "lodash/isEqual" import { ContextUser, UserMetadata, User, Database } from "@budibase/types" export function combineMetadataAndUser( diff --git a/packages/server/src/utilities/global.ts b/packages/server/src/utilities/global.ts index c9869b4920..b6ba625d0a 100644 --- a/packages/server/src/utilities/global.ts +++ b/packages/server/src/utilities/global.ts @@ -9,7 +9,7 @@ import { import env from "../environment" import { groups } from "@budibase/pro" import { UserCtx, ContextUser, User, UserGroup } from "@budibase/types" -import { cloneDeep } from "lodash" +import cloneDeep from "lodash/cloneDeep" export function updateAppRole( user: ContextUser,