Merge branch 'develop' of github.com:Budibase/budibase into views-v2-frontend
This commit is contained in:
commit
0c72d08763
|
@ -1,2 +1,3 @@
|
||||||
nodejs 14.21.3
|
nodejs 14.21.3
|
||||||
python 3.10.0
|
python 3.10.0
|
||||||
|
yarn 1.22.19
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.8.29-alpha.1",
|
"version": "2.8.29-alpha.3",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Config } from "@jest/types"
|
import { Config } from "@jest/types"
|
||||||
const preset = require("ts-jest/jest-preset")
|
|
||||||
|
|
||||||
const baseConfig: Config.InitialProjectOptions = {
|
const baseConfig: Config.InitialProjectOptions = {
|
||||||
...preset,
|
|
||||||
preset: "@trendyol/jest-testcontainers",
|
preset: "@trendyol/jest-testcontainers",
|
||||||
setupFiles: ["./tests/jestEnv.ts"],
|
setupFiles: ["./tests/jestEnv.ts"],
|
||||||
setupFilesAfterEnv: ["./tests/jestSetup.ts"],
|
setupFilesAfterEnv: ["./tests/jestSetup.ts"],
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
"@budibase/nano": "10.1.2",
|
"@budibase/nano": "10.1.2",
|
||||||
"@budibase/pouchdb-replication-stream": "1.2.10",
|
"@budibase/pouchdb-replication-stream": "1.2.10",
|
||||||
"@budibase/types": "0.0.0",
|
"@budibase/types": "0.0.0",
|
||||||
"@shopify/jest-koa-mocks": "5.0.1",
|
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-cloudfront-sign": "2.2.0",
|
"aws-cloudfront-sign": "2.2.0",
|
||||||
"aws-sdk": "2.1030.0",
|
"aws-sdk": "2.1030.0",
|
||||||
|
@ -58,12 +57,13 @@
|
||||||
"uuid": "8.3.2"
|
"uuid": "8.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/test-sequencer": "29.5.0",
|
"@jest/test-sequencer": "29.6.2",
|
||||||
"@swc/core": "^1.3.25",
|
"@shopify/jest-koa-mocks": "5.1.1",
|
||||||
"@swc/jest": "^0.2.24",
|
"@swc/core": "1.3.71",
|
||||||
|
"@swc/jest": "0.2.27",
|
||||||
"@trendyol/jest-testcontainers": "^2.1.1",
|
"@trendyol/jest-testcontainers": "^2.1.1",
|
||||||
"@types/chance": "1.1.3",
|
"@types/chance": "1.1.3",
|
||||||
"@types/jest": "29.5.0",
|
"@types/jest": "29.5.3",
|
||||||
"@types/koa": "2.13.4",
|
"@types/koa": "2.13.4",
|
||||||
"@types/lodash": "4.14.180",
|
"@types/lodash": "4.14.180",
|
||||||
"@types/node": "14.18.20",
|
"@types/node": "14.18.20",
|
||||||
|
@ -75,15 +75,14 @@
|
||||||
"@types/uuid": "8.3.4",
|
"@types/uuid": "8.3.4",
|
||||||
"chance": "1.1.8",
|
"chance": "1.1.8",
|
||||||
"ioredis-mock": "8.7.0",
|
"ioredis-mock": "8.7.0",
|
||||||
"jest": "29.5.0",
|
"jest": "29.6.2",
|
||||||
"jest-environment-node": "29.5.0",
|
"jest-environment-node": "29.6.2",
|
||||||
"jest-serial-runner": "^1.2.1",
|
"jest-serial-runner": "1.2.1",
|
||||||
"koa": "2.13.4",
|
"koa": "2.13.4",
|
||||||
"nodemon": "2.0.16",
|
"nodemon": "2.0.16",
|
||||||
"pino-pretty": "10.0.0",
|
"pino-pretty": "10.0.0",
|
||||||
"pouchdb-adapter-memory": "7.2.2",
|
"pouchdb-adapter-memory": "7.2.2",
|
||||||
"timekeeper": "2.2.0",
|
"timekeeper": "2.2.0",
|
||||||
"ts-jest": "29.0.5",
|
|
||||||
"ts-node": "10.8.1",
|
"ts-node": "10.8.1",
|
||||||
"tsconfig-paths": "4.0.0",
|
"tsconfig-paths": "4.0.0",
|
||||||
"typescript": "4.7.3"
|
"typescript": "4.7.3"
|
||||||
|
|
|
@ -8,6 +8,6 @@ then
|
||||||
jest --coverage --runInBand --forceExit
|
jest --coverage --runInBand --forceExit
|
||||||
else
|
else
|
||||||
# --maxWorkers performs better in development
|
# --maxWorkers performs better in development
|
||||||
echo "jest --coverage --forceExit"
|
echo "jest --coverage --detectOpenHandles"
|
||||||
jest --coverage --forceExit
|
jest --coverage --detectOpenHandles
|
||||||
fi
|
fi
|
|
@ -1,5 +1,5 @@
|
||||||
const { flatten } = require("lodash")
|
import flatten from "lodash/flatten"
|
||||||
const { cloneDeep } = require("lodash/fp")
|
import cloneDeep from "lodash/fp/cloneDeep"
|
||||||
|
|
||||||
export type RoleHierarchy = {
|
export type RoleHierarchy = {
|
||||||
permissionId: string
|
permissionId: string
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { prefixRoleID, getRoleParams, DocumentType, SEPARATOR } from "../db"
|
||||||
import { getAppDB } from "../context"
|
import { getAppDB } from "../context"
|
||||||
import { doWithDB } from "../db"
|
import { doWithDB } from "../db"
|
||||||
import { Screen, Role as RoleDoc } from "@budibase/types"
|
import { Screen, Role as RoleDoc } from "@budibase/types"
|
||||||
const { cloneDeep } = require("lodash/fp")
|
import cloneDeep from "lodash/fp/cloneDeep"
|
||||||
|
|
||||||
export const BUILTIN_ROLE_IDS = {
|
export const BUILTIN_ROLE_IDS = {
|
||||||
ADMIN: "ADMIN",
|
ADMIN: "ADMIN",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { cloneDeep } from "lodash"
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
import * as permissions from "../permissions"
|
import * as permissions from "../permissions"
|
||||||
import { BUILTIN_ROLE_IDS } from "../roles"
|
import { BUILTIN_ROLE_IDS } from "../roles"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Feature, License, Quotas } from "@budibase/types"
|
import { Feature, License, Quotas } from "@budibase/types"
|
||||||
import _ from "lodash"
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
|
|
||||||
let CLOUD_FREE_LICENSE: License
|
let CLOUD_FREE_LICENSE: License
|
||||||
let UNLIMITED_LICENSE: License
|
let UNLIMITED_LICENSE: License
|
||||||
|
@ -58,7 +58,7 @@ export const useCloudFree = () => {
|
||||||
// FEATURES
|
// FEATURES
|
||||||
|
|
||||||
const useFeature = (feature: Feature) => {
|
const useFeature = (feature: Feature) => {
|
||||||
const license = _.cloneDeep(UNLIMITED_LICENSE)
|
const license = cloneDeep(UNLIMITED_LICENSE)
|
||||||
const opts: UseLicenseOpts = {
|
const opts: UseLicenseOpts = {
|
||||||
features: [feature],
|
features: [feature],
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ export const useSyncAutomations = () => {
|
||||||
// QUOTAS
|
// QUOTAS
|
||||||
|
|
||||||
export const setAutomationLogsQuota = (value: number) => {
|
export const setAutomationLogsQuota = (value: number) => {
|
||||||
const license = _.cloneDeep(UNLIMITED_LICENSE)
|
const license = cloneDeep(UNLIMITED_LICENSE)
|
||||||
license.quotas.constant.automationLogRetentionDays.value = value
|
license.quotas.constant.automationLogRetentionDays.value = value
|
||||||
return useLicense(license)
|
return useLicense(license)
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
CreateAccount,
|
CreateAccount,
|
||||||
CreatePassswordAccount,
|
CreatePassswordAccount,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import _ from "lodash"
|
import sample from "lodash/sample"
|
||||||
|
|
||||||
export const account = (partial: Partial<Account> = {}): Account => {
|
export const account = (partial: Partial<Account> = {}): Account => {
|
||||||
return {
|
return {
|
||||||
|
@ -46,13 +46,11 @@ export const cloudAccount = (): CloudAccount => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function providerType(): AccountSSOProviderType {
|
function providerType(): AccountSSOProviderType {
|
||||||
return _.sample(
|
return sample(Object.values(AccountSSOProviderType)) as AccountSSOProviderType
|
||||||
Object.values(AccountSSOProviderType)
|
|
||||||
) as AccountSSOProviderType
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function provider(): AccountSSOProvider {
|
function provider(): AccountSSOProvider {
|
||||||
return _.sample(Object.values(AccountSSOProvider)) as AccountSSOProvider
|
return sample(Object.values(AccountSSOProvider)) as AccountSSOProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ssoAccount(account: Account = cloudAccount()): SSOAccount {
|
export function ssoAccount(account: Account = cloudAccount()): SSOAccount {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { ScimCreateGroupRequest, ScimCreateUserRequest } from "@budibase/types"
|
import { ScimCreateGroupRequest, ScimCreateUserRequest } from "@budibase/types"
|
||||||
import { uuid } from "./common"
|
import { uuid } from "./common"
|
||||||
import { generator } from "./generator"
|
import { generator } from "./generator"
|
||||||
import _ from "lodash"
|
|
||||||
|
|
||||||
interface CreateUserRequestFields {
|
interface CreateUserRequestFields {
|
||||||
externalId: string
|
externalId: string
|
||||||
|
@ -20,10 +19,10 @@ export function createUserRequest(userData?: Partial<CreateUserRequestFields>) {
|
||||||
username: generator.name(),
|
username: generator.name(),
|
||||||
}
|
}
|
||||||
|
|
||||||
const { externalId, email, firstName, lastName, username } = _.assign(
|
const { externalId, email, firstName, lastName, username } = {
|
||||||
defaultValues,
|
...defaultValues,
|
||||||
userData
|
...userData,
|
||||||
)
|
}
|
||||||
|
|
||||||
let user: ScimCreateUserRequest = {
|
let user: ScimCreateUserRequest = {
|
||||||
schemas: [
|
schemas: [
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { generator } from "./generator"
|
||||||
import { email, uuid } from "./common"
|
import { email, uuid } from "./common"
|
||||||
import * as shared from "./shared"
|
import * as shared from "./shared"
|
||||||
import { user } from "./shared"
|
import { user } from "./shared"
|
||||||
import _ from "lodash"
|
import sample from "lodash/sample"
|
||||||
|
|
||||||
export function OAuth(): OAuth2 {
|
export function OAuth(): OAuth2 {
|
||||||
return {
|
return {
|
||||||
|
@ -47,7 +47,7 @@ export function authDetails(userDoc?: User): SSOAuthDetails {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function providerType(): SSOProviderType {
|
export function providerType(): SSOProviderType {
|
||||||
return _.sample(Object.values(SSOProviderType)) as SSOProviderType
|
return sample(Object.values(SSOProviderType)) as SSOProviderType
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ssoProfile(user?: User): SSOProfile {
|
export function ssoProfile(user?: User): SSOProfile {
|
||||||
|
|
|
@ -101,14 +101,14 @@
|
||||||
"@rollup/plugin-replace": "^2.4.2",
|
"@rollup/plugin-replace": "^2.4.2",
|
||||||
"@roxi/routify": "2.18.5",
|
"@roxi/routify": "2.18.5",
|
||||||
"@sveltejs/vite-plugin-svelte": "1.0.1",
|
"@sveltejs/vite-plugin-svelte": "1.0.1",
|
||||||
"@testing-library/jest-dom": "^5.11.10",
|
"@testing-library/jest-dom": "5.17.0",
|
||||||
"@testing-library/svelte": "^3.2.2",
|
"@testing-library/svelte": "^3.2.2",
|
||||||
"babel-jest": "^26.6.3",
|
"babel-jest": "29.6.2",
|
||||||
"cypress": "^9.3.1",
|
"cypress": "^9.3.1",
|
||||||
"cypress-multi-reporters": "^1.6.0",
|
"cypress-multi-reporters": "^1.6.0",
|
||||||
"cypress-terminal-report": "^1.4.1",
|
"cypress-terminal-report": "^1.4.1",
|
||||||
"identity-obj-proxy": "^3.0.0",
|
"identity-obj-proxy": "^3.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "29.6.2",
|
||||||
"jsdom": "^21.1.1",
|
"jsdom": "^21.1.1",
|
||||||
"mochawesome": "^7.1.3",
|
"mochawesome": "^7.1.3",
|
||||||
"mochawesome-merge": "^4.2.1",
|
"mochawesome-merge": "^4.2.1",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Layout, Body, Button } from "@budibase/bbui"
|
import { Layout, Heading, Body, Button } from "@budibase/bbui"
|
||||||
import { downloadStream } from "@budibase/frontend-core"
|
import { downloadStream } from "@budibase/frontend-core"
|
||||||
import Spinner from "components/common/Spinner.svelte"
|
import Spinner from "components/common/Spinner.svelte"
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Layout noPadding>
|
<Layout noPadding>
|
||||||
|
<Heading>System logs</Heading>
|
||||||
<Body>Download your latest logs to share with the Budibase team</Body>
|
<Body>Download your latest logs to share with the Budibase team</Body>
|
||||||
<div class="download-button">
|
<div class="download-button">
|
||||||
<Button cta on:click={download} disabled={loading}>
|
<Button cta on:click={download} disabled={loading}>
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<Spinner size="10" />
|
<Spinner size="10" />
|
||||||
{/if}
|
{/if}
|
||||||
Download system logs
|
Download
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
"yaml": "^2.1.1"
|
"yaml": "^2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@swc/core": "^1.3.25",
|
"@swc/core": "1.3.71",
|
||||||
"@swc/jest": "^0.2.24",
|
"@swc/jest": "0.2.27",
|
||||||
"@types/jest": "^29.4.0",
|
"@types/jest": "29.5.3",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/pouchdb": "^6.4.0",
|
"@types/pouchdb": "^6.4.0",
|
||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a60183319f410d05aaa1c2f2718b772978b54d64
|
Subproject commit 63fa1b15f6e2afa8a264d597157fd798c9ce031c
|
|
@ -2,10 +2,8 @@ import { Config } from "@jest/types"
|
||||||
|
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
const preset = require("ts-jest/jest-preset")
|
|
||||||
|
|
||||||
const baseConfig: Config.InitialProjectOptions = {
|
const baseConfig: Config.InitialProjectOptions = {
|
||||||
...preset,
|
|
||||||
preset: "@trendyol/jest-testcontainers",
|
preset: "@trendyol/jest-testcontainers",
|
||||||
setupFiles: ["./src/tests/jestEnv.ts"],
|
setupFiles: ["./src/tests/jestEnv.ts"],
|
||||||
setupFilesAfterEnv: ["./src/tests/jestSetup.ts"],
|
setupFilesAfterEnv: ["./src/tests/jestSetup.ts"],
|
||||||
|
|
|
@ -131,15 +131,15 @@
|
||||||
"@babel/core": "7.17.4",
|
"@babel/core": "7.17.4",
|
||||||
"@babel/preset-env": "7.16.11",
|
"@babel/preset-env": "7.16.11",
|
||||||
"@budibase/standard-components": "^0.9.139",
|
"@budibase/standard-components": "^0.9.139",
|
||||||
"@jest/test-sequencer": "29.5.0",
|
"@jest/test-sequencer": "29.6.2",
|
||||||
"@swc/core": "^1.3.25",
|
"@swc/core": "1.3.71",
|
||||||
"@swc/jest": "^0.2.24",
|
"@swc/jest": "0.2.27",
|
||||||
"@trendyol/jest-testcontainers": "^2.1.1",
|
"@trendyol/jest-testcontainers": "2.1.1",
|
||||||
"@types/apidoc": "0.50.0",
|
"@types/apidoc": "0.50.0",
|
||||||
"@types/bson": "4.2.0",
|
"@types/bson": "4.2.0",
|
||||||
"@types/global-agent": "2.1.1",
|
"@types/global-agent": "2.1.1",
|
||||||
"@types/google-spreadsheet": "3.1.5",
|
"@types/google-spreadsheet": "3.1.5",
|
||||||
"@types/jest": "29.5.0",
|
"@types/jest": "29.5.3",
|
||||||
"@types/koa": "2.13.4",
|
"@types/koa": "2.13.4",
|
||||||
"@types/koa__router": "8.0.8",
|
"@types/koa__router": "8.0.8",
|
||||||
"@types/lodash": "4.14.180",
|
"@types/lodash": "4.14.180",
|
||||||
|
@ -155,15 +155,15 @@
|
||||||
"@types/tar": "6.1.5",
|
"@types/tar": "6.1.5",
|
||||||
"@typescript-eslint/parser": "5.45.0",
|
"@typescript-eslint/parser": "5.45.0",
|
||||||
"apidoc": "0.50.4",
|
"apidoc": "0.50.4",
|
||||||
"babel-jest": "29.5.0",
|
"babel-jest": "29.6.2",
|
||||||
"copyfiles": "2.4.1",
|
"copyfiles": "2.4.1",
|
||||||
"docker-compose": "0.23.17",
|
"docker-compose": "0.23.17",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"is-wsl": "2.2.0",
|
"is-wsl": "2.2.0",
|
||||||
"jest": "29.5.0",
|
"jest": "29.6.2",
|
||||||
"jest-openapi": "0.14.2",
|
"jest-openapi": "0.14.2",
|
||||||
"jest-runner": "29.5.0",
|
"jest-runner": "29.6.2",
|
||||||
"jest-serial-runner": "^1.2.1",
|
"jest-serial-runner": "1.2.1",
|
||||||
"nodemon": "2.0.15",
|
"nodemon": "2.0.15",
|
||||||
"openapi-types": "9.3.1",
|
"openapi-types": "9.3.1",
|
||||||
"openapi-typescript": "5.2.0",
|
"openapi-typescript": "5.2.0",
|
||||||
|
@ -172,7 +172,6 @@
|
||||||
"supertest": "6.2.2",
|
"supertest": "6.2.2",
|
||||||
"swagger-jsdoc": "6.1.0",
|
"swagger-jsdoc": "6.1.0",
|
||||||
"timekeeper": "2.2.0",
|
"timekeeper": "2.2.0",
|
||||||
"ts-jest": "29.0.5",
|
|
||||||
"ts-node": "10.8.1",
|
"ts-node": "10.8.1",
|
||||||
"tsconfig-paths": "4.0.0",
|
"tsconfig-paths": "4.0.0",
|
||||||
"typescript": "4.7.3",
|
"typescript": "4.7.3",
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { context } from "@budibase/backend-core"
|
||||||
import { Table, Row } from "@budibase/types"
|
import { Table, Row } from "@budibase/types"
|
||||||
import * as linkRows from "../../../db/linkedRows"
|
import * as linkRows from "../../../db/linkedRows"
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
import { isEqual } from "lodash"
|
import isEqual from "lodash/isEqual"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,8 @@ import { FieldTypes, FormulaTypes } from "../../../constants"
|
||||||
import { clearColumns } from "./utils"
|
import { clearColumns } from "./utils"
|
||||||
import { doesContainStrings } from "@budibase/string-templates"
|
import { doesContainStrings } from "@budibase/string-templates"
|
||||||
import { cloneDeep } from "lodash/fp"
|
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 { updateAllFormulasInTable } from "../row/staticFormula"
|
||||||
import { context } from "@budibase/backend-core"
|
import { context } from "@budibase/backend-core"
|
||||||
import { FieldSchema, Table } from "@budibase/types"
|
import { FieldSchema, Table } from "@budibase/types"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
import { runStaticFormulaChecks } from "./bulkFormula"
|
import { runStaticFormulaChecks } from "./bulkFormula"
|
||||||
import { Table } from "@budibase/types"
|
import { Table } from "@budibase/types"
|
||||||
import { quotas } from "@budibase/pro"
|
import { quotas } from "@budibase/pro"
|
||||||
import { isEqual } from "lodash"
|
import isEqual from "lodash/isEqual"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { parse, isSchema, isRows } from "../../../utilities/schema"
|
import { parse, isSchema, isRows } from "../../../utilities/schema"
|
||||||
import { getRowParams, generateRowID, InternalTables } from "../../../db/utils"
|
import { getRowParams, generateRowID, InternalTables } from "../../../db/utils"
|
||||||
import { isEqual } from "lodash"
|
import isEqual from "lodash/isEqual"
|
||||||
import {
|
import {
|
||||||
AutoFieldSubTypes,
|
AutoFieldSubTypes,
|
||||||
FieldTypes,
|
FieldTypes,
|
||||||
|
|
|
@ -17,7 +17,8 @@ import {
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { builderSocket } from "../../../websockets"
|
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) {
|
export async function fetch(ctx: Ctx) {
|
||||||
ctx.body = await getViews()
|
ctx.body = await getViews()
|
||||||
|
|
|
@ -4,6 +4,7 @@ jest.mock("../../utilities/redis", () => ({
|
||||||
checkTestFlag: () => {
|
checkTestFlag: () => {
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
shutdown: jest.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.spyOn(global.console, "error")
|
jest.spyOn(global.console, "error")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { merge } from "lodash"
|
import merge from "lodash/merge"
|
||||||
import env from "../environment"
|
import env from "../environment"
|
||||||
|
|
||||||
export const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1"
|
export const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1"
|
||||||
|
|
|
@ -8,10 +8,10 @@ import {
|
||||||
getLinkedTableIDs,
|
getLinkedTableIDs,
|
||||||
getLinkedTable,
|
getLinkedTable,
|
||||||
} from "./linkUtils"
|
} from "./linkUtils"
|
||||||
import { flatten } from "lodash"
|
import flatten from "lodash/flatten"
|
||||||
import { FieldTypes } from "../../constants"
|
import { FieldTypes } from "../../constants"
|
||||||
import { getMultiIDParams, USER_METDATA_PREFIX } from "../utils"
|
import { getMultiIDParams, USER_METDATA_PREFIX } from "../utils"
|
||||||
import { partition } from "lodash"
|
import partition from "lodash/partition"
|
||||||
import { getGlobalUsersFromMetadata } from "../../utilities/global"
|
import { getGlobalUsersFromMetadata } from "../../utilities/global"
|
||||||
import { processFormulas } from "../../utilities/rowProcessor"
|
import { processFormulas } from "../../utilities/rowProcessor"
|
||||||
import { context } from "@budibase/backend-core"
|
import { context } from "@budibase/backend-core"
|
||||||
|
|
|
@ -17,7 +17,7 @@ import oracle from "./oracle"
|
||||||
import { SourceName, Integration, PluginType } from "@budibase/types"
|
import { SourceName, Integration, PluginType } from "@budibase/types"
|
||||||
import { getDatasourcePlugin } from "../utilities/fileSystem"
|
import { getDatasourcePlugin } from "../utilities/fileSystem"
|
||||||
import env from "../environment"
|
import env from "../environment"
|
||||||
import { cloneDeep } from "lodash"
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
import sdk from "../sdk"
|
import sdk from "../sdk"
|
||||||
|
|
||||||
const DEFINITIONS: Record<SourceName, Integration | undefined> = {
|
const DEFINITIONS: Record<SourceName, Integration | undefined> = {
|
||||||
|
@ -54,7 +54,6 @@ const INTEGRATIONS: Record<SourceName, any> = {
|
||||||
[SourceName.FIRESTORE]: firebase.integration,
|
[SourceName.FIRESTORE]: firebase.integration,
|
||||||
[SourceName.GOOGLE_SHEETS]: googlesheets.integration,
|
[SourceName.GOOGLE_SHEETS]: googlesheets.integration,
|
||||||
[SourceName.REDIS]: redis.integration,
|
[SourceName.REDIS]: redis.integration,
|
||||||
[SourceName.FIRESTORE]: firebase.integration,
|
|
||||||
[SourceName.SNOWFLAKE]: snowflake.integration,
|
[SourceName.SNOWFLAKE]: snowflake.integration,
|
||||||
[SourceName.ORACLE]: undefined,
|
[SourceName.ORACLE]: undefined,
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
RestBasicAuthConfig,
|
RestBasicAuthConfig,
|
||||||
RestBearerAuthConfig,
|
RestBearerAuthConfig,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { get } from "lodash"
|
import get from "lodash/get"
|
||||||
import * as https from "https"
|
import * as https from "https"
|
||||||
import qs from "querystring"
|
import qs from "querystring"
|
||||||
import fetch from "node-fetch"
|
import fetch from "node-fetch"
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import { getEnvironmentVariables } from "../../utils"
|
import { getEnvironmentVariables } from "../../utils"
|
||||||
import { getDefinitions, getDefinition } from "../../../integrations"
|
import { getDefinitions, getDefinition } from "../../../integrations"
|
||||||
import _ from "lodash"
|
import merge from "lodash/merge"
|
||||||
import {
|
import {
|
||||||
BudibaseInternalDB,
|
BudibaseInternalDB,
|
||||||
getDatasourceParams,
|
getDatasourceParams,
|
||||||
|
@ -227,7 +227,7 @@ export function mergeConfigs(update: Datasource, old: Datasource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old.config?.auth) {
|
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
|
// update back to actual passwords for everything else
|
||||||
|
|
|
@ -14,7 +14,6 @@ import {
|
||||||
import datasources from "../datasources"
|
import datasources from "../datasources"
|
||||||
import { populateExternalTableSchemas, isEditableColumn } from "./validation"
|
import { populateExternalTableSchemas, isEditableColumn } from "./validation"
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
import _ from "lodash"
|
|
||||||
|
|
||||||
async function getAllInternalTables(db?: Database): Promise<Table[]> {
|
async function getAllInternalTables(db?: Database): Promise<Table[]> {
|
||||||
if (!db) {
|
if (!db) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { TableSchema, UIFieldMetadata, View, ViewV2 } from "@budibase/types"
|
||||||
|
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
import * as utils from "../../../db/utils"
|
import * as utils from "../../../db/utils"
|
||||||
import _ from "lodash"
|
import merge from "lodash/merge"
|
||||||
|
|
||||||
export async function get(viewId: string): Promise<ViewV2 | undefined> {
|
export async function get(viewId: string): Promise<ViewV2 | undefined> {
|
||||||
const { tableId } = utils.extractViewInfoFromID(viewId)
|
const { tableId } = utils.extractViewInfoFromID(viewId)
|
||||||
|
@ -104,7 +104,7 @@ function enrichViewV2Schema(
|
||||||
delete tableFieldSchema.order
|
delete tableFieldSchema.order
|
||||||
}
|
}
|
||||||
|
|
||||||
result[columnName] = _.merge(tableFieldSchema, columnUIMetadata)
|
result[columnName] = merge(tableFieldSchema, columnUIMetadata)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
getUserMetadataParams,
|
getUserMetadataParams,
|
||||||
InternalTables,
|
InternalTables,
|
||||||
} from "../../db/utils"
|
} from "../../db/utils"
|
||||||
import { isEqual } from "lodash"
|
import isEqual from "lodash/isEqual"
|
||||||
import { ContextUser, UserMetadata, User, Database } from "@budibase/types"
|
import { ContextUser, UserMetadata, User, Database } from "@budibase/types"
|
||||||
|
|
||||||
export function combineMetadataAndUser(
|
export function combineMetadataAndUser(
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
import env from "../environment"
|
import env from "../environment"
|
||||||
import { groups } from "@budibase/pro"
|
import { groups } from "@budibase/pro"
|
||||||
import { UserCtx, ContextUser, User, UserGroup } from "@budibase/types"
|
import { UserCtx, ContextUser, User, UserGroup } from "@budibase/types"
|
||||||
import { cloneDeep } from "lodash"
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
|
|
||||||
export function updateAppRole(
|
export function updateAppRole(
|
||||||
user: ContextUser,
|
user: ContextUser,
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
"@rollup/plugin-commonjs": "^17.1.0",
|
"@rollup/plugin-commonjs": "^17.1.0",
|
||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
"doctrine": "^3.0.0",
|
"doctrine": "^3.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "29.6.2",
|
||||||
"jest-environment-node": "^26.6.2",
|
"jest-environment-node": "29.6.2",
|
||||||
"marked": "^4.0.10",
|
"marked": "^4.0.10",
|
||||||
"rollup": "^2.36.2",
|
"rollup": "^2.36.2",
|
||||||
"rollup-plugin-inject-process-env": "^1.3.1",
|
"rollup-plugin-inject-process-env": "^1.3.1",
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import { Config } from "@jest/types"
|
import { Config } from "@jest/types"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
const preset = require("ts-jest/jest-preset")
|
|
||||||
|
|
||||||
const config: Config.InitialOptions = {
|
const config: Config.InitialOptions = {
|
||||||
...preset,
|
|
||||||
preset: "@trendyol/jest-testcontainers",
|
preset: "@trendyol/jest-testcontainers",
|
||||||
setupFiles: ["./src/tests/jestEnv.ts"],
|
setupFiles: ["./src/tests/jestEnv.ts"],
|
||||||
setupFilesAfterEnv: ["./src/tests/jestSetup.ts"],
|
setupFilesAfterEnv: ["./src/tests/jestSetup.ts"],
|
||||||
|
|
|
@ -74,10 +74,10 @@
|
||||||
"server-destroy": "1.0.1"
|
"server-destroy": "1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@swc/core": "^1.3.25",
|
"@swc/core": "1.3.71",
|
||||||
"@swc/jest": "^0.2.24",
|
"@swc/jest": "0.2.27",
|
||||||
"@trendyol/jest-testcontainers": "^2.1.1",
|
"@trendyol/jest-testcontainers": "2.1.1",
|
||||||
"@types/jest": "28.1.1",
|
"@types/jest": "29.5.3",
|
||||||
"@types/jsonwebtoken": "8.5.1",
|
"@types/jsonwebtoken": "8.5.1",
|
||||||
"@types/koa": "2.13.4",
|
"@types/koa": "2.13.4",
|
||||||
"@types/koa__router": "8.0.8",
|
"@types/koa__router": "8.0.8",
|
||||||
|
@ -91,14 +91,13 @@
|
||||||
"@typescript-eslint/parser": "5.45.0",
|
"@typescript-eslint/parser": "5.45.0",
|
||||||
"copyfiles": "2.4.1",
|
"copyfiles": "2.4.1",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"jest": "28.1.1",
|
"jest": "29.6.2",
|
||||||
"lodash": "4.17.21",
|
"lodash": "4.17.21",
|
||||||
"nodemon": "2.0.15",
|
"nodemon": "2.0.15",
|
||||||
"pouchdb-adapter-memory": "7.2.2",
|
"pouchdb-adapter-memory": "7.2.2",
|
||||||
"rimraf": "3.0.2",
|
"rimraf": "3.0.2",
|
||||||
"supertest": "6.2.2",
|
"supertest": "6.2.2",
|
||||||
"timekeeper": "2.2.0",
|
"timekeeper": "2.2.0",
|
||||||
"ts-jest": "28.0.4",
|
|
||||||
"ts-node": "10.8.1",
|
"ts-node": "10.8.1",
|
||||||
"tsconfig-paths": "4.0.0",
|
"tsconfig-paths": "4.0.0",
|
||||||
"typescript": "4.7.3",
|
"typescript": "4.7.3",
|
||||||
|
|
|
@ -314,7 +314,7 @@ describe("scim", () => {
|
||||||
|
|
||||||
const user = await config.getUser(email)
|
const user = await config.getUser(email)
|
||||||
expect(user).toBeDefined()
|
expect(user).toBeDefined()
|
||||||
expect(user.email).toEqual(email)
|
expect(user!.email).toEqual(email)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("if multiple emails are provided, the first primary one is used as email", async () => {
|
it("if multiple emails are provided, the first primary one is used as email", async () => {
|
||||||
|
@ -345,7 +345,7 @@ describe("scim", () => {
|
||||||
|
|
||||||
const user = await config.getUser(email)
|
const user = await config.getUser(email)
|
||||||
expect(user).toBeDefined()
|
expect(user).toBeDefined()
|
||||||
expect(user.email).toEqual(email)
|
expect(user!.email).toEqual(email)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("if no email is provided and the user name is not an email, an exception is thrown", async () => {
|
it("if no email is provided and the user name is not an email, an exception is thrown", async () => {
|
||||||
|
|
|
@ -24,18 +24,18 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@budibase/types": "^2.3.17",
|
"@budibase/types": "^2.3.17",
|
||||||
"@trendyol/jest-testcontainers": "^2.1.1",
|
"@trendyol/jest-testcontainers": "2.1.1",
|
||||||
"@types/jest": "29.0.0",
|
"@types/jest": "29.5.3",
|
||||||
"@types/node-fetch": "2.6.2",
|
"@types/node-fetch": "2.6.2",
|
||||||
"chance": "1.1.8",
|
"chance": "1.1.8",
|
||||||
"dotenv": "16.0.1",
|
"dotenv": "16.0.1",
|
||||||
"jest": "29.0.0",
|
"jest": "29.6.2",
|
||||||
"prettier": "2.7.1",
|
"prettier": "2.7.1",
|
||||||
"start-server-and-test": "1.14.0",
|
"start-server-and-test": "1.14.0",
|
||||||
"@swc/core": "^1.3.25",
|
"@swc/core": "1.3.71",
|
||||||
"@swc/jest": "^0.2.24",
|
"@swc/jest": "0.2.27",
|
||||||
"timekeeper": "2.2.0",
|
"timekeeper": "2.2.0",
|
||||||
"ts-jest": "29.0.0",
|
"ts-jest": "29.1.1",
|
||||||
"ts-node": "10.8.1",
|
"ts-node": "10.8.1",
|
||||||
"tsconfig-paths": "4.0.0",
|
"tsconfig-paths": "4.0.0",
|
||||||
"typescript": "4.7.3"
|
"typescript": "4.7.3"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue