eslint import/no-duplicates

This commit is contained in:
Adria Navarro 2023-11-20 16:15:43 +01:00
parent 0874489585
commit 4d27ff1dc0
68 changed files with 128 additions and 200 deletions

View File

@ -58,7 +58,8 @@
}
],
"import/no-relative-packages": "error",
"import/export": "error"
"import/export": "error",
"import/no-duplicates": "error"
},
"globals": {
"GeolocationPositionError": true

View File

@ -17,7 +17,6 @@ import { DocumentType, SEPARATOR } from "../constants"
import { CacheKey, TTL, withCache } from "../cache"
import * as context from "../context"
import env from "../environment"
import environment from "../environment"
// UTILS
@ -181,10 +180,10 @@ export async function getGoogleDatasourceConfig(): Promise<
}
export function getDefaultGoogleConfig(): GoogleInnerConfig | undefined {
if (environment.GOOGLE_CLIENT_ID && environment.GOOGLE_CLIENT_SECRET) {
if (env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET) {
return {
clientID: environment.GOOGLE_CLIENT_ID!,
clientSecret: environment.GOOGLE_CLIENT_SECRET!,
clientID: env.GOOGLE_CLIENT_ID!,
clientSecret: env.GOOGLE_CLIENT_SECRET!,
activated: true,
}
}

View File

@ -1,7 +1,6 @@
import { newid } from "./utils"
import * as events from "./events"
import { StaticDatabases } from "./db"
import { doWithDB } from "./db"
import { StaticDatabases , doWithDB } from "./db"
import { Installation, IdentityType, Database } from "@budibase/types"
import * as context from "./context"
import semver from "semver"

View File

@ -1,7 +1,6 @@
import { BuiltinPermissionID, PermissionLevel } from "./permissions"
import { prefixRoleID, getRoleParams, DocumentType, SEPARATOR } from "../db"
import { prefixRoleID, getRoleParams, DocumentType, SEPARATOR , doWithDB } from "../db"
import { getAppDB } from "../context"
import { doWithDB } from "../db"
import { Screen, Role as RoleDoc } from "@budibase/types"
import cloneDeep from "lodash/fp/cloneDeep"

View File

@ -1,6 +1,5 @@
import env from "../environment"
import * as eventHelpers from "./events"
import * as accounts from "../accounts"
import * as accountSdk from "../accounts"
import * as cache from "../cache"
import { getGlobalDB, getIdentity, getTenantId } from "../context"
@ -467,7 +466,7 @@ export class UserDB {
if (!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL) {
// root account holder can't be deleted from inside budibase
const email = dbUser.email
const account = await accounts.getAccount(email)
const account = await accountSdk.getAccount(email)
if (account) {
if (dbUser.userId === getIdentity()!._id) {
throw new HTTPError('Please visit "Account" to delete this user', 400)

View File

@ -3,9 +3,8 @@
import Button from "../Button/Button.svelte"
import Body from "../Typography/Body.svelte"
import Heading from "../Typography/Heading.svelte"
import { setContext } from "svelte"
import { createEventDispatcher } from "svelte"
import { generate } from "shortid"
import { setContext , createEventDispatcher } from "svelte"
import { generate } from "shortid"
export let title
export let fillWidth

View File

@ -1,12 +1,11 @@
<script>
import "@spectrum-css/popover/dist/index-vars.css"
import Portal from "svelte-portal"
import { createEventDispatcher } from "svelte"
import { createEventDispatcher , getContext } from "svelte"
import positionDropdown from "../Actions/position_dropdown"
import clickOutside from "../Actions/click_outside"
import { fly } from "svelte/transition"
import { getContext } from "svelte"
import Context from "../context"
import Context from "../context"
const dispatch = createEventDispatcher()

View File

@ -4,11 +4,10 @@ import { getTemporalStore } from "./store/temporal"
import { getThemeStore } from "./store/theme"
import { getUserStore } from "./store/users"
import { getDeploymentStore } from "./store/deployments"
import { derived, writable } from "svelte/store"
import { derived, writable , get } from "svelte/store"
import { findComponent, findComponentPath } from "./componentUtils"
import { RoleUtils } from "@budibase/frontend-core"
import { createHistoryStore } from "builderStore/store/history"
import { get } from "svelte/store"
export const store = getFrontendStore()
export const automationStore = getAutomationStore()

View File

@ -7,11 +7,9 @@ import {
} from "builderStore"
import { datasources, tables } from "stores/backend"
import { get } from "svelte/store"
import { auth } from "stores/portal"
import { SocketEvent, BuilderSocketEvent } from "@budibase/shared-core"
import { apps } from "stores/portal"
import { auth , apps } from "stores/portal"
import { SocketEvent, BuilderSocketEvent , helpers } from "@budibase/shared-core"
import { notifications } from "@budibase/bbui"
import { helpers } from "@budibase/shared-core"
export const createBuilderWebsocket = appId => {
const socket = createWebsocket("/socket/builder")

View File

@ -1,5 +1,5 @@
<script>
import { automationStore, selectedAutomation } from "builderStore"
import { automationStore, selectedAutomation , automationHistoryStore } from "builderStore"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import FlowItem from "./FlowItem.svelte"
import TestDataModal from "./TestDataModal.svelte"
@ -8,8 +8,7 @@
import { Icon, notifications, Modal } from "@budibase/bbui"
import { ActionStepID } from "constants/backend/automations"
import UndoRedoControl from "components/common/UndoRedoControl.svelte"
import { automationHistoryStore } from "builderStore"
export let automation
let testDataModal

View File

@ -1,7 +1,6 @@
<script>
import { automationStore } from "builderStore"
import { notifications } from "@budibase/bbui"
import {
import { notifications ,
Input,
InlineAlert,
ModalContent,
@ -10,7 +9,7 @@
Icon,
Label,
} from "@budibase/bbui"
import { TriggerStepID } from "constants/backend/automations"
import { TriggerStepID } from "constants/backend/automations"
export let webhookModal

View File

@ -1,8 +1,7 @@
<script>
import { automationStore } from "builderStore"
import { notifications } from "@budibase/bbui"
import { Icon, Input, ModalContent, Modal } from "@budibase/bbui"
import { notifications , Icon, Input, ModalContent, Modal } from "@budibase/bbui"
export let automation
export let onCancel = undefined

View File

@ -38,13 +38,12 @@
EditorModes,
} from "components/common/CodeEditor"
import FilterDrawer from "components/design/settings/controls/FilterEditor/FilterDrawer.svelte"
import { LuceneUtils } from "@budibase/frontend-core"
import { LuceneUtils , Utils } from "@budibase/frontend-core"
import {
getSchemaForDatasourcePlus,
getEnvironmentBindings,
} from "builderStore/dataBinding"
import { Utils } from "@budibase/frontend-core"
import { TriggerStepID, ActionStepID } from "constants/backend/automations"
import { TriggerStepID, ActionStepID } from "constants/backend/automations"
import { onMount } from "svelte"
import { cloneDeep } from "lodash/fp"

View File

@ -1,9 +1,8 @@
<script>
import { Icon, notifications } from "@budibase/bbui"
import { Icon, notifications , ModalContent } from "@budibase/bbui"
import { automationStore, selectedAutomation } from "builderStore"
import WebhookDisplay from "./WebhookDisplay.svelte"
import { ModalContent } from "@budibase/bbui"
import { onMount, onDestroy } from "svelte"
import { onMount, onDestroy } from "svelte"
const POLL_RATE_MS = 2500

View File

@ -1,12 +1,10 @@
<script>
import { createEventDispatcher } from "svelte"
import { tables } from "stores/backend"
import { roles } from "stores/backend"
import { notifications } from "@budibase/bbui"
import { tables , roles } from "stores/backend"
import { notifications , keepOpen, ModalContent, Select, Link } from "@budibase/bbui"
import RowFieldControl from "../RowFieldControl.svelte"
import { API } from "api"
import { keepOpen, ModalContent, Select, Link } from "@budibase/bbui"
import ErrorsBox from "components/common/ErrorsBox.svelte"
import ErrorsBox from "components/common/ErrorsBox.svelte"
import { goto } from "@roxi/routify"
export let row = {}

View File

@ -1,9 +1,8 @@
<script>
import { keepOpen, ModalContent, Select, Input, Button } from "@budibase/bbui"
import { keepOpen, ModalContent, Select, Input, Button , notifications } from "@budibase/bbui"
import { onMount } from "svelte"
import { API } from "api"
import { notifications } from "@budibase/bbui"
import ErrorsBox from "components/common/ErrorsBox.svelte"
import ErrorsBox from "components/common/ErrorsBox.svelte"
import { roles } from "stores/backend"
const BASE_ROLE = { _id: "", inherits: "BASIC", permissionId: "write" }

View File

@ -1,9 +1,8 @@
<script>
import { get } from "svelte/store"
import { datasources, integrations } from "stores/backend"
import { notifications } from "@budibase/bbui"
import { Input, ModalContent, Modal } from "@budibase/bbui"
import { integrationForDatasource } from "stores/selectors"
import { notifications , Input, ModalContent, Modal } from "@budibase/bbui"
import { integrationForDatasource } from "stores/selectors"
let error = ""
let modal

View File

@ -1,9 +1,8 @@
<script>
import { goto } from "@roxi/routify"
import { datasources } from "stores/backend"
import { notifications } from "@budibase/bbui"
import { ActionMenu, MenuItem, Icon } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import { notifications , ActionMenu, MenuItem, Icon } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import UpdateDatasourceModal from "components/backend/DatasourceNavigator/modals/UpdateDatasourceModal.svelte"
import { BUDIBASE_DATASOURCE_TYPE } from "constants/backend"

View File

@ -1,5 +1,5 @@
<script>
import { RelationshipType } from "constants/backend"
import { RelationshipType , PrettyRelationshipDefinitions } from "constants/backend"
import {
keepOpen,
Button,
@ -8,14 +8,12 @@
Select,
Detail,
Body,
} from "@budibase/bbui"
Helpers } from "@budibase/bbui"
import { tables } from "stores/backend"
import { Helpers } from "@budibase/bbui"
import { RelationshipErrorChecker } from "./relationshipErrors"
import { RelationshipErrorChecker } from "./relationshipErrors"
import { onMount } from "svelte"
import RelationshipSelector from "components/common/RelationshipSelector.svelte"
import { PrettyRelationshipDefinitions } from "constants/backend"
export let save
export let datasource
export let plusTables = []

View File

@ -1,10 +1,8 @@
<script>
import { goto, url } from "@roxi/routify"
import { tables } from "stores/backend"
import { notifications } from "@budibase/bbui"
import { Input, Label, ModalContent, Layout } from "@budibase/bbui"
import { datasources } from "stores/backend"
import TableDataImport from "../TableDataImport.svelte"
import { tables , datasources } from "stores/backend"
import { notifications , Input, Label, ModalContent, Layout } from "@budibase/bbui"
import TableDataImport from "../TableDataImport.svelte"
import {
BUDIBASE_INTERNAL_DB_ID,
BUDIBASE_DATASOURCE_TYPE,

View File

@ -9,19 +9,18 @@
Heading,
Icon,
} from "@budibase/bbui"
import { createEventDispatcher, onMount } from "svelte"
import { createEventDispatcher, onMount , getContext } from "svelte"
import {
isValid,
decodeJSBinding,
encodeJSBinding,
} from "@budibase/string-templates"
convertToJS } from "@budibase/string-templates"
import {
readableToRuntimeBinding,
runtimeToReadableBinding,
} from "builderStore/dataBinding"
import { convertToJS } from "@budibase/string-templates"
import { admin } from "stores/portal"
import { admin } from "stores/portal"
import CodeEditor from "../CodeEditor/CodeEditor.svelte"
import {
getHelperCompletions,
@ -32,8 +31,7 @@
hbInsert,
jsInsert,
} from "../CodeEditor"
import { getContext } from "svelte"
import BindingPicker from "./BindingPicker.svelte"
import BindingPicker from "./BindingPicker.svelte"
const dispatch = createEventDispatcher()

View File

@ -1,8 +1,7 @@
<script>
import { ActionButton, Button, Drawer } from "@budibase/bbui"
import { ActionButton, Button, Drawer , notifications } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { notifications } from "@budibase/bbui"
import ButtonActionDrawer from "./ButtonActionDrawer.svelte"
import ButtonActionDrawer from "./ButtonActionDrawer.svelte"
import { cloneDeep } from "lodash/fp"
const dispatch = createEventDispatcher()

View File

@ -24,9 +24,8 @@
queries as queriesStore,
viewsV2 as viewsV2Store,
views as viewsStore,
} from "stores/backend"
import { datasources, integrations } from "stores/backend"
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
datasources, integrations } from "stores/backend"
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
import IntegrationQueryEditor from "components/integration/index.svelte"
import { makePropSafe as safe } from "@budibase/string-templates"
import ClientBindingPanel from "components/common/bindings/ClientBindingPanel.svelte"

View File

@ -1,9 +1,8 @@
<script>
import { dndzone } from "svelte-dnd-action"
import { createEventDispatcher } from "svelte"
import { createEventDispatcher , setContext } from "svelte"
import { generate } from "shortid"
import { setContext } from "svelte"
import { writable, get } from "svelte/store"
import { writable, get } from "svelte/store"
import DragHandle from "./drag-handle.svelte"
export let items = []

View File

@ -2,10 +2,9 @@
import { Icon, Popover, Layout } from "@budibase/bbui"
import { store } from "builderStore"
import { cloneDeep } from "lodash/fp"
import { createEventDispatcher } from "svelte"
import { createEventDispatcher , getContext } from "svelte"
import ComponentSettingsSection from "../../../../pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsSection.svelte"
import { getContext } from "svelte"
export let anchor
export let componentInstance
export let componentBindings

View File

@ -7,11 +7,10 @@
getBindableProperties,
getComponentBindableProperties,
} from "builderStore/dataBinding"
import { currentAsset } from "builderStore"
import { currentAsset , store, selectedScreen } from "builderStore"
import DraggableList from "../DraggableList/DraggableList.svelte"
import { createEventDispatcher } from "svelte"
import { store, selectedScreen } from "builderStore"
import FieldSetting from "./FieldSetting.svelte"
import FieldSetting from "./FieldSetting.svelte"
import { convertOldFieldFormat, getComponentForField } from "./utils"
export let componentInstance

View File

@ -1,7 +1,6 @@
<script>
import { ModalContent } from "@budibase/bbui"
import { Select } from "@budibase/bbui"
import { themeStore } from "builderStore"
import { ModalContent , Select } from "@budibase/bbui"
import { themeStore } from "builderStore"
import { Constants } from "@budibase/frontend-core"
</script>

View File

@ -1,11 +1,10 @@
<script>
import { Button, Heading, notifications, Layout, Body } from "@budibase/bbui"
import { Button, Heading, notifications, Layout, Body , FancyForm, FancyInput } from "@budibase/bbui"
import { goto } from "@roxi/routify"
import { API } from "api"
import { admin, auth } from "stores/portal"
import Logo from "assets/bb-emblem.svg"
import { FancyForm, FancyInput } from "@budibase/bbui"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { passwordsMatch, handleError } from "../auth/_components/utils"
let form

View File

@ -1,6 +1,6 @@
<script>
import { Heading, Body, Layout, Button, Modal } from "@budibase/bbui"
import { automationStore, selectedAutomation } from "builderStore"
import { automationStore, selectedAutomation , store } from "builderStore"
import AutomationPanel from "components/automation/AutomationPanel/AutomationPanel.svelte"
import CreateAutomationModal from "components/automation/AutomationPanel/CreateAutomationModal.svelte"
import CreateWebhookModal from "components/automation/Shared/CreateWebhookModal.svelte"
@ -8,8 +8,7 @@
import { onDestroy, onMount } from "svelte"
import { syncURLToState } from "helpers/urlStateSync"
import * as routify from "@roxi/routify"
import { store } from "builderStore"
$: automationId = $selectedAutomation?._id
$: store.actions.websocket.selectResource(automationId)

View File

@ -1,5 +1,5 @@
<script>
import { Modal, keepOpen } from "@budibase/bbui"
import { Modal, keepOpen , notifications } from "@budibase/bbui"
import { goto } from "@roxi/routify"
import { IntegrationTypes } from "constants/backend"
import GoogleAuthPrompt from "./GoogleAuthPrompt.svelte"
@ -11,8 +11,7 @@
import { createOnGoogleAuthStore } from "./stores/onGoogleAuth.js"
import { createDatasourceCreationStore } from "./stores/datasourceCreation.js"
import { configFromIntegration } from "stores/selectors"
import { notifications } from "@budibase/bbui"
export let loading = false
const store = createDatasourceCreationStore()
const onGoogleAuth = createOnGoogleAuthStore()

View File

@ -1,9 +1,8 @@
<script>
import { Table, Modal, Layout, ActionButton } from "@budibase/bbui"
import { Table, Modal, Layout, ActionButton , Helpers } from "@budibase/bbui"
import AuthTypeRenderer from "./AuthTypeRenderer.svelte"
import RestAuthenticationModal from "./RestAuthenticationModal.svelte"
import { Helpers } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { createEventDispatcher } from "svelte"
export let authConfigs = []

View File

@ -6,14 +6,13 @@
import DesignSection from "./DesignSection.svelte"
import CustomStylesSection from "./CustomStylesSection.svelte"
import ConditionalUISection from "./ConditionalUISection.svelte"
import { notifications } from "@budibase/bbui"
import { notifications , ActionButton } from "@budibase/bbui"
import {
getBindableProperties,
getComponentBindableProperties,
} from "builderStore/dataBinding"
import { ActionButton } from "@budibase/bbui"
import { capitalise } from "helpers"
import { capitalise } from "helpers"
const onUpdateName = async value => {
try {

View File

@ -1,14 +1,13 @@
<script>
import { get } from "svelte/store"
import { Helpers } from "@budibase/bbui"
import {
import { Helpers ,
Input,
Checkbox,
Banner,
Select,
notifications,
} from "@budibase/bbui"
import PropertyControl from "components/design/settings/controls/PropertyControl.svelte"
import PropertyControl from "components/design/settings/controls/PropertyControl.svelte"
import RoleSelect from "components/design/settings/controls/RoleSelect.svelte"
import { selectedScreen, store } from "builderStore"
import sanitizeUrl from "builderStore/store/screenTemplates/utils/sanitizeUrl"

View File

@ -1,14 +1,13 @@
<script>
import { store, userSelectedResourceMap } from "builderStore"
import ComponentDropdownMenu from "./ComponentDropdownMenu.svelte"
import NavItem from "components/common/NavItem.svelte"
import { notifications } from "@budibase/bbui"
import {
import { store, userSelectedResourceMap ,
selectedComponentPath,
selectedComponent,
selectedScreen,
} from "builderStore"
import {
import ComponentDropdownMenu from "./ComponentDropdownMenu.svelte"
import NavItem from "components/common/NavItem.svelte"
import { notifications } from "@budibase/bbui"
import {
findComponentPath,
getComponentText,
} from "builderStore/componentUtils"

View File

@ -4,11 +4,10 @@
import { store, selectedScreen, userSelectedResourceMap } from "builderStore"
import NavItem from "components/common/NavItem.svelte"
import ComponentTree from "./ComponentTree.svelte"
import { dndStore } from "./dndStore.js"
import { dndStore , DropPosition } from "./dndStore.js"
import ScreenslotDropdownMenu from "./ScreenslotDropdownMenu.svelte"
import DNDPositionIndicator from "./DNDPositionIndicator.svelte"
import { DropPosition } from "./dndStore"
import ComponentKeyHandler from "./ComponentKeyHandler.svelte"
import ComponentKeyHandler from "./ComponentKeyHandler.svelte"
import ComponentScrollWrapper from "./ComponentScrollWrapper.svelte"
let scrolling = false

View File

@ -6,14 +6,13 @@
Body,
Heading,
Icon,
} from "@budibase/bbui"
FancyForm, FancyInput } from "@budibase/bbui"
import { organisation, auth } from "stores/portal"
import Logo from "assets/bb-emblem.svg"
import { onMount } from "svelte"
import { goto } from "@roxi/routify"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { FancyForm, FancyInput } from "@budibase/bbui"
let email = ""
let form
let error

View File

@ -8,7 +8,7 @@
Layout,
notifications,
Link,
} from "@budibase/bbui"
FancyForm, FancyInput } from "@budibase/bbui"
import { goto } from "@roxi/routify"
import { auth, organisation, oidc, admin } from "stores/portal"
import GoogleButton from "./_components/GoogleButton.svelte"
@ -16,8 +16,7 @@
import { handleError } from "./_components/utils"
import Logo from "assets/bb-emblem.svg"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { FancyForm, FancyInput } from "@budibase/bbui"
import { onMount } from "svelte"
import { onMount } from "svelte"
let loaded = false
let form

View File

@ -1,11 +1,10 @@
<script>
import { Body, Button, Heading, Layout, notifications } from "@budibase/bbui"
import { Body, Button, Heading, Layout, notifications , FancyForm, FancyInput } from "@budibase/bbui"
import { goto, params } from "@roxi/routify"
import { auth, organisation } from "stores/portal"
import Logo from "assets/bb-emblem.svg"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { FancyForm, FancyInput } from "@budibase/bbui"
import { onMount } from "svelte"
import { onMount } from "svelte"
import { handleError, passwordsMatch } from "./_components/utils"
const resetCode = $params["?code"]

View File

@ -1,11 +1,10 @@
<script>
import { Layout, Heading, Body, Button, notifications } from "@budibase/bbui"
import { Layout, Heading, Body, Button, notifications , FancyForm, FancyInput } from "@budibase/bbui"
import { goto, params } from "@roxi/routify"
import { users, organisation, auth } from "stores/portal"
import Logo from "assets/bb-emblem.svg"
import { TestimonialPage } from "@budibase/frontend-core/src/components"
import { FancyForm, FancyInput } from "@budibase/bbui"
import { onMount } from "svelte"
import { onMount } from "svelte"
import { handleError, passwordsMatch } from "../auth/_components/utils"
const inviteCode = $params["?code"]

View File

@ -1,9 +1,8 @@
<script>
import { StatusLight } from "@budibase/bbui"
import { RoleUtils } from "@budibase/frontend-core"
import { RoleUtils , Constants } from "@budibase/frontend-core"
import { roles } from "stores/backend"
import { Constants } from "@budibase/frontend-core"
import { capitalise } from "helpers"
import { capitalise } from "helpers"
export let value

View File

@ -1,5 +1,5 @@
import { Command } from "../structures/Command"
import { CommandWord, AnalyticsEvent, InitType } from "../constants"
import { CommandWord, AnalyticsEvent, InitType , GENERATED_USER_EMAIL } from "../constants"
import { getSkeleton, fleshOutSkeleton } from "./skeleton"
import * as questions from "../questions"
import fs from "fs"
@ -9,7 +9,6 @@ import { runPkgCommand } from "../exec"
import { join } from "path"
import { success, error, info, moveDirectory } from "../utils"
import { captureEvent } from "../events"
import { GENERATED_USER_EMAIL } from "../constants"
import { init as hostingInit } from "../hosting/init"
import { start as hostingStart } from "../hosting/start"
const fp = require("find-free-port")

View File

@ -1,7 +1,6 @@
import chalk from "chalk"
import fs from "fs"
import path from "path"
import { join } from "path"
import path, { join } from "path"
import fetch from "node-fetch"
const progress = require("cli-progress")

View File

@ -1,10 +1,9 @@
<script>
import { Select } from "@budibase/bbui"
import { getContext } from "svelte"
import { getContext , onDestroy } from "svelte"
import dayjs from "dayjs"
import utc from "dayjs/plugin/utc"
import { onDestroy } from "svelte"
dayjs.extend(utc)
export let dataProvider

View File

@ -1,7 +1,6 @@
<script>
import { ModalContent, Modal, Icon, ActionButton } from "@budibase/bbui"
import { Input, Button, StatusLight } from "@budibase/bbui"
import { Html5Qrcode } from "html5-qrcode"
import { ModalContent, Modal, Icon, ActionButton , Input, Button, StatusLight } from "@budibase/bbui"
import { Html5Qrcode } from "html5-qrcode"
import { createEventDispatcher } from "svelte"
export let value

View File

@ -1,9 +1,8 @@
<script>
import { getContext } from "svelte"
import { getContext , onDestroy } from "svelte"
import { Table } from "@budibase/bbui"
import SlotRenderer from "./SlotRenderer.svelte"
import { onDestroy } from "svelte"
import { canBeSortColumn } from "@budibase/shared-core"
import { canBeSortColumn } from "@budibase/shared-core"
export let dataProvider
export let columns

View File

@ -1,7 +1,6 @@
<script>
import { onMount } from "svelte"
import { getContext } from "svelte"
import { Dropzone } from "@budibase/bbui"
import { onMount , getContext } from "svelte"
import { Dropzone } from "@budibase/bbui"
export let value
export let focused = false

View File

@ -1,10 +1,9 @@
<script>
import { GutterWidth } from "../lib/constants"
import { getContext } from "svelte"
import { getContext , createEventDispatcher } from "svelte"
import { Checkbox, Icon } from "@budibase/bbui"
import GridCell from "./GridCell.svelte"
import { createEventDispatcher } from "svelte"
export let row
export let rowFocused = false
export let rowHovered = false

View File

@ -4,9 +4,8 @@
import GridScrollWrapper from "./GridScrollWrapper.svelte"
import DataCell from "../cells/DataCell.svelte"
import { fade } from "svelte/transition"
import { GutterWidth } from "../lib/constants"
import { NewRowID } from "../lib/constants"
import GutterCell from "../cells/GutterCell.svelte"
import { GutterWidth , NewRowID } from "../lib/constants"
import GutterCell from "../cells/GutterCell.svelte"
import KeyboardShortcut from "./KeyboardShortcut.svelte"
const {

@ -1 +1 @@
Subproject commit 2cf6f28380d3ab22128b8a889d622fd5adfa31fc
Subproject commit ea48ab72f99d50a01c7b7afd37fdb73efbc15641

View File

@ -1,7 +1,6 @@
import { events } from "@budibase/backend-core"
import { events , context } from "@budibase/backend-core"
import { AnalyticsPingRequest, App, PingSource } from "@budibase/types"
import { DocumentType, isDevAppID } from "../../db/utils"
import { context } from "@budibase/backend-core"
export const isEnabled = async (ctx: any) => {
const enabled = await events.analytics.enabled()

View File

@ -13,7 +13,7 @@ import {
import { deleteEntityMetadata } from "../../utilities"
import { MetadataTypes } from "../../constants"
import { setTestFlag, clearTestFlag } from "../../utilities/redis"
import { context, cache, events } from "@budibase/backend-core"
import { context, cache, events , db as dbCore } from "@budibase/backend-core"
import { automations, features } from "@budibase/pro"
import {
App,
@ -24,7 +24,6 @@ import {
} from "@budibase/types"
import { getActionDefinitions as actionDefs } from "../../automations/actions"
import sdk from "../../sdk"
import { db as dbCore } from "@budibase/backend-core"
import { builderSocket } from "../../websockets"
async function getActionDefinitions() {

View File

@ -1,8 +1,7 @@
import { DocumentType } from "../../db/utils"
import { App, Plugin } from "@budibase/types"
import { App, Plugin , UserCtx } from "@budibase/types"
import { db as dbCore, context, tenancy } from "@budibase/backend-core"
import { getComponentLibraryManifest } from "../../utilities/fileSystem"
import { UserCtx } from "@budibase/types"
export async function fetchAppComponentDefinitions(ctx: UserCtx) {
try {

View File

@ -4,8 +4,7 @@ import { checkSlashesInUrl } from "../../utilities"
import { request } from "../../utilities/workerRequests"
import { clearLock as redisClearLock } from "../../utilities/redis"
import { DocumentType } from "../../db/utils"
import { context, env as envCore } from "@budibase/backend-core"
import { events, db as dbCore, cache } from "@budibase/backend-core"
import { context, env as envCore , events, db as dbCore, cache } from "@budibase/backend-core"
import { App } from "@budibase/types"
async function redirect(ctx: any, method: string, path: string = "global") {

View File

@ -5,16 +5,14 @@ import {
AutoFieldSubTypes,
FieldTypes,
GOOGLE_SHEETS_PRIMARY_KEY,
} from "../../../constants"
USERS_TABLE_SCHEMA,
SwitchableTypes,
CanSwitchTypes} from "../../../constants"
import {
inputProcessing,
cleanupAttachments,
} from "../../../utilities/rowProcessor"
import {
USERS_TABLE_SCHEMA,
SwitchableTypes,
CanSwitchTypes,
} from "../../../constants"
import { getViews, saveView } from "../view/utils"
import viewTemplate from "../view/viewBuilder"
import { cloneDeep } from "lodash/fp"

View File

@ -1,9 +1,8 @@
import * as rowController from "../../../controllers/row"
import * as appController from "../../../controllers/application"
import { AppStatus } from "../../../../db/utils"
import { roles, tenancy, context } from "@budibase/backend-core"
import { roles, tenancy, context , db } from "@budibase/backend-core"
import env from "../../../../environment"
import { db } from "@budibase/backend-core"
import Nano from "@budibase/nano"
class Request {

View File

@ -1,8 +1,7 @@
import emitter from "../events/index"
import { getAutomationParams } from "../db/utils"
import { getAutomationParams , isDevAppID } from "../db/utils"
import { coerce } from "../utilities/rowProcessor"
import { definitions } from "./triggerInfo"
import { isDevAppID } from "../db/utils"
// need this to call directly, so we can get a response
import { automationQueue } from "./bullboard"
import { checkTestFlag } from "../utilities/redis"

View File

@ -1,7 +1,7 @@
import { Knex, knex } from "knex"
import { db as dbCore } from "@budibase/backend-core"
import { QueryOptions } from "../../definitions/datasource"
import { isIsoDateString, SqlClient } from "../utils"
import { isIsoDateString, SqlClient , isValidFilter } from "../utils"
import SqlTableQueryBuilder from "./sqlTable"
import {
Operation,
@ -11,7 +11,6 @@ import {
SortDirection,
} from "@budibase/types"
import environment from "../../environment"
import { isValidFilter } from "../utils"
const envLimit = environment.SQL_MAX_ROWS
? parseInt(environment.SQL_MAX_ROWS)

View File

@ -1,6 +1,5 @@
import env from "./environment"
import { ExtendableContext } from "koa"
import Koa from "koa"
import Koa, { ExtendableContext } from "koa"
import koaBody from "koa-body"
import http from "http"
import * as api from "./api"

View File

@ -8,8 +8,7 @@ import {
accounts,
db as dbUtils,
} from "@budibase/backend-core"
import { QuotaUsage } from "@budibase/types"
import {
import { QuotaUsage ,
CloudAccount,
App,
TenantBackfillSucceededEvent,

View File

@ -1,5 +1,9 @@
import { db as dbCore, encryption, objectStore } from "@budibase/backend-core"
import { Database, Row } from "@budibase/types"
import { Database, Row ,
Automation,
AutomationTriggerStepId,
RowAttachment,
} from "@budibase/types"
import { getAutomationParams, TABLE_ROW_PREFIX } from "../../../db/utils"
import { budibaseTempDir } from "../../../utilities/budibaseDir"
import { DB_EXPORT_FILE, GLOBAL_DB_EXPORT_FILE } from "./constants"
@ -8,11 +12,6 @@ import { ObjectStoreBuckets } from "../../../constants"
import { join } from "path"
import fs from "fs"
import sdk from "../../"
import {
Automation,
AutomationTriggerStepId,
RowAttachment,
} from "@budibase/types"
const uuid = require("uuid/v4")
const tar = require("tar")

View File

@ -8,11 +8,10 @@ import { context, cache, auth } from "@budibase/backend-core"
import { getGlobalIDFromUserMetadataID } from "../db/utils"
import sdk from "../sdk"
import { cloneDeep } from "lodash/fp"
import { SourceName } from "@budibase/types"
import { SourceName , Query } from "@budibase/types"
import { isSQL } from "../integrations/utils"
import { interpolateSQL } from "../integrations/queries/sql"
import { Query } from "@budibase/types"
class QueryRunner {
datasource: any

View File

@ -1,14 +1,12 @@
import { PathLike } from "fs"
import fs from "fs"
import fs, { PathLike } from "fs"
import { budibaseTempDir } from "../budibaseDir"
import { resolve, join } from "path"
import env from "../../environment"
import tar from "tar"
import environment from "../../environment"
const uuid = require("uuid/v4")
export const TOP_LEVEL_PATH =
environment.TOP_LEVEL_PATH || resolve(join(__dirname, "..", "..", ".."))
env.TOP_LEVEL_PATH || resolve(join(__dirname, "..", "..", ".."))
/**
* Upon first startup of instance there may not be everything we need in tmp directory, set it up.

View File

@ -1,7 +1,6 @@
import * as linkRows from "../../db/linkedRows"
import { FieldTypes, AutoFieldSubTypes } from "../../constants"
import { FieldTypes, AutoFieldSubTypes , ObjectStoreBuckets } from "../../constants"
import { processFormulas, fixAutoColumnSubType } from "./utils"
import { ObjectStoreBuckets } from "../../constants"
import {
context,
db as dbCore,

View File

@ -1,10 +1,9 @@
import { Server } from "socket.io"
import { Server , Socket } from "socket.io"
import http from "http"
import Koa from "koa"
import { userAgent } from "koa-useragent"
import { auth, Header, redis } from "@budibase/backend-core"
import { createAdapter } from "@socket.io/redis-adapter"
import { Socket } from "socket.io"
import { getSocketPubSubClients } from "../utilities/redis"
import { SocketEvent, SocketSessionTTL } from "@budibase/shared-core"
import { SocketSession } from "@budibase/types"

View File

@ -19,7 +19,6 @@ import {
redis,
} from "@budibase/backend-core"
db.init()
import Koa from "koa"
import koaBody from "koa-body"
import http from "http"
import api from "./api"
@ -40,7 +39,7 @@ if (coreEnv.ENABLE_SSO_MAINTENANCE_MODE) {
// this will setup http and https proxies form env variables
bootstrap()
const app: Application = new Koa()
const app: Application = new Application()
app.keys = ["secret", "key"]

View File

@ -1,6 +1,5 @@
import { Response } from "node-fetch"
import fetch, { Response , HeadersInit } from "node-fetch"
import env from "../../environment"
import fetch, { HeadersInit } from "node-fetch"
import { State } from "../../types"
import { Header } from "@budibase/backend-core"

View File

@ -1,8 +1,7 @@
import { CreateRowParams, Row, SearchInputParams } from "../../../types"
import { CreateRowParams, Row, SearchInputParams , State } from "../../../types"
import { HeadersInit, Response } from "node-fetch"
import BudibasePublicAPIClient from "../BudibasePublicAPIClient"
import * as fixtures from "../../fixtures"
import { State } from "../../../types"
export default class RowAPI {
client: BudibasePublicAPIClient

View File

@ -1,6 +1,5 @@
import { Application } from "../types"
import { Layout } from "@budibase/types"
import { Screen } from "@budibase/types"
import { Layout , Screen } from "@budibase/types"
// Create type for getAppPackage response
export interface AppPackageResponse {
application: Partial<Application>