Import lodash modules

This commit is contained in:
Adria Navarro 2023-07-27 21:36:32 +02:00
parent 6d5eef4e42
commit b9820f94e6
15 changed files with 19 additions and 18 deletions

@ -1 +1 @@
Subproject commit 628ea63036ece71f25d6f754a259bb4255b23325
Subproject commit 6fa0bb7738b72d322ca10e63ed7fe8c4f07b7c68

View File

@ -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"
/**

View File

@ -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"

View File

@ -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"

View File

@ -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,

View File

@ -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()

View File

@ -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"

View File

@ -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"

View File

@ -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<SourceName, Integration | undefined> = {

View File

@ -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"

View File

@ -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

View File

@ -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<Table[]> {
if (!db) {

View File

@ -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<ViewV2 | undefined> {
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
}

View File

@ -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(

View File

@ -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,