2022-05-03 23:58:19 +02:00
|
|
|
import db from "./db"
|
|
|
|
import errors from "./errors"
|
2022-05-03 18:13:13 +02:00
|
|
|
import * as events from "./events"
|
2022-05-04 12:22:50 +02:00
|
|
|
import * as migrations from "./migrations"
|
2022-05-05 09:32:14 +02:00
|
|
|
import * as users from "./users"
|
|
|
|
import env from "./environment"
|
|
|
|
import accounts from "./cloud/accounts"
|
|
|
|
import tenancy from "./tenancy"
|
|
|
|
import featureFlags from "./featureFlags"
|
|
|
|
import sessions from "./security/sessions"
|
|
|
|
import deprovisioning from "./context/deprovision"
|
|
|
|
|
|
|
|
// outer packages
|
|
|
|
import dbPkg from "../db"
|
|
|
|
import redis from "../redis"
|
|
|
|
import objectStore from "../objectStore"
|
|
|
|
import utils from "../utils"
|
|
|
|
import cache from "../cache"
|
|
|
|
import auth from "../auth"
|
|
|
|
import constants from "../constants"
|
2022-05-23 11:29:33 +02:00
|
|
|
import context from "../context"
|
2021-04-07 12:33:16 +02:00
|
|
|
|
2022-05-03 23:58:19 +02:00
|
|
|
export = {
|
|
|
|
init(opts: any = {}) {
|
2022-03-29 17:03:44 +02:00
|
|
|
db.init(opts.db)
|
2021-04-15 17:45:21 +02:00
|
|
|
},
|
2022-01-12 12:32:14 +01:00
|
|
|
// some default exports from the library, however these ideally shouldn't
|
|
|
|
// be used, instead the syntax require("@budibase/backend-core/db") should be used
|
2022-05-05 09:32:14 +02:00
|
|
|
StaticDatabases: dbPkg.StaticDatabases,
|
|
|
|
db: dbPkg,
|
|
|
|
redis,
|
|
|
|
objectStore,
|
|
|
|
utils,
|
|
|
|
users,
|
|
|
|
cache,
|
|
|
|
auth,
|
|
|
|
constants,
|
2022-05-04 12:22:50 +02:00
|
|
|
migrations,
|
2022-05-03 23:58:19 +02:00
|
|
|
errors,
|
2022-04-08 02:28:22 +02:00
|
|
|
...errors.errors,
|
2022-05-05 09:32:14 +02:00
|
|
|
env,
|
|
|
|
accounts,
|
|
|
|
tenancy,
|
2022-05-23 11:29:33 +02:00
|
|
|
context,
|
2022-05-05 09:32:14 +02:00
|
|
|
featureFlags,
|
2022-05-03 18:13:13 +02:00
|
|
|
events,
|
2022-05-05 09:32:14 +02:00
|
|
|
sessions,
|
|
|
|
deprovisioning,
|
2021-04-08 12:20:37 +02:00
|
|
|
}
|