budibase/packages/backend-core/src/index.ts

33 lines
1002 B
TypeScript
Raw Normal View History

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"
import * as migrations from "./migrations"
2021-04-07 12:33:16 +02:00
2022-05-03 23:58:19 +02:00
export = {
init(opts: any = {}) {
db.init(opts.db)
},
// some default exports from the library, however these ideally shouldn't
// be used, instead the syntax require("@budibase/backend-core/db") should be used
StaticDatabases: require("./db/utils").StaticDatabases,
db: require("../db"),
redis: require("../redis"),
objectStore: require("../objectStore"),
utils: require("../utils"),
2022-04-08 02:28:22 +02:00
users: require("./users"),
cache: require("../cache"),
auth: require("../auth"),
constants: require("../constants"),
migrations,
2022-05-03 23:58:19 +02:00
errors,
2022-04-08 02:28:22 +02:00
...errors.errors,
2022-03-08 09:01:41 +01:00
env: require("./environment"),
accounts: require("./cloud/accounts"),
tenancy: require("./tenancy"),
featureFlags: require("./featureFlags"),
2022-05-03 18:13:13 +02:00
events,
2022-04-04 16:59:00 +02:00
analytics: require("./analytics"),
2022-04-08 02:28:22 +02:00
sessions: require("./security/sessions"),
deprovisioning: require("./context/deprovision"),
}